diff options
author | Mugunthan V N <mugunthanvnm@ti.com> | 2014-01-07 19:57:38 +0530 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-01-07 16:41:12 -0500 |
commit | e0a1d598ef0155f31589c42db17ff4784e84ca67 (patch) | |
tree | 9a86ba246689df88eb65c999d55d4090d8e3a06c | |
parent | 6f72892a4412013c4257f8475ed9d940132a202f (diff) | |
download | u-boot-imx-e0a1d598ef0155f31589c42db17ff4784e84ca67.zip u-boot-imx-e0a1d598ef0155f31589c42db17ff4784e84ca67.tar.gz u-boot-imx-e0a1d598ef0155f31589c42db17ff4784e84ca67.tar.bz2 |
ARM: dra7_evm: read mac address properly from e-fuse
Byte offset of Ethernet mac address read from e-fuse are wrong so DHCP is
not working on some boards, modifying the offset to read properly.
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
-rw-r--r-- | board/ti/dra7xx/evm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index 9ae88c5..1b60b8f 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -202,12 +202,12 @@ int board_eth_init(bd_t *bis) /* try reading mac address from efuse */ mac_lo = readl((*ctrl)->control_core_mac_id_0_lo); mac_hi = readl((*ctrl)->control_core_mac_id_0_hi); - mac_addr[0] = mac_hi & 0xFF; + mac_addr[0] = (mac_hi & 0xFF0000) >> 16; mac_addr[1] = (mac_hi & 0xFF00) >> 8; - mac_addr[2] = (mac_hi & 0xFF0000) >> 16; - mac_addr[3] = mac_lo & 0xFF; + mac_addr[2] = mac_hi & 0xFF; + mac_addr[3] = (mac_lo & 0xFF0000) >> 16; mac_addr[4] = (mac_lo & 0xFF00) >> 8; - mac_addr[5] = (mac_lo & 0xFF0000) >> 16; + mac_addr[5] = mac_lo & 0xFF; if (!getenv("ethaddr")) { printf("<ethaddr> not set. Validating first E-fuse MAC\n"); |