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: Ralf Baechle <ralf@linux-mips.org>
Date: Tue, 19 Oct 2004 20:31:05 +0200
Cc: Geert Uytterhoeven <geert@linux-m68k.org>, linux-mips@linux-mips.org
In-reply-to: <200410191245.59878.thomas.koeller@baslerweb.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <200408251130.53865.thomas.koeller@baslerweb.com> <Pine.GSO.4.58.0408251131020.18759@waterleaf.sonytel.be> <200410191245.59878.thomas.koeller@baslerweb.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.4.1i
On Tue, Oct 19, 2004 at 12:45:59PM +0200, Thomas Koeller wrote:

> 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?

If the standard readX() / writeX() functions don't suffice for some reason
then a bus specific versions in a separate header file are needed.

An example are the ISA versions.  For compatibility with super old
versions from before ioremap or where things on i386 at least seemed to
work without ioremap a special isa_readX() / isa_writeX() is supplied.
Again for compatibility reasons these macros are defined in <asm/io.h>,
not in a separate header file.

> Basler Vision Technologies
> An der Strusbek 60-62
> 22926 Ahrensburg
> Germany

Oh, not in Basel :-)

  Ralf

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