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: Hayes Wang <hayeswang@realtek.com>
Tested-by: Francois Romieu <romieu@fr.zoreil.com>
This commit is contained in:
Hayes Wang 2012-07-11 20:31:56 +08:00 committed by Francois Romieu
parent 5abf7f7e0f
commit 3a83ad12b8
1 changed files with 1 additions and 11 deletions

View File

@ -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)
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)
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