[Top] [All Lists]

Re: ioremap() and CONFIG_SWAP_IO_SPACE

To: Geert Uytterhoeven <>
Subject: Re: ioremap() and CONFIG_SWAP_IO_SPACE
From: Thomas Koeller <>
Date: Tue, 19 Oct 2004 12:45:59 +0200
In-reply-to: <>
Organization: Basler AG
Original-recipient: rfc822;
References: <> <>
User-agent: KMail/1.6.2
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
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 Koeller, Software Development

Basler Vision Technologies
An der Strusbek 60-62
22926 Ahrensburg

Tel +49 (4102) 463-390
Fax +49 (4102) 463-46390


<Prev in Thread] Current Thread [Next in Thread>