diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c
index 2c95fae68cf7bedb7580007ce70aa5f794a494ca..30c1c570f16f05a1e490f8c6eb3c9b73d003e918 100644
--- a/board/ti/evm/evm.c
+++ b/board/ti/evm/evm.c
@@ -153,6 +153,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
@@ -219,3 +220,4 @@ int board_eth_init(bd_t *bis)
 #endif
 	return rc;
 }
+#endif /* CONFIG_CMD_NET */