summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2015-11-05 12:43:40 -0200
committerTom Rini <trini@konsulko.com>2015-11-05 16:47:05 -0500
commit2d2f490dd594a9a3fcf3649f572e910771007962 (patch)
tree56c3aa67cae4dd85e681e437f931951c54ba15da /arch/powerpc/include/asm
parentf8fdb81f6cbf9387fee7a8ab82b315798a7038ba (diff)
downloadblackbird-obmc-uboot-2d2f490dd594a9a3fcf3649f572e910771007962.tar.gz
blackbird-obmc-uboot-2d2f490dd594a9a3fcf3649f572e910771007962.zip
powerpc: Remove __ilog2_u64 and ffs4 from bitops
Remove __ilog2_u64 and ffs4 from powerpc bitops to align with the kernel implementation. Use the generic __ffs64 instead of a custom powerpc implementation. Cc: York Sun <yorksun@freescale.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Jagan Teki <jteki@openedev.com>
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r--arch/powerpc/include/asm/bitops.h11
-rw-r--r--arch/powerpc/include/asm/fsl_law.h1
-rw-r--r--arch/powerpc/include/asm/fsl_srio.h2
3 files changed, 4 insertions, 10 deletions
diff --git a/arch/powerpc/include/asm/bitops.h b/arch/powerpc/include/asm/bitops.h
index a6bcf3c3fe..14217ef751 100644
--- a/arch/powerpc/include/asm/bitops.h
+++ b/arch/powerpc/include/asm/bitops.h
@@ -6,6 +6,7 @@
#define _PPC_BITOPS_H
#include <asm/byteorder.h>
+#include <asm-generic/bitops/__ffs.h>
extern void set_bit(int nr, volatile void *addr);
extern void clear_bit(int nr, volatile void *addr);
@@ -209,16 +210,6 @@ static inline int fls64(__u64 x)
#error BITS_PER_LONG not 32 or 64
#endif
-static inline int __ilog2_u64(u64 n)
-{
- return fls64(n) - 1;
-}
-
-static inline int ffs64(u64 x)
-{
- return __ilog2_u64(x & -x) + 1ull;
-}
-
#ifdef __KERNEL__
/*
diff --git a/arch/powerpc/include/asm/fsl_law.h b/arch/powerpc/include/asm/fsl_law.h
index 3b504875e0..8e1d22adef 100644
--- a/arch/powerpc/include/asm/fsl_law.h
+++ b/arch/powerpc/include/asm/fsl_law.h
@@ -10,6 +10,7 @@
#define _FSL_LAW_H_
#include <asm/io.h>
+#include <linux/log2.h>
#define LAW_EN 0x80000000
diff --git a/arch/powerpc/include/asm/fsl_srio.h b/arch/powerpc/include/asm/fsl_srio.h
index e5aab2a71f..ec25e16829 100644
--- a/arch/powerpc/include/asm/fsl_srio.h
+++ b/arch/powerpc/include/asm/fsl_srio.h
@@ -7,6 +7,8 @@
#ifndef _FSL_SRIO_H_
#define _FSL_SRIO_H_
+#include <linux/log2.h>
+
enum atmu_size {
ATMU_SIZE_4K = 0xb,
ATMU_SIZE_8K,
OpenPOWER on IntegriCloud