[U-Boot] [PATCH 3/3] omap3evm: eth: Include functions only when necessary

Sanjeev Premi premi at ti.com
Wed Jun 22 21:24:09 CEST 2011


These functions are not required when CONFIG_CMD_NET
is not defined:
  - setup_net_chip()
  - reset_net_chip()
  - board_eth_init()

This patch wraps them in #ifdef CONFIG_CMD_NET...#endif

Signed-off-by: Sanjeev Premi <premi at ti.com>
---
 board/ti/evm/evm.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c
index 57e5fa5..599e366 100644
--- a/board/ti/evm/evm.c
+++ b/board/ti/evm/evm.c
@@ -149,6 +149,7 @@ void set_muxconf_regs(void)
 	MUX_EVM();
 }
 
+#ifdef CONFIG_CMD_NET
 /*
  * Routine: setup_net_chip
  * Description: Setting up the configuration GPMC registers specific to the
@@ -211,3 +212,4 @@ int board_eth_init(bd_t *bis)
 #endif
 	return rc;
 }
+#endif /* CONFIG_CMD_NET */
-- 
1.7.2.2



More information about the U-Boot mailing list