Re: PCI and ioports question

From: Jeff Garzik (
Date: Tue Jul 17 2001 - 11:21:23 EST

daniel sheltraw wrote:
> I have a question about ioports on PCI devices but first: If
> there is a better mailing list for asking these types of questions
> would you kindly direct me there.
> The question is this. When do I need to use ioremap for ioports
> on a PCI device (PC architecture)? Is the answer: always except
> when the physical address is within the 64K - 1M ISA region (legacy
> ports).

For I/O ports, which have values between 0x0000 and 0xFFFF, you use
inb/inw/inl and outb/outw/outl, and do not use ioremap.

For ISA and PCI memory regions (which are completely different from I/O
ports), you always use ioremap, and talk to the regions use
readb/readw/readl and writeb/writew/writel.

There exist isa_xxx functions but do not use these: these are only for
outdated drivers which have not yet been converted to use ioremap.

Jeff Garzik      | "I wouldn't be so judgemental
Building 1024    |  if you weren't such a sick freak."
MandrakeSoft     |             --
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Jul 23 2001 - 21:00:09 EST