[U-Boot] [RESEND PATCH v2 1/5] Tegra2: Add macros to calculate bitfield shifts and masks
Wolfgang Denk
wd at denx.de
Mon Jul 11 08:13:37 CEST 2011
Dear Simon Glass,
In message <1309884558-7700-2-git-send-email-sjg at chromium.org> you wrote:
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
> Changes in v2:
> - Removed all bitfield access macros
As Albert already pointed out, this is actually a misleading
description.
> + * You use these to reliably create shifts and masks from a bit field
> + * definition. Bit fields are defined like this:
> + *
> + * #define NAME_BITS MSB : LSB
> + *
> + * where MSB is the most significant bit, and LSB the least sig, bit. This
> + * notation is chosen since it is commonly used in CPU / SOC datasheets.
> + *
> + * For example:
> + *
> + * #define UART_FBCON_BITS 5:3 Bit range for the FBCON field
As explained a number of times before, any code like this is not
portable and therefore always carries the risk of hard to find bugs.
We therefore do not accept any such code in U-Boot. NAK. Sorry.
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: wd at denx.de
I wish Captain Vimes were here. He wouldn't have known what to do
either, but he's got a much better vocabulary to be baffled in.
- Terry Pratchett, _Guards! Guards!_
More information about the U-Boot
mailing list