Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173448
b: refs/heads/master
c: 8013cc9
h: refs/heads/master
v: v3
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Oct 28, 2009
1 parent 291d0aa commit 5c1d545
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9b3b21f788a9d7ff999544bf9b7ba950f68a9357
refs/heads/master: 8013cc9a5d2f6dcb79ffdcf707cf90ba120edfec
14 changes: 4 additions & 10 deletions trunk/arch/sh/boards/mach-se/7724/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ static int __init sh_eth_is_eeprom_ready(void)
static void __init sh_eth_init(void)
{
int i;
u16 mac[3];
u16 mac;

/* check EEPROM status */
if (!sh_eth_is_eeprom_ready())
Expand All @@ -521,16 +521,10 @@ static void __init sh_eth_init(void)
if (!sh_eth_is_eeprom_ready())
return;

mac[i] = ctrl_inw(EEPROM_DATA);
mac[i] = ((mac[i] & 0xFF) << 8) | (mac[i] >> 8); /* swap */
mac = ctrl_inw(EEPROM_DATA);
sh_eth_plat.mac_addr[i << 1] = mac & 0xff;
sh_eth_plat.mac_addr[(i << 1) + 1] = mac >> 8;
}

/* reset sh-eth */
ctrl_outl(0x1, SH_ETH_ADDR + 0x0);

/* set MAC addr */
ctrl_outl(((mac[0] << 16) | (mac[1])), SH_ETH_MAHR);
ctrl_outl((mac[2]), SH_ETH_MALR);
}

#define SW4140 0xBA201000
Expand Down

0 comments on commit 5c1d545

Please sign in to comment.