Re: PCI and ioports question

Jeff Garzik (jgarzik@mandrakesoft.com)
Tue, 17 Jul 2001 12:21:23 -0400


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     |             -- goats.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/