summaryrefslogtreecommitdiffstats
path: root/include/linux/bitops.h
blob: 127c1619fec7c112c5e873e7e5ccf36dca9e8b3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#ifndef _LINUX_BITOPS_H
#define _LINUX_BITOPS_H

#ifdef __BAREBOX__
#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

#include <asm/bitops.h>


#endif