linux-mips
[Top] [All Lists]

Re: ioremap() and CONFIG_SWAP_IO_SPACE

To: Thomas Koeller <thomas.koeller@baslerweb.com>
Subject: Re: ioremap() and CONFIG_SWAP_IO_SPACE
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Wed, 25 Aug 2004 11:32:06 +0200 (MEST)
Cc: Linux/MIPS Development <linux-mips@linux-mips.org>
In-reply-to: <200408251130.53865.thomas.koeller@baslerweb.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <200408251130.53865.thomas.koeller@baslerweb.com>
Sender: linux-mips-bounce@linux-mips.org
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.

Gr{oetje,eeting}s,

                                                Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                                            -- Linus Torvalds

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