On Wednesday 25 August 2004 11:32, Geert Uytterhoeven wrote: > On Wed, 25 Aug 2004, Thomas Koeller wrote: > > my platform (PMC-Sierra Yosemite in big endian mode), > > like many others, uses ioremap() to map device > > registers, such as the RM9000's OCD registers. > > To access those registers, the return value of > > ioremap() is casted to a suitable pointer type and > > dereferenced. This of course works, but the return > > value of ioremap() is documented not to be a > > directly dereferenceable pointer value, and accesses > > to ioremapped addresses should be performed using > > the readx/writex APIs. > > In theory, ioremap() and readb() and friends are meant for PCI memory space > only. RM9000's OCD registers are not PCI memory space, so there's no strict > guarantee readb() and friends will actually work. > Well, the ioremap() man page uses the term 'bus memory'; there is no reference to PCI at all. I guess there could be multiple buses on one machine with different byte swapping requirements? There is also an article written by alan cox (http://www.kernelnewbies.org/documents/kdoc/deviceiobook.pdf) that describes ioremap() as a general mechanism of accessing memory-mapped io devices, with no reference to PCI at all. Anyway, if ioremap() and readx()/writex() are for PCI memory access only, how am I supposed to access memory-mapped io devices that are not on a PCI bus? Thomas -- -------------------------------------------------- Thomas Koeller, Software Development Basler Vision Technologies An der Strusbek 60-62 22926 Ahrensburg Germany Tel +49 (4102) 463-390 Fax +49 (4102) 463-46390 mailto:thomas.koeller@xxxxxxxxxxxxx http://www.baslerweb.com ==============================