[U-Boot] [PATCH 2/3] Add generic bit operations

Daniel Mack daniel at caiaq.de
Thu Jun 4 13:54:42 CEST 2009


On Thu, Jun 04, 2009 at 01:47:17PM +0200, Wolfgang Denk wrote:
> > +static inline void clear_bit(int nr, volatile unsigned long *addr)
> > +{
> > +	unsigned long mask = BIT_MASK(nr);
> > +	unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr);
> > +
> > +	*p &= ~mask;
> > +}
> 
> Such code has no chance of being accepted anyway.
> 
> It tries to be generic and does not care if you use it on memory or
> device addresses - but for device addresses, the use of proper I/O
> accessor functions is mandatory.

And the functions I removed from asm-arm/bitops.h did that?



More information about the U-Boot mailing list