rockchip: remove LED configuration hack for r8169
Upstream now uses standard ETH LED bindings to configure LED registers. However, we don't use the r8169 driver for rockchip, so simply remove this outdated hack. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
c9a2cc2a3c
commit
cda5cfb9d5
@ -1,57 +0,0 @@
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <linux/in.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/ip.h>
|
||||
+#include <linux/of.h>
|
||||
#include <linux/tcp.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
@@ -174,6 +175,7 @@ enum rtl_registers {
|
||||
MAR0 = 8, /* Multicast filter. */
|
||||
CounterAddrLow = 0x10,
|
||||
CounterAddrHigh = 0x14,
|
||||
+ CustomLED = 0x18,
|
||||
TxDescStartAddrLow = 0x20,
|
||||
TxDescStartAddrHigh = 0x24,
|
||||
TxHDescStartAddrLow = 0x28,
|
||||
@@ -2204,6 +2206,22 @@ void r8169_apply_firmware(struct rtl8169
|
||||
}
|
||||
}
|
||||
|
||||
+static int rtl8169_led_configuration(struct rtl8169_private *tp)
|
||||
+{
|
||||
+ u32 led_data;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = of_property_read_u32(tp->pci_dev->dev.of_node,
|
||||
+ "realtek,led-data", &led_data);
|
||||
+
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ RTL_W16(tp, CustomLED, led_data);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void rtl8168_config_eee_mac(struct rtl8169_private *tp)
|
||||
{
|
||||
/* Adjust EEE LED frequency */
|
||||
@@ -3344,6 +3362,7 @@ static void rtl_hw_start_8168h_1(struct
|
||||
r8168_mac_ocp_write(tp, 0xe63e, 0x0000);
|
||||
r8168_mac_ocp_write(tp, 0xc094, 0x0000);
|
||||
r8168_mac_ocp_write(tp, 0xc09e, 0x0000);
|
||||
+ rtl8169_led_configuration(tp);
|
||||
}
|
||||
|
||||
static void rtl_hw_start_8168ep(struct rtl8169_private *tp)
|
||||
@@ -3695,6 +3714,7 @@ static void rtl_hw_start_8125b(struct rt
|
||||
rtl_set_def_aspm_entry_latency(tp);
|
||||
rtl_ephy_init(tp, e_info_8125b);
|
||||
rtl_hw_start_8125_common(tp);
|
||||
+ rtl8169_led_configuration(tp);
|
||||
}
|
||||
|
||||
static void rtl_hw_config(struct rtl8169_private *tp)
|
||||
@ -1,6 +1,14 @@
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -5260,6 +5260,7 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <linux/in.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/ip.h>
|
||||
+#include <linux/of.h>
|
||||
#include <linux/tcp.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
@@ -5240,6 +5241,7 @@ static int rtl_init_one(struct pci_dev *
|
||||
int jumbo_max, region, rc;
|
||||
enum mac_version chipset;
|
||||
struct net_device *dev;
|
||||
@ -8,7 +16,7 @@
|
||||
u32 txconfig;
|
||||
u16 xid;
|
||||
|
||||
@@ -5267,6 +5268,9 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5247,6 +5249,9 @@ static int rtl_init_one(struct pci_dev *
|
||||
if (!dev)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user