summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-06-12 06:07:32 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-06-12 08:28:04 +0200
commita10366acd8e509cb65c8645775325c882ba5a55a (patch)
treef3842f04e231fca00e95b052c03bbfb66b2eadcc
parente7b23c6a9df57b5c8bba4fa9c10f8b5f793745cc (diff)
downloadbarebox-a10366acd8e509cb65c8645775325c882ba5a55a.tar.gz
barebox-a10366acd8e509cb65c8645775325c882ba5a55a.tar.xz
ARM: i.MX6: bbu nand: Move to common place
The code can be used on i.MX28 aswell, so move it to a common place. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/mach-imx/Kconfig9
-rw-r--r--arch/arm/mach-imx/Makefile1
-rw-r--r--arch/arm/mach-imx/include/mach/bbu.h9
-rw-r--r--common/Kconfig8
-rw-r--r--common/Makefile1
-rw-r--r--common/imx-bbu-nand-fcb.c (renamed from arch/arm/mach-imx/imx6-bbu-nand.c)0
-rw-r--r--include/bbu.h9
7 files changed, 18 insertions, 19 deletions
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index c713477701..812a9f9ecd 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -112,15 +112,6 @@ config BAREBOX_UPDATE_IMX_EXTERNAL_NAND
depends on MTD_WRITE
default y
-config BAREBOX_UPDATE_IMX6_NAND
- bool
- depends on ARCH_IMX6
- depends on BAREBOX_UPDATE
- depends on MTD
- depends on MTD_WRITE
- depends on NAND_MXS
- default y
-
comment "Freescale i.MX System-on-Chip"
config ARCH_IMX1
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index ae953b1bf8..0c8ca4b9d7 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -21,6 +21,5 @@ obj-y += devices.o imx.o esdctl.o
obj-y += boot.o
obj-$(CONFIG_BAREBOX_UPDATE) += imx-bbu-internal.o
obj-$(CONFIG_BAREBOX_UPDATE_IMX_EXTERNAL_NAND) += imx-bbu-external-nand.o
-obj-$(CONFIG_BAREBOX_UPDATE_IMX6_NAND) += imx6-bbu-nand.o
pbl-y += esdctl.o
lwl-y += cpu_init.o
diff --git a/arch/arm/mach-imx/include/mach/bbu.h b/arch/arm/mach-imx/include/mach/bbu.h
index 5eb9a47363..8039091395 100644
--- a/arch/arm/mach-imx/include/mach/bbu.h
+++ b/arch/arm/mach-imx/include/mach/bbu.h
@@ -75,15 +75,6 @@ static inline int imx_bbu_external_nor_register_handler(const char *name, char *
}
#endif
-#if defined(CONFIG_BAREBOX_UPDATE_IMX6_NAND)
-int imx6_bbu_nand_register_handler(const char *name, unsigned long flags);
-#else
-static inline int imx6_bbu_nand_register_handler(const char *name, unsigned long flags)
-{
- return -ENOSYS;
-}
-#endif
-
#if defined(CONFIG_BAREBOX_UPDATE_IMX_EXTERNAL_NAND)
int imx_bbu_external_nand_register_handler(const char *name, char *devicefile,
unsigned long flags);
diff --git a/common/Kconfig b/common/Kconfig
index 1c5d14c1c0..0ebfe1e070 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -94,6 +94,14 @@ config EFI_DEVICEPATH
config FILE_LIST
bool
+config BAREBOX_UPDATE_IMX_NAND_FCB
+ bool
+ depends on ARCH_IMX6
+ depends on BAREBOX_UPDATE
+ depends on MTD_WRITE
+ depends on NAND_MXS
+ default y
+
menu "General Settings"
config LOCALVERSION
diff --git a/common/Makefile b/common/Makefile
index 2738238c67..74801f7e28 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -52,6 +52,7 @@ lwl-$(CONFIG_IMD) += imd-barebox.o
obj-$(CONFIG_IMD) += imd.o
obj-$(CONFIG_FILE_LIST) += file-list.o
obj-$(CONFIG_FIRMWARE) += firmware.o
+obj-$(CONFIG_BAREBOX_UPDATE_IMX_NAND_FCB) += imx-bbu-nand-fcb.o
quiet_cmd_pwd_h = PWDH $@
ifdef CONFIG_PASSWORD
diff --git a/arch/arm/mach-imx/imx6-bbu-nand.c b/common/imx-bbu-nand-fcb.c
index d2bfedbad5..d2bfedbad5 100644
--- a/arch/arm/mach-imx/imx6-bbu-nand.c
+++ b/common/imx-bbu-nand-fcb.c
diff --git a/include/bbu.h b/include/bbu.h
index 4a3d35e7ce..c5f22be7ae 100644
--- a/include/bbu.h
+++ b/include/bbu.h
@@ -50,4 +50,13 @@ static inline int bbu_register_handler(struct bbu_handler *unused)
#endif
+#if defined(CONFIG_BAREBOX_UPDATE_IMX_NAND_FCB)
+int imx6_bbu_nand_register_handler(const char *name, unsigned long flags);
+#else
+static inline int imx6_bbu_nand_register_handler(const char *name, unsigned long flags)
+{
+ return -ENOSYS;
+}
+#endif
+
#endif /* __INCLUDE_BBU_H */