mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-08 17:46:39 +07:00
sh: mac address through private data for sh_eth on ms7724se
Convert the ms7724se board code to pass the mac address to the sh_eth driver using platform data. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
parent
9b3b21f788
commit
8013cc9a5d
@ -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())
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user