Dear Anton Staaf, In message <caf6fiovcfgxzep7dhgxyr+cjaf0nq8lybxkveaqycz8noos...@mail.gmail.com> you wrote: > > That makes sense to me. Would an alternative that uses the "width" and > "size" of the field be acceptable? Then there is a well understood (on both > types of architectures) mapping from these values to the mask and shift > required to access portions of a register and/or variable in memory.
"width" and "size" seem indentical to me here. Do you mean "width" and "offset" or so? The problem still remains. People who are used to number bits from left to right will also tend to count bit offsets in the same direction. In the end, the most simple and truly portable way is specifying the masks directly. What's wrong with definitions like #define SCFR1_IPS_DIV_MASK 0x03800000 #define SCFR1_PCI_DIV_MASK 0x00700000 #define SCFR1_LPC_DIV_MASK 0x00003800 etc.? I can actually read these much faster that any of these bit field definitions. > --00504502e3b9570ace04a7e593ca > Content-Type: text/html; charset=ISO-8859-1 > Content-Transfer-Encoding: quoted-printable Please stop posting HTML. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de News is what a chap who doesn't care much about anything wants to read. And it's only news until he's read it. After that it's dead. - Evelyn Waugh _Scoop_ (1938) bk. 1, ch. 5 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot