On Wed, 14 May 2008, Ben Dooks wrote:Well, what would the definition of the cookie passed to these raw MMIO access calls be then? They have to be used here, because SOC on-chip registers are accessed by the driver and therefore data transferred must never be swapped in any way. The internal registers always have the same numerical value (bit positions) regardless of the endianness configured when the SOC's on-chip CPU cores are reset. For the external buses the arrangement varies, for example the PCI interface is always little-endian and the Generic Bus is always big-endian. To access these, cooked MMIO calls would normally be used (these without a prefix) which swap bytes as necessary to preserve bit positions. The notable exception are PIO-style data transfers, such as ones used by some IDE drivers (including the GenBus one), where the ultimate destination is system memory (which is endian-neutral) and thus bit positions do not matter but addresses of individual bytes do -- __mem_xxx() calls have been defined for this purpose, which swap bytes as necessary. See include/asm-mips/mach-generic/mangle-port.h for details. Maciej --
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| David Newall | Re: Slow DOWN, please!!! |
| Andrew Morton | Re: Linux 2.6.21-rc4 |
git: | |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Dale Farnsworth | Re: [PATCH 01/39] mv643xx_eth: reverse topological sort of functions |
