提交 3a83ad12 编写于 作者: H Hayes Wang 提交者: Francois Romieu

r8169: remove rtl_ocpdr_cond.

It is not needed for mac_ocp_{write / read}. Actually bit 31 of OCPDR
does not change and r8168_mac_ocp_read always returns ~0.
Signed-off-by: NHayes Wang <hayeswang@realtek.com>
Tested-by: NFrancois Romieu <romieu@fr.zoreil.com>
上级 5abf7f7e
...@@ -1043,13 +1043,6 @@ static void rtl_w1w0_phy_ocp(struct rtl8169_private *tp, int reg, int p, int m) ...@@ -1043,13 +1043,6 @@ static void rtl_w1w0_phy_ocp(struct rtl8169_private *tp, int reg, int p, int m)
r8168_phy_ocp_write(tp, reg, (val | p) & ~m); r8168_phy_ocp_write(tp, reg, (val | p) & ~m);
} }
DECLARE_RTL_COND(rtl_ocpdr_cond)
{
void __iomem *ioaddr = tp->mmio_addr;
return RTL_R32(OCPDR) & OCPAR_FLAG;
}
static void r8168_mac_ocp_write(struct rtl8169_private *tp, u32 reg, u32 data) static void r8168_mac_ocp_write(struct rtl8169_private *tp, u32 reg, u32 data)
{ {
void __iomem *ioaddr = tp->mmio_addr; void __iomem *ioaddr = tp->mmio_addr;
...@@ -1058,8 +1051,6 @@ static void r8168_mac_ocp_write(struct rtl8169_private *tp, u32 reg, u32 data) ...@@ -1058,8 +1051,6 @@ static void r8168_mac_ocp_write(struct rtl8169_private *tp, u32 reg, u32 data)
return; return;
RTL_W32(OCPDR, OCPAR_FLAG | (reg << 15) | data); RTL_W32(OCPDR, OCPAR_FLAG | (reg << 15) | data);
rtl_udelay_loop_wait_low(tp, &rtl_ocpdr_cond, 25, 10);
} }
static u16 r8168_mac_ocp_read(struct rtl8169_private *tp, u32 reg) static u16 r8168_mac_ocp_read(struct rtl8169_private *tp, u32 reg)
...@@ -1071,8 +1062,7 @@ static u16 r8168_mac_ocp_read(struct rtl8169_private *tp, u32 reg) ...@@ -1071,8 +1062,7 @@ static u16 r8168_mac_ocp_read(struct rtl8169_private *tp, u32 reg)
RTL_W32(OCPDR, reg << 15); RTL_W32(OCPDR, reg << 15);
return rtl_udelay_loop_wait_high(tp, &rtl_ocpdr_cond, 25, 10) ? return RTL_R32(OCPDR);
RTL_R32(OCPDR) : ~0;
} }
#define OCP_STD_PHY_BASE 0xa400 #define OCP_STD_PHY_BASE 0xa400
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册