aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/realtek
diff options
context:
space:
mode:
authorHayes Wang <hayeswang@realtek.com>2012-07-11 20:31:56 +0800
committerFrancois Romieu <romieu@fr.zoreil.com>2012-07-17 23:34:06 +0200
commit3a83ad12b850c3c5b89fa9008bdd0c0782f0cf68 (patch)
tree05c40b8f7c814fd66994ac8da708cca07a0ede4e /drivers/net/ethernet/realtek
parent5abf7f7e0f6bdbfcac737f636497d7016d9507eb (diff)
downloadlinux-3a83ad12b850c3c5b89fa9008bdd0c0782f0cf68.tar.gz
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>
Diffstat (limited to 'drivers/net/ethernet/realtek')
-rw-r--r--drivers/net/ethernet/realtek/r8169.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index c29c5fb3aec..1f27318635d 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -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);
}
-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)
{
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;
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)
@@ -1071,8 +1062,7 @@ static u16 r8168_mac_ocp_read(struct rtl8169_private *tp, u32 reg)
RTL_W32(OCPDR, reg << 15);
- return rtl_udelay_loop_wait_high(tp, &rtl_ocpdr_cond, 25, 10) ?
- RTL_R32(OCPDR) : ~0;
+ return RTL_R32(OCPDR);
}
#define OCP_STD_PHY_BASE 0xa400