another endianness issue...

Timothy A. Seufert tas at mindspring.com
Sun Jun 24 04:19:01 EST 2001


At 11:29 AM +0200 6/23/01, Guillaume Laurès wrote:

>And I guess on ppc we would need all the bits line reversed.
>
>So, my question is how to handle this in the best approach, the goal
>being a unified driver nt too difficult to maintain

Kill the struct definition, and replace it with a bunch of accessor
macros that mask-and-shift.  When moving the register value to or
from the hardware, use le32_to_cpu() and cpu_to_le32() as appropriate.

Bitfields are not a good way to describe hardware registers.

   Tim Seufert

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list