From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Mon, 8 Apr 2013 19:26:38 +0200 Subject: [U-Boot] [PATCH 7/8] mtd: nand: add driver for diskonchip g4 nand flash In-Reply-To: <5162F9F4.7030402@newsguy.com> References: <1365352865-2137-1-git-send-email-mikedunn@newsguy.com> <201304080825.01859.marex@denx.de> <5162F9F4.7030402@newsguy.com> Message-ID: <201304081926.38670.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Mike Dunn, > On 04/07/2013 11:25 PM, Marek Vasut wrote: > [..] > > > Try #ifdef U_BOOT instead of #if 0, no? > > Marek, can you clarify? Do you mean something like... > > #define U_BOOT > ... > #ifndef U_BOOT /* Currently u-boot does not have for_each_set_bit */ > unsigned long bits = ~buf[i]; > for_each_set_bit(bitnum, &bits, 8) { > ... > #else > uint8_t mask; > for(bitnum = 0, mask = 0x80; bitnum < 8; bitnum++, mask >>= 1) { > if (!(buf[i] & mask)) { > > ... > #endif Hrm, I always thought we had some __UBOOT__ defined, but apparently not :-( Best regards, Marek Vasut