[PATCH v2 1/2] configs: keystone2: Unwind KERNEL_MTD_PARTS definition

Andrew Davis afd at ti.com
Tue Jul 25 20:15:20 CEST 2023


This is more complex than it needs to be and makes converting these
boards over to plain text env files more difficult. Remove setting
mtdparts as the DTS already contain the partitions. While here also
drop the conflicting definitions from the K2 defconfigs.

Signed-off-by: Andrew Davis <afd at ti.com>
---

Changes for v2:
 - Remove mtdparts completely for K2

 configs/k2e_evm_defconfig            |  1 -
 configs/k2e_hs_evm_defconfig         |  1 -
 configs/k2g_evm_defconfig            |  1 -
 configs/k2g_hs_evm_defconfig         |  1 -
 configs/k2hk_evm_defconfig           |  1 -
 configs/k2hk_hs_evm_defconfig        |  1 -
 configs/k2l_evm_defconfig            |  1 -
 configs/k2l_hs_evm_defconfig         |  1 -
 include/configs/k2e_evm.h            |  4 ----
 include/configs/k2g_evm.h            |  3 ---
 include/configs/k2hk_evm.h           |  4 ----
 include/configs/k2l_evm.h            |  4 ----
 include/configs/ti_armv7_keystone2.h |  7 +------
 include/environment/ti/spi.h         | 14 --------------
 14 files changed, 1 insertion(+), 43 deletions(-)
 delete mode 100644 include/environment/ti/spi.h

diff --git a/configs/k2e_evm_defconfig b/configs/k2e_evm_defconfig
index 6d9d82594e1..44bed00ec97 100644
--- a/configs/k2e_evm_defconfig
+++ b/configs/k2e_evm_defconfig
@@ -58,7 +58,6 @@ CONFIG_CMD_NAND=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_BOOTP_DNS2=y
 CONFIG_MTDIDS_DEFAULT="nand0=davinci_nand.0"
-CONFIG_MTDPARTS_DEFAULT="mtdparts=davinci_nand.0:1024k(bootloader)ro,512k(params)ro,-(ubifs)"
 CONFIG_CMD_UBI=y
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
diff --git a/configs/k2e_hs_evm_defconfig b/configs/k2e_hs_evm_defconfig
index c782bf11830..55c0182f874 100644
--- a/configs/k2e_hs_evm_defconfig
+++ b/configs/k2e_hs_evm_defconfig
@@ -34,7 +34,6 @@ CONFIG_CMD_NAND=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_BOOTP_DNS2=y
 CONFIG_MTDIDS_DEFAULT="nand0=davinci_nand.0"
-CONFIG_MTDPARTS_DEFAULT="mtdparts=davinci_nand.0:1024k(bootloader)ro,512k(params)ro,-(ubifs)"
 CONFIG_CMD_UBI=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
diff --git a/configs/k2g_evm_defconfig b/configs/k2g_evm_defconfig
index 756e7502a19..45c7fade320 100644
--- a/configs/k2g_evm_defconfig
+++ b/configs/k2g_evm_defconfig
@@ -56,7 +56,6 @@ CONFIG_CMD_REMOTEPROC=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_BOOTP_DNS2=y
 CONFIG_MTDIDS_DEFAULT="nand0=davinci_nand.0"
-CONFIG_MTDPARTS_DEFAULT="mtdparts=davinci_nand.0:1024k(bootloader)ro,512k(params)ro,-(ubifs)"
 CONFIG_CMD_UBI=y
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
diff --git a/configs/k2g_hs_evm_defconfig b/configs/k2g_hs_evm_defconfig
index f0de3232e9d..54a980cab54 100644
--- a/configs/k2g_hs_evm_defconfig
+++ b/configs/k2g_hs_evm_defconfig
@@ -33,7 +33,6 @@ CONFIG_CMD_REMOTEPROC=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_BOOTP_DNS2=y
 CONFIG_MTDIDS_DEFAULT="nand0=davinci_nand.0"
-CONFIG_MTDPARTS_DEFAULT="mtdparts=davinci_nand.0:1024k(bootloader)ro,512k(params)ro,-(ubifs)"
 CONFIG_CMD_UBI=y
 CONFIG_OF_CONTROL=y
 CONFIG_OF_LIST="keystone-k2g-generic keystone-k2g-evm keystone-k2g-ice"
