[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121211165050.GU14363@n2100.arm.linux.org.uk>
Date: Tue, 11 Dec 2012 16:50:50 +0000
From: Russell King - ARM Linux <linux@....linux.org.uk>
To: Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
Cc: Arnd Bergmann <arnd@...db.de>, Lior Amsalem <alior@...vell.com>,
Andrew Lunn <andrew@...n.ch>,
Yehuda Yitschak <yehuday@...vell.com>,
Maen Suleiman <maen@...vell.com>,
Jason Cooper <jason@...edaemon.net>,
Tawfik Bayouk <tawfik@...vell.com>,
Stephen Warren <swarren@...dotorg.org>,
Thierry Reding <thierry.reding@...onic-design.de>,
linux-kernel@...r.kernel.org,
Jesse Barnes <jbarnes@...tuousgeek.org>,
Eran Ben-Avi <benavi@...vell.com>,
Nadav Haklai <nadavh@...vell.com>,
Paul Gortmaker <paul.gortmaker@...driver.com>,
Shadi Ammouri <shadi@...vell.com>,
Gregory Clement <gregory.clement@...e-electrons.com>,
Yinghai Lu <yinghai@...nel.org>,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [RFC v1 01/16] lib: devres: don't enclose pcim_*() functions
in CONFIG_HAS_IOPORT
On Tue, Dec 11, 2012 at 05:38:19PM +0100, Thomas Petazzoni wrote:
> Russell,
>
> On Tue, 11 Dec 2012 16:23:25 +0000, Russell King - ARM Linux wrote:
>
> > > * ARCH_VEXPRESS should not select NO_IOPORT. It's generally wrong
> > > to select this in combination with ARCH_MULTIPLATFORM, when some
> > > of the other platforms you may enable actually have IOPORT mapping
> > > support.
> >
> > No. ARCH_VEXPRESS selects NO_IOPORT because it _does_ _not_ support
> > PCI/ISA IO space. That in itself is reasonable, but what isn't
> > reasonable is the _negative_ logic being used. Negative logic in
> > the config system always tends to provoke this kind of sillyness
> > because you're selecting something to be excluded which another
> > platform may require.
>
> Could you enlighten my very naive understanding of things about PCI/ISA
> IO space? On x86, I seem to understand this is the separate address
> space accessed by the special in/out CPU instructions. Are there ARM
> platforms with the same sort of things?
>
> As far as I understand, on my ARM Marvell system, everything is
> memory-mapped, so there isn't such a separate PCI/ISA IO space.
>
> Therefore, why would I need to "select HAVE_IOPORT" simply to be able
> to build libata-sff.c, that is used for PCI drivers that work fine with
> purely memory-mapped registers?
- PCI buses make the distinction between memory accesses and IO accesses.
- ARM doesn't have IO access instructions; everything is memory mapped.
- In order to make the two work together, whatever PCI interface provides
a way to issue IO accesses via a contiguous memory mapped region.
- The PCI layer and drivers are written to keep these two spaces separate
so that they remain portable across multiple different platforms.
Therefore, if you have PCI/ISA drivers that make use of IO space, you need
to provide the IO space accessors and mapping functions so that these
drivers can access the IO space on their devices in a platform independent
manner.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists