Re: [PATCH] arch/c6x: new architecture port for linux

From: Arnd Bergmann
Date: Thu Jun 16 2011 - 10:02:46 EST


On Thursday 16 June 2011, Mark Salter wrote:
> On Sat, 2011-05-21 at 19:10 +0200, Arnd Bergmann wrote:
> > - Do not use __raw_readl/__raw_writel.
> >
> > - Remove your IO_ADDRESS(), __REG, VULP, __SYSREG and __SYSREGA.
> > Replace them with proper use of ioremap().
>
> If not __raw_readl/__raw_writel, what is the best way to access memory
> mapped device registers on a bus that does the endian conversion in
> hardware? I still need the endian conversion for devices on PCI bus.

The best option is to define a bus specific set of accessors that you
can use in the device drivers for that bus and that have well-defined
semantics regarding ordering and endianess.

Typically what happens is that at some point some hardware developer
decides to reuse a piece of logic with the opposite endianess (e.g.
when the same logic is connected to multiple CPUs), so better define
the endianess of the bus independent of the CPU and have a separate
Kconfig option for that.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/