[PATCH 1/3] ARM: CSR: Adding CSR SiRFprimaII board support

Nicolas Pitre nico at fluxnic.net
Wed Jul 6 12:35:54 EDT 2011


On Wed, 6 Jul 2011, Arnd Bergmann wrote:
> On Wednesday 06 July 2011, Russell King - ARM Linux wrote:
> > I shall be making this change to asm/io.h shortly:
> > 
> >  #include <mach/io.h>
> > 
> > +/*
> > + * This is the limit of PCI/ISA/PC card IO space, which is by default
> > + * 64K if we have PC card, PCI or ISA support.  Otherwise, default to
> > + * zero to prevent ISA/PCI drivers claiming IO space (and potentially
> > + * oopsing.)
> > + *
> > + * Only set this larger if you really need inb() et.al. to operate over
> > + * a larger address space (eg, for multiple MMIO-mapped PC card sockets
> > + * as found on SA11x0 and PXA.)
> > + */
> > +#ifndef IO_SPACE_LIMIT
> > +#if defined(CONFIG_PCI) || defined(CONFIG_ISA) || defined(CONFIG_PCCARD)
> > +#define IO_SPACE_LIMIT ((resource_size_t)0xffff)
> > +#else
> > +#define IO_SPACE_LIMIT ((resource_size_t)0)
> > +#endif
> > +#endif
> 
> Good idea. The related change that I want to do is to conditionalize
> all drivers that require PC-style I/O on the respective bus they
> use, so we can also remove the __io macro for platforms that don't
> need it and catch all drivers using inb/outb at compile time.

In the spirit of removing as much machine specific and globally used 
defines (see my patch series removing a bunch of mach/memory.h 
instances), I'd like to see a solution that would make IO_SPACE_LIMIT 
into a variable, or having the same definition with a fixed mapping, for 
as many SOCs as possible.


Nicolas



More information about the linux-arm-kernel mailing list