summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-08-21 21:49:51 +0200
committerHans de Goede <hdegoede@redhat.com>2015-08-31 08:43:42 +0200
commitd90ba790d8ae40c39d9e359dc71df16911b7bdb3 (patch)
tree40aa93444ff41c7f191ae42e5a13294b8a696916
parentddd37fe865bee8b17842a55ab917ae597fe8af0d (diff)
downloadu-boot-imx-d90ba790d8ae40c39d9e359dc71df16911b7bdb3.zip
u-boot-imx-d90ba790d8ae40c39d9e359dc71df16911b7bdb3.tar.gz
u-boot-imx-d90ba790d8ae40c39d9e359dc71df16911b7bdb3.tar.bz2
mtd: nand: Make CONFIG_SYS_NAND_U_BOOT_OFFS configurable through Kconfig
Make CONFIG_SYS_NAND_U_BOOT_OFFS configurable through Kconfig, just like SYS_NAND_BUSWIDTH_16BIT this is only enabled on some SoCs using depends, to avoid double defining it for SoCs which have not yet moved to Kconfig for this. Having this in Kconfig is useful because this is something which may differ from one board to the other even when using the same SoC. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk> Acked-by: Scott Wood <scottwood@freescale.com>
-rw-r--r--drivers/mtd/nand/Kconfig9
-rw-r--r--include/configs/sunxi-common.h1
2 files changed, 9 insertions, 1 deletions
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index c34c234..9a74064 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -92,6 +92,15 @@ config SYS_NAND_BUSWIDTH_16BIT
not available while configuring controller. So a static CONFIG_NAND_xx
is needed to know the device's bus-width in advance.
+# Enhance depends when converting drivers to Kconfig which use this config
+config SYS_NAND_U_BOOT_OFFS
+ hex "Location in NAND to read U-Boot from"
+ default 0x8000 if NAND_SUNXI
+ depends on NAND_SUNXI
+ help
+ Set the offset from the start of the nand where u-boot should be
+ loaded from.
+
if SPL
config SPL_NAND_DENALI
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 519c99c..5c65a89 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -139,7 +139,6 @@
#ifdef CONFIG_NAND_SUNXI
#define CONFIG_SPL_NAND_SUPPORT 1
-#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x008000
#endif
/* mmc config */