summaryrefslogtreecommitdiff
path: root/include/asm-nios2
diff options
context:
space:
mode:
authorSimon Kagstrom <simon.kagstrom@netinsight.net>2009-08-24 09:10:12 +0200
committerTom Rix <Tom.Rix@windriver.com>2009-10-03 09:04:26 -0500
commitc1d1bfa583ee8cb9073eba05f718b33c33c06296 (patch)
tree5f0f0f2a5d7b204c5228565f87083e5e58edd469 /include/asm-nios2
parentf83ab09566980fef4a3b37f6128b96b2bf91412a (diff)
downloadu-boot-imx-c1d1bfa583ee8cb9073eba05f718b33c33c06296.zip
u-boot-imx-c1d1bfa583ee8cb9073eba05f718b33c33c06296.tar.gz
u-boot-imx-c1d1bfa583ee8cb9073eba05f718b33c33c06296.tar.bz2
Define ffs/fls for all architectures
UBIFS requires fls(), which is not defined for arm (and some other architectures) and this patch adds it. The implementation is taken from Linux and is generic. ffs() is also defined for those that miss it. Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Diffstat (limited to 'include/asm-nios2')
-rw-r--r--include/asm-nios2/bitops.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-nios2/bitops.h b/include/asm-nios2/bitops.h
index e6c1a85..b01a89d 100644
--- a/include/asm-nios2/bitops.h
+++ b/include/asm-nios2/bitops.h
@@ -33,5 +33,6 @@ extern int test_and_set_bit(int nr, volatile void * a);
extern int test_and_change_bit(int nr, volatile void * addr);
extern int test_bit(int nr, volatile void * a);
extern int ffs(int i);
+#define ffs
#endif /* __ASM_NIOS2_BITOPS_H */