On Tuesday, June 07, 2011 06:06:23 Wolfgang Denk wrote:
>       #define FIELD_VAL(x)    (x << 16)
>       #define FIELD_MASK      FIELD_VAL(0xF)

this is basically what we do in the blackfin port.  we keep most of the logic 
in the defines so that we can use the simpler i/o logic without too much 
hassle.

the only additional thing we do is add a define for the shift in case we need 
to do something the macros cant provide.
#define FIELD_SHIFT     16
#define FIELD_VAL(x)    ((x) << FIELD_SHIFT)
#define FIELD_MASK      FIELD_FAL(0xF)
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to