diff --git a/configs/k2hk_evm_defconfig b/configs/k2hk_evm_defconfig
index 74ef0668d86..a2651780484 100644
--- a/configs/k2hk_evm_defconfig
+++ b/configs/k2hk_evm_defconfig
@@ -58,7 +58,6 @@ CONFIG_CMD_NAND=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_BOOTP_DNS2=y
 CONFIG_MTDIDS_DEFAULT="nand0=davinci_nand.0"
-CONFIG_MTDPARTS_DEFAULT="mtdparts=davinci_nand.0:1024k(bootloader)ro,512k(params)ro,-(ubifs)"
 CONFIG_CMD_UBI=y
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
diff --git a/configs/k2hk_hs_evm_defconfig b/configs/k2hk_hs_evm_defconfig
index 5bd8c28f546..8c0472dcc2b 100644
--- a/configs/k2hk_hs_evm_defconfig
+++ b/configs/k2hk_hs_evm_defconfig
@@ -34,7 +34,6 @@ CONFIG_CMD_NAND=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_BOOTP_DNS2=y
 CONFIG_MTDIDS_DEFAULT="nand0=davinci_nand.0"
-CONFIG_MTDPARTS_DEFAULT="mtdparts=davinci_nand.0:1024k(bootloader)ro,512k(params)ro,-(ubifs)"
 CONFIG_CMD_UBI=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
diff --git a/configs/k2l_evm_defconfig b/configs/k2l_evm_defconfig
index 378a71f94e1..55ddd3cce96 100644
--- a/configs/k2l_evm_defconfig
+++ b/configs/k2l_evm_defconfig
@@ -58,7 +58,6 @@ CONFIG_CMD_NAND=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_BOOTP_DNS2=y
 CONFIG_MTDIDS_DEFAULT="nand0=davinci_nand.0"
-CONFIG_MTDPARTS_DEFAULT="mtdparts=davinci_nand.0:1024k(bootloader)ro,512k(params)ro,-(ubifs)"
 CONFIG_CMD_UBI=y
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
diff --git a/configs/k2l_hs_evm_defconfig b/configs/k2l_hs_evm_defconfig
index 31ec3029d76..ce7aa3a39ef 100644
--- a/configs/k2l_hs_evm_defconfig
+++ b/configs/k2l_hs_evm_defconfig
@@ -35,7 +35,6 @@ CONFIG_CMD_NAND=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_BOOTP_DNS2=y
 CONFIG_MTDIDS_DEFAULT="nand0=davinci_nand.0"
-CONFIG_MTDPARTS_DEFAULT="mtdparts=davinci_nand.0:1024k(bootloader)ro,512k(params)ro,-(ubifs)"
 CONFIG_CMD_UBI=y
 CONFIG_ISO_PARTITION=y
 CONFIG_EFI_PARTITION=y
diff --git a/include/configs/k2e_evm.h b/include/configs/k2e_evm.h
index 630dfdc5b7f..604b85084ca 100644
--- a/include/configs/k2e_evm.h
+++ b/include/configs/k2e_evm.h
@@ -9,8 +9,6 @@
 #ifndef __CONFIG_K2E_EVM_H
 #define __CONFIG_K2E_EVM_H
 
-#include <environment/ti/spi.h>
-
 /* U-Boot general configuration */
 #define ENV_KS2_BOARD_SETTINGS						\
 	DEFAULT_FW_INITRAMFS_BOOT_ENV					\
@@ -27,8 +25,6 @@
 
 #include <configs/ti_armv7_keystone2.h>
 
-#define SPI_MTD_PARTS KEYSTONE_SPI0_MTD_PARTS
-
 /* Network */
 #define CFG_KSNET_CPSW_NUM_PORTS	9
 
diff --git a/include/configs/k2g_evm.h b/include/configs/k2g_evm.h
index d0634a99f49..186145edc4c 100644
--- a/include/configs/k2g_evm.h
+++ b/include/configs/k2g_evm.h
@@ -10,7 +10,6 @@
 #define __CONFIG_K2G_EVM_H
 
 #include <environment/ti/mmc.h>
-#include <environment/ti/spi.h>
 
 /* U-Boot general configuration */
 #define ENV_KS2_BOARD_SETTINGS						\
