summaryrefslogtreecommitdiffstats
path: root/arch/ppc/mach-mpc85xx
diff options
context:
space:
mode:
authorRenaud Barbier <renaud.barbier@ge.com>2014-01-29 11:06:50 +0000
committerSascha Hauer <s.hauer@pengutronix.de>2014-01-30 08:42:53 +0100
commitb99e853aff4dc6f442e62a8187de04877877c4b1 (patch)
treee7fe7cd3c053e55e9096b8806c5c72d8f0a4fab7 /arch/ppc/mach-mpc85xx
parent278850a4421ab7cdfd271a6b8e774c77e154e9d0 (diff)
downloadbarebox-b99e853aff4dc6f442e62a8187de04877877c4b1.tar.gz
barebox-b99e853aff4dc6f442e62a8187de04877877c4b1.tar.xz
ppc: remove bit operation headers file conflict
Removed the ppc bit operation functions and definitions in the ppc file asm/bitops.h since these are already defined in the asm-generic header files. Moved ffs64 definition to the mpc85xx header files because the function requires the inclusion of linux/log2.h which also includes asm/bitops.h. The conflict was noted when UBIFS was enabled in barebox. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/ppc/mach-mpc85xx')
-rw-r--r--arch/ppc/mach-mpc85xx/fsl_law.c1
-rw-r--r--arch/ppc/mach-mpc85xx/include/mach/ffs64.h20
2 files changed, 21 insertions, 0 deletions
diff --git a/arch/ppc/mach-mpc85xx/fsl_law.c b/arch/ppc/mach-mpc85xx/fsl_law.c
index 34c039de86..38902e3be8 100644
--- a/arch/ppc/mach-mpc85xx/fsl_law.c
+++ b/arch/ppc/mach-mpc85xx/fsl_law.c
@@ -24,6 +24,7 @@
#include <common.h>
#include <asm/config.h>
#include <asm/fsl_law.h>
+#include <mach/ffs64.h>
#define FSL_HW_NUM_LAWS FSL_NUM_LAWS
diff --git a/arch/ppc/mach-mpc85xx/include/mach/ffs64.h b/arch/ppc/mach-mpc85xx/include/mach/ffs64.h
new file mode 100644
index 0000000000..045498c513
--- /dev/null
+++ b/arch/ppc/mach-mpc85xx/include/mach/ffs64.h
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2013 GE Intelligent Platforms, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+#include <linux/log2.h>
+
+static inline int ffs64(u64 x)
+{
+ return __ilog2_u64(x & -x) + 1ull;
+}