Commit 0004299a authored by Hayes Wang's avatar Hayes Wang Committed by Francois Romieu

r8169: modify pll power function

Adjust r810x_pll_power_down, r810x_pll_power_up, and r8168_pll_power_up.
Always power up device during rtl_open. For r810x, turn off more power
when the WOL is disabled.
Signed-off-by: default avatarHayes Wang <hayeswang@realtek.com>
parent d387b427
...@@ -3525,15 +3525,45 @@ static void r810x_phy_power_up(struct rtl8169_private *tp) ...@@ -3525,15 +3525,45 @@ static void r810x_phy_power_up(struct rtl8169_private *tp)
static void r810x_pll_power_down(struct rtl8169_private *tp) static void r810x_pll_power_down(struct rtl8169_private *tp)
{ {
void __iomem *ioaddr = tp->mmio_addr;
if (rtl_wol_pll_power_down(tp)) if (rtl_wol_pll_power_down(tp))
return; return;
r810x_phy_power_down(tp); r810x_phy_power_down(tp);
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_07:
case RTL_GIGA_MAC_VER_08:
case RTL_GIGA_MAC_VER_09:
case RTL_GIGA_MAC_VER_10:
case RTL_GIGA_MAC_VER_13:
case RTL_GIGA_MAC_VER_16:
break;
default:
RTL_W8(PMCH, RTL_R8(PMCH) & ~0x80);
break;
}
} }
static void r810x_pll_power_up(struct rtl8169_private *tp) static void r810x_pll_power_up(struct rtl8169_private *tp)
{ {
void __iomem *ioaddr = tp->mmio_addr;
r810x_phy_power_up(tp); r810x_phy_power_up(tp);
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_07:
case RTL_GIGA_MAC_VER_08:
case RTL_GIGA_MAC_VER_09:
case RTL_GIGA_MAC_VER_10:
case RTL_GIGA_MAC_VER_13:
case RTL_GIGA_MAC_VER_16:
break;
default:
RTL_W8(PMCH, RTL_R8(PMCH) | 0x80);
break;
}
} }
static void r8168_phy_power_up(struct rtl8169_private *tp) static void r8168_phy_power_up(struct rtl8169_private *tp)
...@@ -3637,13 +3667,6 @@ static void r8168_pll_power_up(struct rtl8169_private *tp) ...@@ -3637,13 +3667,6 @@ static void r8168_pll_power_up(struct rtl8169_private *tp)
{ {
void __iomem *ioaddr = tp->mmio_addr; void __iomem *ioaddr = tp->mmio_addr;
if ((tp->mac_version == RTL_GIGA_MAC_VER_27 ||
tp->mac_version == RTL_GIGA_MAC_VER_28 ||
tp->mac_version == RTL_GIGA_MAC_VER_31) &&
r8168dp_check_dash(tp)) {
return;
}
switch (tp->mac_version) { switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_25: case RTL_GIGA_MAC_VER_25:
case RTL_GIGA_MAC_VER_26: case RTL_GIGA_MAC_VER_26:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment