[U-Boot] [PATCH 2/4] ppc/km: convert KM_DEF_NETDEV to Kconfig

Holger Brunck holger.brunck at ch.abb.com
Tue Nov 26 18:09:01 UTC 2019


Remove this from the board header files and move it to Kconfig. Also use
the correct default address for kmtegr1.

Signed-off-by: Holger Brunck <holger.brunck at ch.abb.com>
CC: Priyanka Jain <priyanka.jain at nxp.com>
CC: Valentin Longchamp <valentin.longchamp at ch.abb.com>
---
 board/keymile/Kconfig               | 6 ++++++
 configs/kmcoge5ne_defconfig         | 1 +
 configs/kmeter1_defconfig           | 1 +
 configs/kmtegr1_defconfig           | 1 +
 include/configs/km/keymile-common.h | 7 +------
 include/configs/kmcoge5ne.h         | 1 -
 include/configs/kmeter1.h           | 1 -
 include/configs/kmp204x.h           | 2 --
 scripts/config_whitelist.txt        | 1 -
 9 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/board/keymile/Kconfig b/board/keymile/Kconfig
index ba1960f3d0..634dbbe097 100644
--- a/board/keymile/Kconfig
+++ b/board/keymile/Kconfig
@@ -62,6 +62,12 @@ config KM_CONSOLE_TTY
 	help
 	  TTY console to use on board.
 
+config KM_DEF_NETDEV
+	string "Default Netdevice"
+	default "eth0"
+	help
+	  Default netdevice for debug interface
+
 config KM_COMMON_ETH_INIT
 	bool "Common Ethernet Initialization"
 	default y if KIRKWOOD || MPC83xx
diff --git a/configs/kmcoge5ne_defconfig b/configs/kmcoge5ne_defconfig
index 472dc88fbf..aa2a344d3d 100644
--- a/configs/kmcoge5ne_defconfig
+++ b/configs/kmcoge5ne_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xF0000000
+CONFIG_KM_DEF_NETDEV="eth1"
 CONFIG_ENV_SIZE=0x4000
 CONFIG_SYS_BOOTCOUNT_ADDR=0xE011BFF8
 CONFIG_ENV_SECT_SIZE=0x20000
diff --git a/configs/kmeter1_defconfig b/configs/kmeter1_defconfig
index 02b17ed624..7e9b8930a9 100644
--- a/configs/kmeter1_defconfig
+++ b/configs/kmeter1_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xF0000000
+CONFIG_KM_DEF_NETDEV="eth2"
 CONFIG_ENV_SIZE=0x4000
 CONFIG_SYS_BOOTCOUNT_ADDR=0xE011BFF8
 CONFIG_ENV_SECT_SIZE=0x20000
diff --git a/configs/kmtegr1_defconfig b/configs/kmtegr1_defconfig
index 27a58833f8..f194d605f6 100644
--- a/configs/kmtegr1_defconfig
+++ b/configs/kmtegr1_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xF0000000
+CONFIG_KM_DEF_NETDEV="eth1"
 CONFIG_ENV_SIZE=0x4000
 CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
 CONFIG_ENV_SECT_SIZE=0x20000
diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h
index 8433d8e568..e690d8f39d 100644
--- a/include/configs/km/keymile-common.h
+++ b/include/configs/km/keymile-common.h
@@ -38,11 +38,6 @@
 	"actual_bank=0\0"
 #endif
 
-#ifndef CONFIG_KM_DEF_NETDEV
-#define CONFIG_KM_DEF_NETDEV	\
-	"netdev=eth0\0"
-#endif
-
 #ifndef CONFIG_KM_UBI_PARTITION_NAME_BOOT
 #define CONFIG_KM_UBI_PARTITION_NAME_BOOT	"ubi0"
 #endif /* CONFIG_KM_UBI_PARTITION_NAME_BOOT */
@@ -168,7 +163,7 @@
 #ifndef CONFIG_KM_DEF_ENV
 #define CONFIG_KM_DEF_ENV	\
 	CONFIG_KM_DEF_ENV_BOOTPARAMS					\
-	CONFIG_KM_DEF_NETDEV						\
+	"netdev=" __stringify(CONFIG_KM_DEF_NETDEV) "\0"		\
 	CONFIG_KM_DEF_ENV_CPU						\
 	CONFIG_KM_DEF_ENV_BOOTTARGETS					\
 	CONFIG_KM_DEF_ENV_BOOTARGS					\
diff --git a/include/configs/kmcoge5ne.h b/include/configs/kmcoge5ne.h
index fc78b27cbb..5335034505 100644
--- a/include/configs/kmcoge5ne.h
+++ b/include/configs/kmcoge5ne.h
@@ -10,7 +10,6 @@
 
 #define CONFIG_HOSTNAME		"kmcoge5ne"
 #define CONFIG_KM_BOARD_NAME	"kmcoge5ne"
-#define CONFIG_KM_DEF_NETDEV	"netdev=eth1\0"
 #define CONFIG_NAND_ECC_BCH
 #define CONFIG_NAND_KMETER1
 #define CONFIG_SYS_MAX_NAND_DEVICE		1
diff --git a/include/configs/kmeter1.h b/include/configs/kmeter1.h
index bfa7ca27c7..7d85a02c68 100644
--- a/include/configs/kmeter1.h
+++ b/include/configs/kmeter1.h
@@ -10,7 +10,6 @@
 
 #define CONFIG_HOSTNAME		"kmeter1"
 #define CONFIG_KM_BOARD_NAME   "kmeter1"
-#define CONFIG_KM_DEF_NETDEV	"netdev=eth2\0"
 
 /* include common defines/options for all Keymile boards */
 #include "km/keymile-common.h"
diff --git a/include/configs/kmp204x.h b/include/configs/kmp204x.h
index 771d0248f7..9c17044b9b 100644
--- a/include/configs/kmp204x.h
+++ b/include/configs/kmp204x.h
@@ -17,8 +17,6 @@
 
 #define CONFIG_KMP204X
 
-#define CONFIG_KM_DEF_NETDEV	"netdev=eth0\0"
-
 /* an additionnal option is required for UBI as subpage access is
  * supported in u-boot
  */
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 08fab0aebf..6413d1f5ac 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -939,7 +939,6 @@ CONFIG_KM_DEF_ENV_BOOTTARGETS
 CONFIG_KM_DEF_ENV_CONSTANTS
 CONFIG_KM_DEF_ENV_CPU
 CONFIG_KM_DEF_ENV_FLASH_BOOT
-CONFIG_KM_DEF_NETDEV
 CONFIG_KM_DEV_ENV_FLASH_BOOT_UBI
 CONFIG_KM_DISABLE_PCIE
 CONFIG_KM_ECC_MODE
-- 
2.24.0.rc1



More information about the U-Boot mailing list