KM: add CONFIG_KM_COMMON_ETH_INIT for km common eth init
authorValentin Longchamp <valentin.longchamp@keymile.com>
Fri, 18 Oct 2013 09:47:18 +0000 (11:47 +0200)
committerYork Sun <yorksun@freescale.com>
Thu, 24 Oct 2013 16:35:40 +0000 (09:35 -0700)
This must be defined by a board support file that want to use the
keymile common.c board_eth_init function that requires ethernet_present
to be defined.

Currently all the km architectures use it but the kmp204x architecture
later supported in this series does use another board_eth_init function
and thus does not define it.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
board/keymile/common/common.c
include/configs/km/km-powerpc.h
include/configs/km/km_arm.h

index 3d7b05661a56d99cfe8e95cba3d866316b213304..f941e44e833b860933085e67194ac7f57d572548 100644 (file)
@@ -142,6 +142,7 @@ void i2c_init_board(void)
 }
 #endif
 
+#if defined(CONFIG_KM_COMMON_ETH_INIT)
 int board_eth_init(bd_t *bis)
 {
        if (ethernet_present())
@@ -149,6 +150,7 @@ int board_eth_init(bd_t *bis)
 
        return -1;
 }
+#endif
 
 /*
  * do_setboardid command
index 15fef24db090440561dd195caa7d7ad043857ee1..2cebb2bb0cc008609b523d78f63e957705d5ccd0 100644 (file)
@@ -17,6 +17,9 @@
 #define CONFIG_CMD_DTT
 #define CONFIG_JFFS2_CMDLINE
 
+/* standard km ethernet_present for piggy */
+#define CONFIG_KM_COMMON_ETH_INIT
+
 /* EEprom support 24C08, 24C16, 24C64 */
 #define CONFIG_SYS_I2C_MULTI_EEPROMS
 #define CONFIG_SYS_EEPROM_PAGE_WRITE_ENABLE
index 36c2fba9e60b639b3097a6e845b5e9ae56255c09..e74f85f604527bb535db7eab206fb7887dd740e0 100644 (file)
 #define CONFIG_MVGBE_PORTS     {1, 0}  /* enable port 0 only */
 #define CONFIG_PHY_BASE_ADR    0
 #define CONFIG_ENV_OVERWRITE   /* ethaddr can be reprogrammed */
+#define CONFIG_KM_COMMON_ETH_INIT /* standard km ethernet_present for piggy */
 
 /*
  * UBI related stuff