]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
mtd: nand: Make CONFIG_SYS_NAND_U_BOOT_OFFS configurable through Kconfig
authorHans de Goede <hdegoede@redhat.com>
Fri, 21 Aug 2015 19:49:51 +0000 (21:49 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 10:19:14 +0000 (12:19 +0200)
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>
drivers/mtd/nand/Kconfig
include/configs/sunxi-common.h

index b0f4b50d42721b5d67973ef706e6d5a8021f40c9..9f68de3b6deb8a207036efbd9ff5c2e639abb299 100644 (file)
@@ -98,6 +98,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
index 519c99cdaa5d7ee9500e07e5837214c77e1e13f1..5c65a89c4a85a84d43a9bbefa2028c7df78a4abf 100644 (file)
 
 #ifdef CONFIG_NAND_SUNXI
 #define CONFIG_SPL_NAND_SUPPORT 1
-#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x008000
 #endif
 
 /* mmc config */