Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 17 Jul 2001 12:22:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 17 Jul 2001 12:22:09 -0400 Received: from panic.ohr.gatech.edu ([130.207.47.194]:11239 "HELO havoc.gtf.org") by vger.kernel.org with SMTP id ; Tue, 17 Jul 2001 12:20:54 -0400 Message-ID: <3B546603.7ABCB96D@mandrakesoft.com> Date: Tue, 17 Jul 2001 12:21:23 -0400 From: Jeff Garzik Organization: MandrakeSoft X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.7-pre5 i686) X-Accept-Language: en MIME-Version: 1.0 To: daniel sheltraw Cc: linux-kernel@vger.kernel.org Subject: Re: PCI and ioports question In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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/