diff options
author | Tom Rini <trini@ti.com> | 2014-03-10 14:22:54 -0400 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-03-10 14:22:54 -0400 |
commit | 5495dae7aa9d5cd161e07174d38acac86515c58a (patch) | |
tree | 848c7f48688aeb5ada1fe221dc5dff4729561814 /board/ti/am335x | |
parent | c0d297946fd2540c8057eb1589429978da888dbb (diff) | |
parent | 27019e4a949fc3be2e895ac20839c4d4d119f902 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'board/ti/am335x')
-rw-r--r-- | board/ti/am335x/board.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index 57217688d6..7609a18368 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -544,12 +544,12 @@ static struct cpsw_slave_data cpsw_slaves[] = { { .slave_reg_ofs = 0x208, .sliver_reg_ofs = 0xd80, - .phy_id = 0, + .phy_addr = 0, }, { .slave_reg_ofs = 0x308, .sliver_reg_ofs = 0xdc0, - .phy_id = 1, + .phy_addr = 1, }, }; @@ -602,6 +602,21 @@ int board_eth_init(bd_t *bis) } #ifdef CONFIG_DRIVER_TI_CPSW + + mac_lo = readl(&cdev->macid1l); + mac_hi = readl(&cdev->macid1h); + mac_addr[0] = mac_hi & 0xFF; + mac_addr[1] = (mac_hi & 0xFF00) >> 8; + mac_addr[2] = (mac_hi & 0xFF0000) >> 16; + mac_addr[3] = (mac_hi & 0xFF000000) >> 24; + mac_addr[4] = mac_lo & 0xFF; + mac_addr[5] = (mac_lo & 0xFF00) >> 8; + + if (!getenv("eth1addr")) { + if (is_valid_ether_addr(mac_addr)) + eth_setenv_enetaddr("eth1addr", mac_addr); + } + if (read_eeprom(&header) < 0) puts("Could not get board ID.\n"); |