Re: [PATCH] ppc64: Fix __raw_* IO accessors

From: Benjamin Herrenschmidt
Date: Thu Sep 23 2004 - 18:00:10 EST


On Fri, 2004-09-24 at 01:25, Petr Vandrovec wrote:

>
> Ok. Can somebody tell me what byte order should be used for framebuffer
> and for MMIO on PPC/PPC64 then? From cfb* it seems that framebuffer
> have to be in big-endian mode, and from Xorg code it seems that MMIO should
> be always in little-endian. Yes?

I don't know exactly what X.org does ...

In general, on a PCI bus, we expect MMIO to be little endian. Some cards
try to be "smart" and have an endian swap facility for MMIO (like nvidia,
and I think matrox) but I tend to consider that useless since it force us
to have different IO accessors or to add an "un-byteswap" macro. The PPC
is very good at doing byteswapped accesses with one instruction so it
isn't really a waste to do all MMIOs littel endian anyway.

For the framebuffer, it's common practice to have it in big endian format
(and using the proper byteswap register for the access bit depth)

Ben.


-
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/