From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Mack Date: Thu, 4 Jun 2009 13:54:42 +0200 Subject: [U-Boot] [PATCH 2/3] Add generic bit operations In-Reply-To: <20090604114717.3763B832E416@gemini.denx.de> References: <1244111241-32735-1-git-send-email-daniel@caiaq.de> <1244111241-32735-2-git-send-email-daniel@caiaq.de> <1244111241-32735-3-git-send-email-daniel@caiaq.de> <20090604114717.3763B832E416@gemini.denx.de> Message-ID: <20090604115442.GI26688@buzzloop.caiaq.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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?