2000-08-21 15:05:47 +00:00
|
|
|
#ifndef _LINUX_BITOPS_H
|
|
|
|
#define _LINUX_BITOPS_H
|
|
|
|
|
2008-08-15 01:29:51 +00:00
|
|
|
#ifdef __U_BOOT__
|
|
|
|
#define BIT(nr) (1UL << (nr))
|
|
|
|
#define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
|
|
|
|
#define BIT_WORD(nr) ((nr) / BITS_PER_LONG)
|
|
|
|
#define BITS_PER_BYTE 8
|
|
|
|
#define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))
|
|
|
|
#endif
|
2000-08-21 15:05:47 +00:00
|
|
|
|
2007-10-15 16:01:30 +00:00
|
|
|
#include <asm/bitops.h>
|
2000-08-21 15:05:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
#endif
|