ppc/km: convert KM_DEF_NETDEV to Kconfig

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@ch.abb.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
CC: Priyanka Jain <priyanka.jain@nxp.com>
CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
diff --git a/board/keymile/Kconfig b/board/keymile/Kconfig
index acaa928..5f512d5 100644
--- a/board/keymile/Kconfig
+++ b/board/keymile/Kconfig
@@ -62,6 +62,12 @@
 	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 c5e709e..282b957 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 18f9625..33b4a34 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 91b7aa8..e014f7e 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 8433d8e..e690d8f 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 fc78b27c..5335034 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 bfa7ca2..7d85a02 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 771d024..9c17044 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 cf1808e..4b8958e 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -935,7 +935,6 @@
 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