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

Graeme Russ graeme.russ at gmail.com
Wed Jun 15 15:03:38 CEST 2011


Hi Wolfgang,

On 15/06/11 22:51, Wolfgang Denk wrote:
> Dear Graeme Russ,
> 
> In message <4DF8A8CF.5000308 at 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);
> 

Well the funny thing is, I find the former more obvious than the later ;)
(but that's because I am not familiar with clrsetbits*) - But yes, 'I get it'

Regards,

Graeme


More information about the U-Boot mailing list