lkml.org 
[lkml]   [2022]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [RFC v2 25/39] pcmcia: add HAS_IOPORT dependencies
Date
From: Arnd Bergmann
> Sent: 04 May 2022 11:33
>
> On Wed, May 4, 2022 at 1:38 AM Bjorn Helgaas <helgaas@kernel.org> wrote:
> > On Fri, Apr 29, 2022 at 03:50:41PM +0200, Niklas Schnelle wrote:
> > > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> > > not being declared. PCMCIA devices are either LEGACY_PCI devices
> > > which implies HAS_IOPORT or require HAS_IOPORT.
> > >
> > > Acked-by: Dominik Brodowski <linux@dominikbrodowski.net>
> > > Co-developed-by: Arnd Bergmann <arnd@kernel.org>
> > > Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
> > > ---
> > > drivers/pcmcia/Kconfig | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig
> > > index 2ce261cfff8e..32b5cd324c58 100644
> > > --- a/drivers/pcmcia/Kconfig
> > > +++ b/drivers/pcmcia/Kconfig
> > > @@ -5,7 +5,7 @@
> > >
> > > menuconfig PCCARD
> > > tristate "PCCard (PCMCIA/CardBus) support"
> > > - depends on !UML
> > > + depends on HAS_IOPORT
> >
> > I don't know much about PC Card. Is there a requirement that these
> > devices must use I/O port space? If so, can you include a spec
> > reference in the commit log?
>
> I think for PCMCIA devices, the dependency makes sense because
> all device drivers for PCMCIA devices need I/O ports.

ISTR some PCMCIA linear non-volatile memory cards that only
supported memory accesses.
I'm pretty sure some didn't even decode config space properly.
(I bet none of them still work after 25 years though.)

I've used I/O addresses on pcmcia cards from sparc and ARM cpu.

> For cardbus, we can go either way, I don't see any reference to
> I/O ports in yenta_socket.c or the pccard core, so it would build
> fine with or without I/O ports.

cardbus is basically PCI.
I think you can find cardbus cards that have a pci bridge and a cable
link to an expansion chassis into which you can insert standard PCI cards.
If you are really lucky the initial enumeration allocates the
'high field' bus numbers, io addresses and plenty of memory
space to the bridge - otherwise you lose.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
\
 
 \ /
  Last update: 2022-05-04 16:45    [W:0.428 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site