@@ -54,8 +53,6 @@
 #define CFG_KSNET_CPSW_NUM_PORTS	2
 #define PHY_ANEG_TIMEOUT	10000 /* PHY needs longer aneg time */
 
-#define SPI_MTD_PARTS	KEYSTONE_SPI1_MTD_PARTS
-
 #include <configs/ti_armv7_keystone2.h>
 
 #endif /* __CONFIG_K2G_EVM_H */
diff --git a/include/configs/k2hk_evm.h b/include/configs/k2hk_evm.h
index ed54be839ff..44a47995b73 100644
--- a/include/configs/k2hk_evm.h
+++ b/include/configs/k2hk_evm.h
@@ -9,8 +9,6 @@
 #ifndef __CONFIG_K2HK_EVM_H
 #define __CONFIG_K2HK_EVM_H
 
-#include <environment/ti/spi.h>
-
 /* U-Boot general configuration */
 #define ENV_KS2_BOARD_SETTINGS						\
 	DEFAULT_FW_INITRAMFS_BOOT_ENV					\
@@ -27,8 +25,6 @@
 
 #include <configs/ti_armv7_keystone2.h>
 
-#define SPI_MTD_PARTS KEYSTONE_SPI0_MTD_PARTS
-
 /* Network */
 #define CFG_KSNET_CPSW_NUM_PORTS	5
 
diff --git a/include/configs/k2l_evm.h b/include/configs/k2l_evm.h
index 69d42eaf9f1..43d4049cd9c 100644
--- a/include/configs/k2l_evm.h
+++ b/include/configs/k2l_evm.h
@@ -9,8 +9,6 @@
 #ifndef __CONFIG_K2L_EVM_H
 #define __CONFIG_K2L_EVM_H
 
-#include <environment/ti/spi.h>
-
 /* U-Boot general configuration */
 #define ENV_KS2_BOARD_SETTINGS						\
 	DEFAULT_FW_INITRAMFS_BOOT_ENV					\
@@ -27,8 +25,6 @@
 
 #include <configs/ti_armv7_keystone2.h>
 
-#define SPI_MTD_PARTS KEYSTONE_SPI0_MTD_PARTS
-
 /* Network */
 #define CFG_KSNET_CPSW_NUM_PORTS	5
 
diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h
index a47f0902a26..586ccaacd3f 100644
--- a/include/configs/ti_armv7_keystone2.h
+++ b/include/configs/ti_armv7_keystone2.h
@@ -78,10 +78,6 @@
 
 /* EDMA3 */
 
-#define KERNEL_MTD_PARTS						\
-	"mtdparts="							\
-	SPI_MTD_PARTS
-
 #define DEFAULT_FW_INITRAMFS_BOOT_ENV					\
 	"name_fw_rd=k2-fw-initrd.cpio.gz\0"				\
 	"set_rd_spec=setenv rd_spec ${rdaddr}:${filesize}\0"		\
@@ -148,8 +144,7 @@
 		"sf write ${loadaddr} 0 ${filesize}\0"		\
 	"burn_uboot_nand=nand erase 0 0x100000; "			\
 		"nand write ${loadaddr} 0 ${filesize}\0"		\
-	"args_all=setenv bootargs console=ttyS0,115200n8 rootwait "	\
-		KERNEL_MTD_PARTS					\
+	"args_all=setenv bootargs console=ttyS0,115200n8 rootwait\0"	\
 	"args_net=setenv bootargs ${bootargs} rootfstype=nfs "		\
 		"root=/dev/nfs rw nfsroot=${serverip}:${nfs_root},"	\
 		"${nfs_options} ip=dhcp\0"				\
diff --git a/include/environment/ti/spi.h b/include/environment/ti/spi.h
deleted file mode 100644
index 1681dc8635e..00000000000
--- a/include/environment/ti/spi.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com
- *
- * Environment variable definitions for SPI on TI boards.
- */
-
-#ifndef __TI_SPI_H
-#define __TI_SPI_H
-
-#define KEYSTONE_SPI0_MTD_PARTS "spi0.0:1m(u-boot-spl)ro,-(misc);\0"
-#define KEYSTONE_SPI1_MTD_PARTS "spi1.0:1m(u-boot-spl)ro,-(misc);\0"
-
-#endif
-- 
2.39.2



More information about the U-Boot mailing list