[U-Boot] [PATCH v2 05/11] km: add CONFIG_KM_COMMON_ETH_INIT for km common eth init

Valentin Longchamp valentin.longchamp at keymile.com
Wed Aug 28 16:04:23 CEST 2013


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 at keymile.com>

---
Changes in v2:
- add CONFIG_KM_COMMON_ETH_INIT for the km board that need the common.c
  board_eth_init

 board/keymile/common/common.c   | 2 ++
 include/configs/km/km-powerpc.h | 3 +++
 include/configs/km/km_arm.h     | 1 +
 3 files changed, 6 insertions(+)

diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c
index 421ef8a..a4afba9 100644
--- a/board/keymile/common/common.c
+++ b/board/keymile/common/common.c
@@ -179,6 +179,7 @@ void i2c_init_board(void)
 }
 #endif
 
+#if defined(CONFIG_KM_COMMON_ETH_INIT)
 int board_eth_init(bd_t *bis)
 {
 	if (ethernet_present())
@@ -186,6 +187,7 @@ int board_eth_init(bd_t *bis)
 
 	return -1;
 }
+#endif
 
 /*
  * do_setboardid command
diff --git a/include/configs/km/km-powerpc.h b/include/configs/km/km-powerpc.h
index 33b3c9e..9b882cc 100644
--- a/include/configs/km/km-powerpc.h
+++ b/include/configs/km/km-powerpc.h
@@ -33,6 +33,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
diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h
index ac84e16..ad6628e 100644
--- a/include/configs/km/km_arm.h
+++ b/include/configs/km/km_arm.h
@@ -179,6 +179,7 @@
 #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
-- 
1.8.0.1



More information about the U-Boot mailing list