r8169: remove support for chip version RTL_GIGA_MAC_VER_27
This patch is a follow-up to beb401ec50
("r8169: deprecate support for
RTL_GIGA_MAC_VER_27") that came with 5.12. Nobody complained, so let's
remove support for this chip version.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
55bd079a3c
commit
01649011cc
|
@ -37,7 +37,7 @@ enum mac_version {
|
||||||
RTL_GIGA_MAC_VER_24,
|
RTL_GIGA_MAC_VER_24,
|
||||||
RTL_GIGA_MAC_VER_25,
|
RTL_GIGA_MAC_VER_25,
|
||||||
RTL_GIGA_MAC_VER_26,
|
RTL_GIGA_MAC_VER_26,
|
||||||
RTL_GIGA_MAC_VER_27,
|
/* support for RTL_GIGA_MAC_VER_27 has been removed */
|
||||||
RTL_GIGA_MAC_VER_28,
|
RTL_GIGA_MAC_VER_28,
|
||||||
RTL_GIGA_MAC_VER_29,
|
RTL_GIGA_MAC_VER_29,
|
||||||
RTL_GIGA_MAC_VER_30,
|
RTL_GIGA_MAC_VER_30,
|
||||||
|
|
|
@ -118,7 +118,6 @@ static const struct {
|
||||||
[RTL_GIGA_MAC_VER_24] = {"RTL8168cp/8111cp" },
|
[RTL_GIGA_MAC_VER_24] = {"RTL8168cp/8111cp" },
|
||||||
[RTL_GIGA_MAC_VER_25] = {"RTL8168d/8111d", FIRMWARE_8168D_1},
|
[RTL_GIGA_MAC_VER_25] = {"RTL8168d/8111d", FIRMWARE_8168D_1},
|
||||||
[RTL_GIGA_MAC_VER_26] = {"RTL8168d/8111d", FIRMWARE_8168D_2},
|
[RTL_GIGA_MAC_VER_26] = {"RTL8168d/8111d", FIRMWARE_8168D_2},
|
||||||
[RTL_GIGA_MAC_VER_27] = {"RTL8168dp/8111dp" },
|
|
||||||
[RTL_GIGA_MAC_VER_28] = {"RTL8168dp/8111dp" },
|
[RTL_GIGA_MAC_VER_28] = {"RTL8168dp/8111dp" },
|
||||||
[RTL_GIGA_MAC_VER_29] = {"RTL8105e", FIRMWARE_8105E_1},
|
[RTL_GIGA_MAC_VER_29] = {"RTL8105e", FIRMWARE_8105E_1},
|
||||||
[RTL_GIGA_MAC_VER_30] = {"RTL8105e", FIRMWARE_8105E_1},
|
[RTL_GIGA_MAC_VER_30] = {"RTL8105e", FIRMWARE_8105E_1},
|
||||||
|
@ -985,33 +984,6 @@ DECLARE_RTL_COND(rtl_ocpar_cond)
|
||||||
return RTL_R32(tp, OCPAR) & OCPAR_FLAG;
|
return RTL_R32(tp, OCPAR) & OCPAR_FLAG;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void r8168dp_1_mdio_access(struct rtl8169_private *tp, int reg, u32 data)
|
|
||||||
{
|
|
||||||
RTL_W32(tp, OCPDR, data | ((reg & OCPDR_REG_MASK) << OCPDR_GPHY_REG_SHIFT));
|
|
||||||
RTL_W32(tp, OCPAR, OCPAR_GPHY_WRITE_CMD);
|
|
||||||
RTL_W32(tp, EPHY_RXER_NUM, 0);
|
|
||||||
|
|
||||||
rtl_loop_wait_low(tp, &rtl_ocpar_cond, 1000, 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void r8168dp_1_mdio_write(struct rtl8169_private *tp, int reg, int value)
|
|
||||||
{
|
|
||||||
r8168dp_1_mdio_access(tp, reg,
|
|
||||||
OCPDR_WRITE_CMD | (value & OCPDR_DATA_MASK));
|
|
||||||
}
|
|
||||||
|
|
||||||
static int r8168dp_1_mdio_read(struct rtl8169_private *tp, int reg)
|
|
||||||
{
|
|
||||||
r8168dp_1_mdio_access(tp, reg, OCPDR_READ_CMD);
|
|
||||||
|
|
||||||
mdelay(1);
|
|
||||||
RTL_W32(tp, OCPAR, OCPAR_GPHY_READ_CMD);
|
|
||||||
RTL_W32(tp, EPHY_RXER_NUM, 0);
|
|
||||||
|
|
||||||
return rtl_loop_wait_high(tp, &rtl_ocpar_cond, 1000, 100) ?
|
|
||||||
RTL_R32(tp, OCPDR) & OCPDR_DATA_MASK : -ETIMEDOUT;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define R8168DP_1_MDIO_ACCESS_BIT 0x00020000
|
#define R8168DP_1_MDIO_ACCESS_BIT 0x00020000
|
||||||
|
|
||||||
static void r8168dp_2_mdio_start(struct rtl8169_private *tp)
|
static void r8168dp_2_mdio_start(struct rtl8169_private *tp)
|
||||||
|
@ -1053,9 +1025,6 @@ static int r8168dp_2_mdio_read(struct rtl8169_private *tp, int reg)
|
||||||
static void rtl_writephy(struct rtl8169_private *tp, int location, int val)
|
static void rtl_writephy(struct rtl8169_private *tp, int location, int val)
|
||||||
{
|
{
|
||||||
switch (tp->mac_version) {
|
switch (tp->mac_version) {
|
||||||
case RTL_GIGA_MAC_VER_27:
|
|
||||||
r8168dp_1_mdio_write(tp, location, val);
|
|
||||||
break;
|
|
||||||
case RTL_GIGA_MAC_VER_28:
|
case RTL_GIGA_MAC_VER_28:
|
||||||
case RTL_GIGA_MAC_VER_31:
|
case RTL_GIGA_MAC_VER_31:
|
||||||
r8168dp_2_mdio_write(tp, location, val);
|
r8168dp_2_mdio_write(tp, location, val);
|
||||||
|
@ -1072,8 +1041,6 @@ static void rtl_writephy(struct rtl8169_private *tp, int location, int val)
|
||||||
static int rtl_readphy(struct rtl8169_private *tp, int location)
|
static int rtl_readphy(struct rtl8169_private *tp, int location)
|
||||||
{
|
{
|
||||||
switch (tp->mac_version) {
|
switch (tp->mac_version) {
|
||||||
case RTL_GIGA_MAC_VER_27:
|
|
||||||
return r8168dp_1_mdio_read(tp, location);
|
|
||||||
case RTL_GIGA_MAC_VER_28:
|
case RTL_GIGA_MAC_VER_28:
|
||||||
case RTL_GIGA_MAC_VER_31:
|
case RTL_GIGA_MAC_VER_31:
|
||||||
return r8168dp_2_mdio_read(tp, location);
|
return r8168dp_2_mdio_read(tp, location);
|
||||||
|
@ -1235,7 +1202,6 @@ static bool r8168ep_check_dash(struct rtl8169_private *tp)
|
||||||
static enum rtl_dash_type rtl_check_dash(struct rtl8169_private *tp)
|
static enum rtl_dash_type rtl_check_dash(struct rtl8169_private *tp)
|
||||||
{
|
{
|
||||||
switch (tp->mac_version) {
|
switch (tp->mac_version) {
|
||||||
case RTL_GIGA_MAC_VER_27:
|
|
||||||
case RTL_GIGA_MAC_VER_28:
|
case RTL_GIGA_MAC_VER_28:
|
||||||
case RTL_GIGA_MAC_VER_31:
|
case RTL_GIGA_MAC_VER_31:
|
||||||
return r8168dp_check_dash(tp) ? RTL_DASH_DP : RTL_DASH_NONE;
|
return r8168dp_check_dash(tp) ? RTL_DASH_DP : RTL_DASH_NONE;
|
||||||
|
@ -2040,8 +2006,7 @@ static enum mac_version rtl8169_get_mac_version(u16 xid, bool gmii)
|
||||||
|
|
||||||
/* 8168DP family. */
|
/* 8168DP family. */
|
||||||
/* It seems this early RTL8168dp version never made it to
|
/* It seems this early RTL8168dp version never made it to
|
||||||
* the wild. Let's see whether somebody complains, if not
|
* the wild. Support has been removed.
|
||||||
* we'll remove support for this chip version completely.
|
|
||||||
* { 0x7cf, 0x288, RTL_GIGA_MAC_VER_27 },
|
* { 0x7cf, 0x288, RTL_GIGA_MAC_VER_27 },
|
||||||
*/
|
*/
|
||||||
{ 0x7cf, 0x28a, RTL_GIGA_MAC_VER_28 },
|
{ 0x7cf, 0x28a, RTL_GIGA_MAC_VER_28 },
|
||||||
|
@ -2371,7 +2336,7 @@ static void rtl_jumbo_config(struct rtl8169_private *tp)
|
||||||
r8168c_hw_jumbo_disable(tp);
|
r8168c_hw_jumbo_disable(tp);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RTL_GIGA_MAC_VER_27 ... RTL_GIGA_MAC_VER_28:
|
case RTL_GIGA_MAC_VER_28:
|
||||||
if (jumbo)
|
if (jumbo)
|
||||||
r8168dp_hw_jumbo_enable(tp);
|
r8168dp_hw_jumbo_enable(tp);
|
||||||
else
|
else
|
||||||
|
@ -3719,7 +3684,6 @@ static void rtl_hw_config(struct rtl8169_private *tp)
|
||||||
[RTL_GIGA_MAC_VER_24] = rtl_hw_start_8168cp_3,
|
[RTL_GIGA_MAC_VER_24] = rtl_hw_start_8168cp_3,
|
||||||
[RTL_GIGA_MAC_VER_25] = rtl_hw_start_8168d,
|
[RTL_GIGA_MAC_VER_25] = rtl_hw_start_8168d,
|
||||||
[RTL_GIGA_MAC_VER_26] = rtl_hw_start_8168d,
|
[RTL_GIGA_MAC_VER_26] = rtl_hw_start_8168d,
|
||||||
[RTL_GIGA_MAC_VER_27] = rtl_hw_start_8168d,
|
|
||||||
[RTL_GIGA_MAC_VER_28] = rtl_hw_start_8168d_4,
|
[RTL_GIGA_MAC_VER_28] = rtl_hw_start_8168d_4,
|
||||||
[RTL_GIGA_MAC_VER_29] = rtl_hw_start_8105e_1,
|
[RTL_GIGA_MAC_VER_29] = rtl_hw_start_8105e_1,
|
||||||
[RTL_GIGA_MAC_VER_30] = rtl_hw_start_8105e_2,
|
[RTL_GIGA_MAC_VER_30] = rtl_hw_start_8105e_2,
|
||||||
|
@ -3982,7 +3946,6 @@ static void rtl8169_cleanup(struct rtl8169_private *tp, bool going_down)
|
||||||
goto no_reset;
|
goto no_reset;
|
||||||
|
|
||||||
switch (tp->mac_version) {
|
switch (tp->mac_version) {
|
||||||
case RTL_GIGA_MAC_VER_27:
|
|
||||||
case RTL_GIGA_MAC_VER_28:
|
case RTL_GIGA_MAC_VER_28:
|
||||||
case RTL_GIGA_MAC_VER_31:
|
case RTL_GIGA_MAC_VER_31:
|
||||||
rtl_loop_wait_low(tp, &rtl_npq_cond, 20, 2000);
|
rtl_loop_wait_low(tp, &rtl_npq_cond, 20, 2000);
|
||||||
|
|
|
@ -548,64 +548,6 @@ static void rtl8168d_2_hw_phy_config(struct rtl8169_private *tp,
|
||||||
rtl8168d_apply_firmware_cond(tp, phydev, 0xb300);
|
rtl8168d_apply_firmware_cond(tp, phydev, 0xb300);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rtl8168d_3_hw_phy_config(struct rtl8169_private *tp,
|
|
||||||
struct phy_device *phydev)
|
|
||||||
{
|
|
||||||
static const struct phy_reg phy_reg_init[] = {
|
|
||||||
{ 0x1f, 0x0002 },
|
|
||||||
{ 0x10, 0x0008 },
|
|
||||||
{ 0x0d, 0x006c },
|
|
||||||
|
|
||||||
{ 0x1f, 0x0000 },
|
|
||||||
{ 0x0d, 0xf880 },
|
|
||||||
|
|
||||||
{ 0x1f, 0x0001 },
|
|
||||||
{ 0x17, 0x0cc0 },
|
|
||||||
|
|
||||||
{ 0x1f, 0x0001 },
|
|
||||||
{ 0x0b, 0xa4d8 },
|
|
||||||
{ 0x09, 0x281c },
|
|
||||||
{ 0x07, 0x2883 },
|
|
||||||
{ 0x0a, 0x6b35 },
|
|
||||||
{ 0x1d, 0x3da4 },
|
|
||||||
{ 0x1c, 0xeffd },
|
|
||||||
{ 0x14, 0x7f52 },
|
|
||||||
{ 0x18, 0x7fc6 },
|
|
||||||
{ 0x08, 0x0601 },
|
|
||||||
{ 0x06, 0x4063 },
|
|
||||||
{ 0x10, 0xf074 },
|
|
||||||
{ 0x1f, 0x0003 },
|
|
||||||
{ 0x13, 0x0789 },
|
|
||||||
{ 0x12, 0xf4bd },
|
|
||||||
{ 0x1a, 0x04fd },
|
|
||||||
{ 0x14, 0x84b0 },
|
|
||||||
{ 0x1f, 0x0000 },
|
|
||||||
{ 0x00, 0x9200 },
|
|
||||||
|
|
||||||
{ 0x1f, 0x0005 },
|
|
||||||
{ 0x01, 0x0340 },
|
|
||||||
{ 0x1f, 0x0001 },
|
|
||||||
{ 0x04, 0x4000 },
|
|
||||||
{ 0x03, 0x1d21 },
|
|
||||||
{ 0x02, 0x0c32 },
|
|
||||||
{ 0x01, 0x0200 },
|
|
||||||
{ 0x00, 0x5554 },
|
|
||||||
{ 0x04, 0x4800 },
|
|
||||||
{ 0x04, 0x4000 },
|
|
||||||
{ 0x04, 0xf000 },
|
|
||||||
{ 0x03, 0xdf01 },
|
|
||||||
{ 0x02, 0xdf20 },
|
|
||||||
{ 0x01, 0x101a },
|
|
||||||
{ 0x00, 0xa0ff },
|
|
||||||
{ 0x04, 0xf800 },
|
|
||||||
{ 0x04, 0xf000 },
|
|
||||||
{ 0x1f, 0x0000 },
|
|
||||||
};
|
|
||||||
|
|
||||||
rtl_writephy_batch(phydev, phy_reg_init);
|
|
||||||
r8168d_modify_extpage(phydev, 0x0023, 0x16, 0xffff, 0x0000);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void rtl8168d_4_hw_phy_config(struct rtl8169_private *tp,
|
static void rtl8168d_4_hw_phy_config(struct rtl8169_private *tp,
|
||||||
struct phy_device *phydev)
|
struct phy_device *phydev)
|
||||||
{
|
{
|
||||||
|
@ -1332,7 +1274,6 @@ void r8169_hw_phy_config(struct rtl8169_private *tp, struct phy_device *phydev,
|
||||||
[RTL_GIGA_MAC_VER_24] = rtl8168cp_2_hw_phy_config,
|
[RTL_GIGA_MAC_VER_24] = rtl8168cp_2_hw_phy_config,
|
||||||
[RTL_GIGA_MAC_VER_25] = rtl8168d_1_hw_phy_config,
|
[RTL_GIGA_MAC_VER_25] = rtl8168d_1_hw_phy_config,
|
||||||
[RTL_GIGA_MAC_VER_26] = rtl8168d_2_hw_phy_config,
|
[RTL_GIGA_MAC_VER_26] = rtl8168d_2_hw_phy_config,
|
||||||
[RTL_GIGA_MAC_VER_27] = rtl8168d_3_hw_phy_config,
|
|
||||||
[RTL_GIGA_MAC_VER_28] = rtl8168d_4_hw_phy_config,
|
[RTL_GIGA_MAC_VER_28] = rtl8168d_4_hw_phy_config,
|
||||||
[RTL_GIGA_MAC_VER_29] = rtl8105e_hw_phy_config,
|
[RTL_GIGA_MAC_VER_29] = rtl8105e_hw_phy_config,
|
||||||
[RTL_GIGA_MAC_VER_30] = rtl8105e_hw_phy_config,
|
[RTL_GIGA_MAC_VER_30] = rtl8105e_hw_phy_config,
|
||||||
|
|
Loading…
Reference in New Issue