[U-Boot] [PATCH v3 02/10] armv7: add miscellaneous utility macros

Wolfgang Denk
2011-06-15T12:51:50Z

Dear Graeme Russ,

In message <4DF8A8CF.5000308@gmail.com> you wrote:
>
> And to set the value then you have:
>
> reg &= ~a_mask; /* Clear a_val */
> reg |= (a_val << a_shift) & a_mask; /* Set new a_val */

This could be done using

clrsetbits_le32(&reg, a_mask, a_val << a_shift);

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@denx.de
I think animal testing is a terrible idea; they get all nervous and
give the wrong answers.