omap3evm: Fix mechanism to identify board revision
Function omap3_evm_get_revision() - to identify the
board revision was called at end of setup_net_chip().
Board revision can be ascertained only by identifying
the Ethernet chipset - but combining setup operations
with revision detection isn't a good idea. So, moved
the function after call to setup_net_chip().
Function setup_net_chip() should be ideally be called
only when CONFIG_CMD_NET is defined. But this leaves
the board revision "undetected". This patch allows
static definition of revision or default fallback to
the latest revision.
Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
diff --git a/board/ti/evm/evm.h b/board/ti/evm/evm.h
index e2581f6..a76deb8 100644
--- a/board/ti/evm/evm.h
+++ b/board/ti/evm/evm.h
@@ -47,7 +47,9 @@
u8 get_omap3_evm_rev(void);
+#if defined(CONFIG_CMD_NET)
static void setup_net_chip(void);
+#endif
/*
* IEN - Input Enable