diff options
author | Minkyu Kang <mk7.kang@samsung.com> | 2010-07-06 17:29:44 +0900 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2010-07-06 17:29:44 +0900 |
commit | 2271d3ddccfbd4a7640121669ff9b013b1fea361 (patch) | |
tree | 400f22f0a12ff0ae6c472bed6ac648befc1744a2 /board/ti/evm/evm.c | |
parent | 25ae8aeb54a6ca89ba1fd11c00865b8fed9348b4 (diff) | |
parent | 54841ab50c20d6fa6c9cc3eb826989da3a22d934 (diff) | |
download | u-boot-imx-2271d3ddccfbd4a7640121669ff9b013b1fea361.zip u-boot-imx-2271d3ddccfbd4a7640121669ff9b013b1fea361.tar.gz u-boot-imx-2271d3ddccfbd4a7640121669ff9b013b1fea361.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot
Diffstat (limited to 'board/ti/evm/evm.c')
-rw-r--r-- | board/ti/evm/evm.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c index 0718a08..9948b9c 100644 --- a/board/ti/evm/evm.c +++ b/board/ti/evm/evm.c @@ -37,6 +37,46 @@ #include <asm/mach-types.h> #include "evm.h" +static u8 omap3_evm_version; + +u8 get_omap3_evm_rev(void) +{ + return omap3_evm_version; +} + +static void omap3_evm_get_revision(void) +{ + unsigned int smsc_id; + + /* Ethernet PHY ID is stored at ID_REV register */ + smsc_id = readl(CONFIG_SMC911X_BASE + 0x50) & 0xFFFF0000; + printf("Read back SMSC id 0x%x\n", smsc_id); + + switch (smsc_id) { + /* SMSC9115 chipset */ + case 0x01150000: + omap3_evm_version = OMAP3EVM_BOARD_GEN_1; + break; + /* SMSC 9220 chipset */ + case 0x92200000: + default: + omap3_evm_version = OMAP3EVM_BOARD_GEN_2; + } +} + +/* + * MUSB port on OMAP3EVM Rev >= E requires extvbus programming. + */ +u8 omap3_evm_need_extvbus(void) +{ + u8 retval = 0; + + if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) + retval = 1; + + return retval; +} + /* * Routine: board_init * Description: Early hardware init. @@ -121,6 +161,9 @@ 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) |