[U-Boot] [PATCH] Convert CONFIG_MTDIDS et al to Kconfig for Logic PD Boards

Adam Ford aford173 at gmail.com
Mon Oct 16 21:45:59 UTC 2017


This converts the following to Kconfig:
   CONFIG_MTDIDS
   CONFIG_MTDPARTS

For am3517_evm, omap3_logic, and da850evm variants.

Signed-off-by: Adam Ford <aford173 at gmail.com>
---
 configs/am3517_evm_defconfig      |  2 ++
 configs/da850_am18xxevm_defconfig |  3 +++
 configs/da850evm_defconfig        |  2 ++
 configs/omap3_logic_defconfig     |  2 ++
 include/configs/am3517_evm.h      | 12 ++----------
 include/configs/da850evm.h        |  6 ------
 include/configs/omap3_logic.h     | 11 ++---------
 7 files changed, 13 insertions(+), 25 deletions(-)

diff --git a/configs/am3517_evm_defconfig b/configs/am3517_evm_defconfig
index 22493d2..a738474 100644
--- a/configs/am3517_evm_defconfig
+++ b/configs/am3517_evm_defconfig
@@ -27,6 +27,8 @@ CONFIG_CMD_NAND=y
 # CONFIG_CMD_MII is not set
 CONFIG_CMD_CACHE=y
 # CONFIG_CMD_TIME is not set
+CONFIG_MTDIDS_DEFAULT="nand0=omap2-nand.0"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=omap2-nand.0:512k(MLO),1920k(u-boot),256k(u-boot-env),8m(kernel),512k(dtb),-(rootfs)"
 CONFIG_CMD_UBI=y
 CONFIG_SPL_PARTITION_UUIDS=y
 CONFIG_OF_CONTROL=y
diff --git a/configs/da850_am18xxevm_defconfig b/configs/da850_am18xxevm_defconfig
index 824c383..c852da9 100644
--- a/configs/da850_am18xxevm_defconfig
+++ b/configs/da850_am18xxevm_defconfig
@@ -29,6 +29,9 @@ CONFIG_CRC32_VERIFY=y
 # CONFIG_CMD_TIME is not set
 # CONFIG_CMD_EXT4 is not set
 # CONFIG_CMD_FS_GENERIC is not set
+CONFIG_CMD_MTDPARTS=y
+CONFIG_MTDIDS_DEFAULT="nor0=spi0.0"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=spi0.0:512k(u-boot.ais),64k(u-boot-env),7552k(kernel-spare),64k(MAC-Address)"
 CONFIG_CMD_DIAG=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig
index 3089b93..067ddd7 100644
--- a/configs/da850evm_defconfig
+++ b/configs/da850evm_defconfig
@@ -29,6 +29,8 @@ CONFIG_CRC32_VERIFY=y
 # CONFIG_CMD_EXT4 is not set
 # CONFIG_CMD_FS_GENERIC is not set
 CONFIG_CMD_MTDPARTS=y
+CONFIG_MTDIDS_DEFAULT="nor0=spi0.0"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=spi0.0:512k(u-boot.ais),64k(u-boot-env),7552k(kernel-spare),64k(MAC-Address)"
 CONFIG_CMD_DIAG=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
diff --git a/configs/omap3_logic_defconfig b/configs/omap3_logic_defconfig
index 3352933..449b52c 100644
--- a/configs/omap3_logic_defconfig
+++ b/configs/omap3_logic_defconfig
@@ -23,6 +23,8 @@ CONFIG_CMD_SPL_NAND_OFS=0x240000
 CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_LOCK_UNLOCK=y
 CONFIG_CMD_CACHE=y
+CONFIG_MTDIDS_DEFAULT="nand0=omap2-nand.0"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=omap2-nand.0:512k(MLO),1792k(u-boot),128k(spl-os),128k(u-boot-env),6m(kernel),-(fs)"
 CONFIG_CMD_UBI=y
 CONFIG_ISO_PARTITION=y
 CONFIG_OF_CONTROL=y
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index 9ca5fef..9efd9eb 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -107,14 +107,6 @@
  *  DTB                  4 * NAND_BLOCK_SIZE = 512 KiB  @ 0xAA0000
  *  RootFS              Remaining Flash Space           @ 0xB20000
  */
-#define MTDIDS_DEFAULT "nand0=omap2-nand.0"
-#define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:"	\
-	"512k(MLO),"					\
-	"1920k(u-boot),"				\
-	"256k(u-boot-env),"				\
-	"8m(kernel),"					\
-	"512k(dtb),"					\
-	"-(rootfs)"
 #else
 #define MTDIDS_DEFAULT
 #define MTDPARTS_DEFAULT
@@ -133,8 +125,8 @@
 	"bootenv=uEnv.txt\0" \
 	"cmdline=\0" \
 	"optargs=\0" \
-	"mtdids=" MTDIDS_DEFAULT "\0" \
-	"mtdparts=" MTDPARTS_DEFAULT "\0" \
+	"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
+	"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
 	"mmcdev=0\0" \
 	"mmcpart=1\0" \
 	"mmcroot=/dev/mmcblk0p2 rw\0" \
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index 821b1fe..676562f 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -253,12 +253,6 @@
 #endif
 #define CONFIG_MTD_DEVICE		/* needed for mtdparts commands */
 #define CONFIG_MTD_PARTITIONS		/* required for UBI partition support */
-#define MTDIDS_DEFAULT			"nor0=spi0.0"
-#define MTDPARTS_DEFAULT		"mtdparts=spi0.0:"\
-						"512k(u-boot.ais),"\
-						"64k(u-boot-env),"\
-						"7552k(kernel-spare),"\
-						"64k(MAC-Address)"
 #endif
 
 /*
diff --git a/include/configs/omap3_logic.h b/include/configs/omap3_logic.h
index 1bb6878..ab6461d 100644
--- a/include/configs/omap3_logic.h
+++ b/include/configs/omap3_logic.h
@@ -88,13 +88,6 @@
 #define CONFIG_SYS_NAND_MAX_ECCPOS	56
 #define CONFIG_MTD_DEVICE		/* needed for mtdparts commands */
 #define CONFIG_MTD_PARTITIONS		/* required for UBI partition support */
-#define MTDIDS_DEFAULT			"nand0=omap2-nand.0"
-#define MTDPARTS_DEFAULT	"mtdparts=omap2-nand.0:"\
-							"512k(MLO),"\
-							"1792k(u-boot),"\
-							"128k(spl-os)," \
-							"128k(u-boot-env),"\
-							"6m(kernel),-(fs)"
 #endif
 
 /* Environment information */
@@ -106,8 +99,8 @@
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	DEFAULT_LINUX_BOOT_ENV \
-	"mtdids=" MTDIDS_DEFAULT "\0"	\
-	"mtdparts=" MTDPARTS_DEFAULT "\0" \
+	"mtdids=" CONFIG_MTDIDS_DEFAULT "\0"	\
+	"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
 	"mmcdev=0\0" \
 	"mmcroot=/dev/mmcblk0p2 rw\0" \
 	"mmcrootfstype=ext4 rootwait\0" \
-- 
2.7.4



More information about the U-Boot mailing list