diff options
author | Wolfgang Denk <wd@denx.de> | 2010-11-17 20:54:39 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-11-17 20:54:39 +0100 |
commit | d7b1970015e62d37b26bb6b94b64ae36728c63cc (patch) | |
tree | 616f994080fb1c0c204e2a77d7a2bb574ba9521d /board/ti/evm/evm.c | |
parent | 8ad25bf8d9233eb7d0b614612108622a59069354 (diff) | |
parent | 858ecd9ac3434e011e84d5fd9013bd1ee199dbdc (diff) | |
download | u-boot-imx-d7b1970015e62d37b26bb6b94b64ae36728c63cc.zip u-boot-imx-d7b1970015e62d37b26bb6b94b64ae36728c63cc.tar.gz u-boot-imx-d7b1970015e62d37b26bb6b94b64ae36728c63cc.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'board/ti/evm/evm.c')
-rw-r--r-- | board/ti/evm/evm.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c index 9948b9c..09d14f7 100644 --- a/board/ti/evm/evm.c +++ b/board/ti/evm/evm.c @@ -46,6 +46,11 @@ u8 get_omap3_evm_rev(void) static void omap3_evm_get_revision(void) { +#if defined(CONFIG_CMD_NET) + /* + * Board revision can be ascertained only by identifying + * the Ethernet chipset. + */ unsigned int smsc_id; /* Ethernet PHY ID is stored at ID_REV register */ @@ -62,8 +67,22 @@ static void omap3_evm_get_revision(void) default: omap3_evm_version = OMAP3EVM_BOARD_GEN_2; } +#else +#if defined(CONFIG_STATIC_BOARD_REV) + /* + * Look for static defintion of the board revision + */ + omap3_evm_version = CONFIG_STATIC_BOARD_REV; +#else + /* + * Fallback to the default above. + */ + omap3_evm_version = OMAP3EVM_BOARD_GEN_2; +#endif +#endif /* CONFIG_CMD_NET */ } +#ifdef CONFIG_USB_OMAP3 /* * MUSB port on OMAP3EVM Rev >= E requires extvbus programming. */ @@ -76,6 +95,7 @@ u8 omap3_evm_need_extvbus(void) return retval; } +#endif /* * Routine: board_init @@ -108,6 +128,7 @@ int misc_init_r(void) #if defined(CONFIG_CMD_NET) setup_net_chip(); #endif + omap3_evm_get_revision(); dieid_num_r(); @@ -161,9 +182,6 @@ static void setup_net_chip(void) writel(GPIO0, &gpio3_base->cleardataout); udelay(1); writel(GPIO0, &gpio3_base->setdataout); - - /* determine omap3evm revision */ - omap3_evm_get_revision(); } int board_eth_init(bd_t *bis) |