mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-01-28 02:27:18 +01:00
realtek: eth: simplify rtl8380_init_mac()
This function is now only called on RTL838x devices. Remove all obsolete family checks. Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de> Link: https://github.com/openwrt/openwrt/pull/21391 Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
This commit is contained in:
parent
28c7524e78
commit
7fb393fa7d
1 changed files with 2 additions and 11 deletions
|
|
@ -1333,23 +1333,14 @@ static int rtl8390_init_mac(struct rtl838x_eth_priv *priv)
|
|||
|
||||
static int rtl8380_init_mac(struct rtl838x_eth_priv *priv)
|
||||
{
|
||||
if (priv->r->family_id == RTL8390_FAMILY_ID)
|
||||
return rtl8390_init_mac(priv);
|
||||
|
||||
/* At present we do not know how to set up EEE on any other SoC than RTL8380 */
|
||||
if (priv->r->family_id != RTL8380_FAMILY_ID)
|
||||
return 0;
|
||||
|
||||
pr_info("%s\n", __func__);
|
||||
/* fix timer for EEE */
|
||||
sw_w32(0x5001411, RTL838X_EEE_TX_TIMER_GIGA_CTRL);
|
||||
sw_w32(0x5001417, RTL838X_EEE_TX_TIMER_GELITE_CTRL);
|
||||
|
||||
/* Init VLAN. TODO: Understand what is being done, here */
|
||||
if (priv->r->family_id == RTL8380_FAMILY_ID) {
|
||||
for (int i = 0; i <= 28; i++)
|
||||
sw_w32(0, 0xd57c + i * 0x80);
|
||||
}
|
||||
for (int i = 0; i <= 28; i++)
|
||||
sw_w32(0, 0xd57c + i * 0x80);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue