[PATCH] arm/io.h: add macros to read/write big/little endian register

Russell King - ARM Linux linux at arm.linux.org.uk
Thu Feb 23 06:30:37 EST 2012


On Thu, Feb 23, 2012 at 11:19:06AM +0000, Russell King - ARM Linux wrote:
> On Thu, Feb 23, 2012 at 04:23:11PM +0530, Viresh Kumar wrote:
> > On 2/23/2012 3:23 PM, Russell King - ARM Linux wrote:
> > > 1. Using the PCI/ISA IO macros for non-PCI/ISA IO purposes is silly
> > 
> > We mistakenly placed it outside #ifdef __io, #endif
> > Sorry, i am still missing your point.
> 
> inb() et.al. are for PCI/ISA IO, not for general platform MMIO.
> 
> > > 2. We should have readb_be() etc instead.
> > 
> > Actually, existing drivers are using out_be32(), etc in their implementation.
> > What do you suggest in order to use these drivers for SPEAr/ARM.
> 
> Which drivers?

I see, some PPC folk allowed their private IO accessors to spread into
generic drivers despite a comment in their io.h saying that they shouldn't.

The right solution is that this crap needs to get fixed, rather than
spreading around yet another IO accessor which was supposed to be private
to an arch.  I've mailed the PPC folk about it.



More information about the linux-arm-kernel mailing list