Commit e0a1d598ef0155f31589c42db17ff4784e84ca67
Committed by
Tom Rini
1 parent
6f72892a44
Exists in
master
and in
50 other branches
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>
Showing 1 changed file with 4 additions and 4 deletions Side-by-side Diff
board/ti/dra7xx/evm.c
... | ... | @@ -202,12 +202,12 @@ |
202 | 202 | /* try reading mac address from efuse */ |
203 | 203 | mac_lo = readl((*ctrl)->control_core_mac_id_0_lo); |
204 | 204 | mac_hi = readl((*ctrl)->control_core_mac_id_0_hi); |
205 | - mac_addr[0] = mac_hi & 0xFF; | |
205 | + mac_addr[0] = (mac_hi & 0xFF0000) >> 16; | |
206 | 206 | mac_addr[1] = (mac_hi & 0xFF00) >> 8; |
207 | - mac_addr[2] = (mac_hi & 0xFF0000) >> 16; | |
208 | - mac_addr[3] = mac_lo & 0xFF; | |
207 | + mac_addr[2] = mac_hi & 0xFF; | |
208 | + mac_addr[3] = (mac_lo & 0xFF0000) >> 16; | |
209 | 209 | mac_addr[4] = (mac_lo & 0xFF00) >> 8; |
210 | - mac_addr[5] = (mac_lo & 0xFF0000) >> 16; | |
210 | + mac_addr[5] = mac_lo & 0xFF; | |
211 | 211 | |
212 | 212 | if (!getenv("ethaddr")) { |
213 | 213 | printf("<ethaddr> not set. Validating first E-fuse MAC\n"); |