linux/lib/pci_iomap.c
<<
7" /spaion /formon a 7" href="../linux+v.11.6/lib/pci_iomap.c">7" img src="../.static/gfx/right.png" alt=">>">7" /spaion7" spai cl2lue="v2.1.22.8="v2.6.27.19" 16 v2.6.27.19 n> 7" /spaion /for"v2.6.21.11< "+aion method="post" onsubmi"v2return dopaion (this);6 v2.63 Sion n> 7" /sppptis"27.19 n> <16nC< vdiv <16nC< v2.6.21.11< "ajax+* method="post" onsubmi"v2return false;6 v 7" headingbottlmid&gaion _results"> 7" aion _results" 16 <16nC< vdiv < div>id&gconten"">< div>id&gfile_conten"s"2 7" done id&gb4/69/3ccc13071110f70c438c683b7504515db8c0_3/0"2C< 1 vtielect> 7" commen"">/*> n> <C< 2 vtielect> 7" commen""> * Implemen" the default 9" interfaces> n> <C< 3 vtielect> 7" commen""> *> n> <C< 4 vtielect> 7" commen""> * (C) Copye="v2 2004 Lv2.s Tor"&gds> n> <C< 5 vtielect> 7" commen""> */> n> <C< 6 vti#include <"v2.1.27..h vti1.11<C< 7 vti#include <"v2.1.io.h vti1.11<C< 8 vtioC< 9 vti#include <"v2.1.export.h vti1.11<C<7.4C<11 vti#ifdef9 7" apti">CONFIG_PCI4C<12 vtielect> 7" commen"">/**> n> <C<13 vtielect> 7" commen""> * 27.19" - create a virtual ping cookie 2.6 a PCI BAR> n> <C<14 vtielect> 7" commen""> * @dev: PCI device that owns the BAR> n> <C<15 vtielect> 7" commen""> * @bar: BAR number> n> <C<16 vtielect> 7" commen""> * @maxlen: length of the memory to > n> <C<17 vtielect> 7" commen""> *> n> <C<18 vtielect> 7" commen""> * Using this fun1.11< you will get a _19" e6.2ddress to your device BAR.> n> <C<19 vtielect> 7" commen""> * You cct>access it using ioread*() and iowrite*(). These fun1.11 n> <C<20 vtielect> 7" commen""> * the details if this is a MMIO .6 PIO 2ddress lecce and will just do what> n> <C<21 vtielect> 7" commen""> * you exp.8= from them in the corr.8= way.> n> <C<22 vtielect> 7" commen""> *> n> <C<23 vtielect> 7" commen""> * @maxlen leecifies the maximum length to . If you wan" to get access to> n> <C<24 vtielect> 7" commen""> * the complete BAR without checking 2.6 its length first, p" %0 here.> n> <C<25 vtielect> 7" commen""> * */> n> <C<26 vtivoid9 7" apti">_19" e6 vti *>/ooptios+code=27.19" "> 7" apti">27.19" vti(stru8= >/ooptios+code=27.1dev"> 7" apti">27.1dev vti *>/ooptios+code=dev"> 7" apti">dev vti, int >/ooptios+code=bar"> 7" apti">bar vti, unsigned long >/ooptios+code=maxlen"> 7" apti">maxlen vti)<C<27 vti{<C<28 vti >/ooptios+code=resource_size_t"> 7" apti">resource_size_t vti >/ooptios+code=start"> 7" apti">start vti = >/ooptios+code=27.1resource_start"> 7" apti">27.1resource_start vti(>/ooptios+code=dev"> 7" apti">dev vti, >/ooptios+code=bar"> 7" apti">bar vti)1<C<29 vti >/ooptios+code=resource_size_t"> 7" apti">resource_size_t vti >/ooptios+code=len"> 7" apti">len vti = >/ooptios+code=27.1resource_len"> 7" apti">27.1resource_len vti(>/ooptios+code=dev"> 7" apti">dev vti, >/ooptios+code=bar"> 7" apti">bar vti)1<C<30 vti unsigned long >/ooptios+code=flags"> 7" apti">flags vti = >/ooptios+code=27.1resource_flags"> 7" apti">27.1resource_flags vti(>/ooptios+code=dev"> 7" apti">dev vti, >/ooptios+code=bar"> 7" apti">bar vti)1<C<314C<32 vti if (!>/ooptios+code=len"> 7" apti">len vti || !>/ooptios+code=start"> 7" apti">start vti)<C<33 vti return >/ooptios+code=NULL"> 7" apti">NULL vti1<C<34 vti if (>/ooptios+code=maxlen"> 7" apti">maxlen vti && >/ooptios+code=len"> 7" apti">len vti 1.11 >/ooptios+code=maxlen"> 7" apti">maxlen vti)<C<35 vti >/ooptios+code=len"> 7" apti">len vti = >/ooptios+code=maxlen"> 7" apti">maxlen vti1<C<36 vti if (>/ooptios+code=flags"> 7" apti">flags vti & >/ooptios+code=IORESOURCE_IO"> 7" apti">IORESOURCE_IO vti)<C<37 vti return >/ooptios+code=__27.19"port_ "> 7" apti">__27.19"port_ vti(>/ooptios+code=dev"> 7" apti">dev vti, >/ooptios+code=start"> 7" apti">start vti, >/ooptios+code=len"> 7" apti">len vti)1<C<38 vti if (>/ooptios+code=flags"> 7" apti">flags vti & >/ooptios+code=IORESOURCE_MEM"> 7" apti">IORESOURCE_MEM vti) {<C<39 vti if (>/ooptios+code=flags"> 7" apti">flags vti & >/ooptios+code=IORESOURCE_CACHEABLE"> 7" apti">IORESOURCE_CACHEABLE vti)<C<40 vti return >/ooptios+code=iore "> 7" apti">iore vti(>/ooptios+code=start"> 7" apti">start vti, >/ooptios+code=len"> 7" apti">len vti)1<C<41 vti return >/ooptios+code=iore _nocache"> 7" apti">iore _nocache vti(>/ooptios+code=start"> 7" apti">start vti, >/ooptios+code=len"> 7" apti">len vti)1<C<42 vti }<C<43 vti elect> 7" commen"">/* What? */> n> <C<44 vti return >/ooptios+code=NULL"> 7" apti">NULL vti1<C<45 vti}<C<464C<47 vtie/ooptios+code=EXPORT_SYMBOL"> 7" apti">EXPORT_SYMBOL vti(>/ooptios+code=27.19" "> 7" apti">27.19" vti)1<C<48 vti#endif elect> 7" commen"">/* CONFIG_PCI */> n> <C<49 vtie/pre/opdiv < vdiv < div> 7" footer"> The original LXR software by the LXR community vti, this exp.rimen"al vers11< by lxr@"v2.1.no vti. vdiv < div> 7" subfooter"> lxr."v2.1.no kindly hosted by Redpill Lv2pro AS vti, provider of Lv2.x consulting and op.ra.11