summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Kiryanov <nikita@compulab.co.il>2012-01-02 04:01:31 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-01-16 08:40:11 +0100
commitce15ec9f695c5ee7023c3e256ee67a2538496c46 (patch)
treeb669043188ab5529081c58db183dbd5dd2a1b5cf
parent9fc376be284eae23c3eb872c8e4a5b85aa1062ca (diff)
downloadu-boot-imx-ce15ec9f695c5ee7023c3e256ee67a2538496c46.zip
u-boot-imx-ce15ec9f695c5ee7023c3e256ee67a2538496c46.tar.gz
u-boot-imx-ce15ec9f695c5ee7023c3e256ee67a2538496c46.tar.bz2
cm-t35: various cleanups
Move #ifdef CONFIG_SMC911X out of board_eth_init() function, simplify the board_mmc_init() function, and enclose handle_mac_address() in the CONFIG_SMC911X. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
-rw-r--r--board/cm_t35/cm_t35.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/board/cm_t35/cm_t35.c b/board/cm_t35/cm_t35.c
index 420cd70..ff372d8 100644
--- a/board/cm_t35/cm_t35.c
+++ b/board/cm_t35/cm_t35.c
@@ -1,6 +1,5 @@
/*
- * (C) Copyright 2011
- * CompuLab, Ltd. <www.compulab.co.il>
+ * (C) Copyright 2011 CompuLab, Ltd. <www.compulab.co.il>
*
* Authors: Mike Rapoport <mike@compulab.co.il>
* Igor Grinberg <grinberg@compulab.co.il>
@@ -316,8 +315,7 @@ void set_muxconf_regs(void)
#ifdef CONFIG_GENERIC_MMC
int board_mmc_init(bd_t *bis)
{
- omap_mmc_init(0);
- return 0;
+ return omap_mmc_init(0);
}
#endif
@@ -370,6 +368,7 @@ static void reset_net_chip(void)
static inline void reset_net_chip(void) {}
#endif
+#ifdef CONFIG_SMC911X
/*
* Routine: handle_mac_address
* Description: prepare MAC address for on-board Ethernet.
@@ -404,7 +403,6 @@ int board_eth_init(bd_t *bis)
{
int rc = 0, rc1 = 0;
-#ifdef CONFIG_SMC911X
setup_net_chip_gmpc();
reset_net_chip();
@@ -419,7 +417,7 @@ int board_eth_init(bd_t *bis)
rc1 = smc911x_initialize(1, SB_T35_SMC911X_BASE);
if (rc1 > 0)
rc++;
-#endif
return rc;
}
+#endif