[U-Boot] [PATCH 04/29 V2] cmd_mac: Move conditional compilation to Makefile

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Wed Sep 10 21:28:44 CEST 2008


finish remaning CFG_ID_EEPROM in CONFIG_ID_EEPROM
start in commit ad8f8687b78c3e917b173f038926695383c55555

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 common/Makefile               |    2 +-
 common/cmd_mac.c              |    3 ---
 include/configs/MPC8536DS.h   |    4 ++--
 include/configs/MPC8610HPCD.h |    2 +-
 include/configs/MPC8641HPCN.h |    2 +-
 include/configs/sbc8641d.h    |    2 +-
 lib_ppc/board.c               |    2 +-
 lib_sparc/board.c             |    2 +-
 8 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/common/Makefile b/common/Makefile
index e9f75f4..a9a02b2 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -111,7 +111,7 @@ COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o
 COBJS-$(CONFIG_CMD_LICENSE) += cmd_license.o
 COBJS-y += cmd_load.o
 COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o
-COBJS-y += cmd_mac.o
+COBJS-$(CONFIG_ID_EEPROM) += cmd_mac.o
 COBJS-y += cmd_mem.o
 COBJS-$(CONFIG_CMD_MFSL) += cmd_mfsl.o
 COBJS-$(CONFIG_MII) += miiphyutil.o
diff --git a/common/cmd_mac.c b/common/cmd_mac.c
index faed8f7..4453299 100644
--- a/common/cmd_mac.c
+++ b/common/cmd_mac.c
@@ -24,8 +24,6 @@
 #include <common.h>
 #include <command.h>
 
-#ifdef CFG_ID_EEPROM
-
 extern int do_mac(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 
 U_BOOT_CMD(
@@ -63,4 +61,3 @@ U_BOOT_CMD(
 	"mac 7\n"
 	"    - program the MAC address for port 7\n"
 );
-#endif /* CFG_ID_EEPROM */
diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h
index 17cc934..dc304e7 100644
--- a/include/configs/MPC8536DS.h
+++ b/include/configs/MPC8536DS.h
@@ -301,8 +301,8 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 /*
  * I2C2 EEPROM
  */
-#define CFG_ID_EEPROM
-#ifdef CFG_ID_EEPROM
+#define CONFIG_ID_EEPROM
+#ifdef CONFIG_ID_EEPROM
 #define CONFIG_ID_EEPROM
 #define CFG_I2C_EEPROM_NXID
 #endif
diff --git a/include/configs/MPC8610HPCD.h b/include/configs/MPC8610HPCD.h
index 0c1c4fc..7c69582 100644
--- a/include/configs/MPC8610HPCD.h
+++ b/include/configs/MPC8610HPCD.h
@@ -139,7 +139,7 @@
 
 #define CONFIG_ID_EEPROM
 #define CFG_I2C_EEPROM_NXID
-#define CFG_ID_EEPROM
+#define CONFIG_ID_EEPROM
 #define CFG_I2C_EEPROM_ADDR     0x57
 #define CFG_I2C_EEPROM_ADDR_LEN 1
 
diff --git a/include/configs/MPC8641HPCN.h b/include/configs/MPC8641HPCN.h
index 54a0461..a57c303 100644
--- a/include/configs/MPC8641HPCN.h
+++ b/include/configs/MPC8641HPCN.h
@@ -151,7 +151,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 
 #define CONFIG_ID_EEPROM
 #define CFG_I2C_EEPROM_NXID
-#define CFG_ID_EEPROM
+#define CONFIG_ID_EEPROM
 #define CFG_I2C_EEPROM_ADDR     0x57
 #define CFG_I2C_EEPROM_ADDR_LEN 1
 
diff --git a/include/configs/sbc8641d.h b/include/configs/sbc8641d.h
index ddca527..c84240e 100644
--- a/include/configs/sbc8641d.h
+++ b/include/configs/sbc8641d.h
@@ -179,7 +179,7 @@
 
 #endif
 
-/* #define CFG_ID_EEPROM	1
+/* #define CONFIG_ID_EEPROM	1
 #define ID_EEPROM_ADDR 0x57 */
 
 /*
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index c8f075f..4d02eb2 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -873,7 +873,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
 	sc3_read_eeprom();
 #endif
 
-#if defined (CFG_ID_EEPROM) || defined (CFG_I2C_MAC_OFFSET)
+#if defined (CONFIG_ID_EEPROM) || defined (CFG_I2C_MAC_OFFSET)
 	mac_read_from_eeprom();
 #endif
 
diff --git a/lib_sparc/board.c b/lib_sparc/board.c
index 205a8ca..15d6935 100644
--- a/lib_sparc/board.c
+++ b/lib_sparc/board.c
@@ -409,7 +409,7 @@ void board_init_f(ulong bootflag)
 	}
 #endif
 
-#ifdef CFG_ID_EEPROM
+#ifdef CONFIG_ID_EEPROM
 	mac_read_from_eeprom();
 #endif
 
-- 
1.5.6.5



More information about the U-Boot mailing list