PCMCIA fun

Richard Zidlicky rz at linux-m68k.org
Thu Mar 18 11:50:48 GMT 2004


On Thu, Mar 18, 2004 at 10:48:21AM +0100, Kars de Jong wrote:
> On Thu, 2004-03-18 at 10:14, Geert Uytterhoeven wrote:
> > On Wed, 17 Mar 2004, Kars de Jong wrote:
> > > - drivers/pcmcia/rsrc_mgr.c:
> > >   Uses readl() on ioremapped() PCMCIA common memory, but we don't define
> > >   readl() unless CONFIG_PCI is defined. I added isa_readl() and
> > >   isa_writel() and defined readl() and writel() to use those when
> > >   CONFIG_ISA is enabled. Gayle can handle these just fine, I don't know
> > >   how to define isa_mtl() for CONFIG_Q40 and CONFIG_GG2 though. Richard?
> > 
> > That's a bug in rsrc_mgr.c: since PCMCIA is ISA, it should use isa_readl()
> > instead of readl().
> 
> I don't think so: isa_read{b,w,l}() are for backwards compatibility when
> not using an ioremapped() address.
> 
> readl{b,w,l}() should be legal on any value returned by ioremap()
> according to Documentation/DocBook/deviceiobook.tmpl:
> 
> <quote>
> ISA legacy functions
> 
> On older kernels (2.2 and earlier) the ISA bus could be read or       
> written with these functions and without ioremap being used. This is no
> longer true in Linux 2.4. A set of equivalent functions exist for easy
> legacy driver porting. The functions available are prefixed with 'isa_'
> and are isa_readb, isa_writeb, isa_readw, isa_writew, isa_readl,
> isa_writel, isa_memcpy_fromio and isa_memcpy_toio.

so far, every time I stumbled over a readl in a driver it was a missing
CONFIG_PCI.

Richard



More information about the linux-pcmcia mailing list