This commit backports patches from OpenWrt's master branch which increase cache performance, reduce NAPI weight and fix bugs.
150 lines
4.8 KiB
Diff
150 lines
4.8 KiB
Diff
From: Felix Fietkau <nbd@nbd.name>
|
|
Date: Fri, 2 Mar 2018 21:30:10 +0100
|
|
Subject: ar71xx: remove pdata->fifo_cfg*
|
|
|
|
The values are the same for all chipsets that use it
|
|
|
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
|
|
index 5f971ea32d35035617229076b7a7fc30ed4d2dcc..b46bab7886c363a1559da6f4d7ad0c8e27b7ae10 100644
|
|
--- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
|
|
+++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
|
|
@@ -900,13 +900,6 @@ void __init ath79_register_eth(unsigned int id)
|
|
}
|
|
pdata->has_gbit = 1;
|
|
pdata->is_ar724x = 1;
|
|
-
|
|
- if (!pdata->fifo_cfg1)
|
|
- pdata->fifo_cfg1 = 0x0010ffff;
|
|
- if (!pdata->fifo_cfg2)
|
|
- pdata->fifo_cfg2 = 0x015500aa;
|
|
- if (!pdata->fifo_cfg3)
|
|
- pdata->fifo_cfg3 = 0x01f00140;
|
|
break;
|
|
|
|
case ATH79_SOC_AR7241:
|
|
@@ -936,13 +929,6 @@ void __init ath79_register_eth(unsigned int id)
|
|
pdata->is_ar724x = 1;
|
|
if (ath79_soc == ATH79_SOC_AR7240)
|
|
pdata->is_ar7240 = 1;
|
|
-
|
|
- if (!pdata->fifo_cfg1)
|
|
- pdata->fifo_cfg1 = 0x0010ffff;
|
|
- if (!pdata->fifo_cfg2)
|
|
- pdata->fifo_cfg2 = 0x015500aa;
|
|
- if (!pdata->fifo_cfg3)
|
|
- pdata->fifo_cfg3 = 0x01f00140;
|
|
break;
|
|
|
|
case ATH79_SOC_AR9132:
|
|
@@ -979,13 +965,6 @@ void __init ath79_register_eth(unsigned int id)
|
|
}
|
|
|
|
pdata->is_ar724x = 1;
|
|
-
|
|
- if (!pdata->fifo_cfg1)
|
|
- pdata->fifo_cfg1 = 0x0010ffff;
|
|
- if (!pdata->fifo_cfg2)
|
|
- pdata->fifo_cfg2 = 0x015500aa;
|
|
- if (!pdata->fifo_cfg3)
|
|
- pdata->fifo_cfg3 = 0x01f00140;
|
|
break;
|
|
|
|
case ATH79_SOC_AR9341:
|
|
@@ -1016,13 +995,6 @@ void __init ath79_register_eth(unsigned int id)
|
|
|
|
pdata->max_frame_len = SZ_16K - 1;
|
|
pdata->desc_pktlen_mask = SZ_16K - 1;
|
|
-
|
|
- if (!pdata->fifo_cfg1)
|
|
- pdata->fifo_cfg1 = 0x0010ffff;
|
|
- if (!pdata->fifo_cfg2)
|
|
- pdata->fifo_cfg2 = 0x015500aa;
|
|
- if (!pdata->fifo_cfg3)
|
|
- pdata->fifo_cfg3 = 0x01f00140;
|
|
break;
|
|
|
|
case ATH79_SOC_TP9343:
|
|
@@ -1048,13 +1020,6 @@ void __init ath79_register_eth(unsigned int id)
|
|
|
|
pdata->has_gbit = 1;
|
|
pdata->is_ar724x = 1;
|
|
-
|
|
- if (!pdata->fifo_cfg1)
|
|
- pdata->fifo_cfg1 = 0x0010ffff;
|
|
- if (!pdata->fifo_cfg2)
|
|
- pdata->fifo_cfg2 = 0x015500aa;
|
|
- if (!pdata->fifo_cfg3)
|
|
- pdata->fifo_cfg3 = 0x01f00140;
|
|
break;
|
|
|
|
case ATH79_SOC_QCA9556:
|
|
@@ -1082,13 +1047,6 @@ void __init ath79_register_eth(unsigned int id)
|
|
*/
|
|
pdata->max_frame_len = SZ_4K - 1;
|
|
pdata->desc_pktlen_mask = SZ_16K - 1;
|
|
-
|
|
- if (!pdata->fifo_cfg1)
|
|
- pdata->fifo_cfg1 = 0x0010ffff;
|
|
- if (!pdata->fifo_cfg2)
|
|
- pdata->fifo_cfg2 = 0x015500aa;
|
|
- if (!pdata->fifo_cfg3)
|
|
- pdata->fifo_cfg3 = 0x01f00140;
|
|
break;
|
|
|
|
case ATH79_SOC_QCA956X:
|
|
@@ -1121,13 +1079,6 @@ void __init ath79_register_eth(unsigned int id)
|
|
|
|
pdata->has_gbit = 1;
|
|
pdata->is_ar724x = 1;
|
|
-
|
|
- if (!pdata->fifo_cfg1)
|
|
- pdata->fifo_cfg1 = 0x0010ffff;
|
|
- if (!pdata->fifo_cfg2)
|
|
- pdata->fifo_cfg2 = 0x015500aa;
|
|
- if (!pdata->fifo_cfg3)
|
|
- pdata->fifo_cfg3 = 0x01f00140;
|
|
break;
|
|
|
|
default:
|
|
diff --git a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
|
|
index 5fdc59c7b78b84670daefa9fd831b154ded84ddc..c4c3a6d44c935b84b5d6dae58a4f441e5492463c 100644
|
|
--- a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
|
|
+++ b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
|
|
@@ -45,10 +45,6 @@ struct ag71xx_platform_data {
|
|
void (*set_speed)(int speed);
|
|
void (*update_pll)(u32 pll_10, u32 pll_100, u32 pll_1000);
|
|
|
|
- u32 fifo_cfg1;
|
|
- u32 fifo_cfg2;
|
|
- u32 fifo_cfg3;
|
|
-
|
|
unsigned int max_frame_len;
|
|
unsigned int desc_pktlen_mask;
|
|
};
|
|
diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
|
|
index 2f4218e08a9749ffc45c8265e7931f205e8e7935..33237e01e6b191ff30449458f1a22ee44ba6d9e2 100644
|
|
--- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
|
|
+++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
|
|
@@ -460,8 +460,8 @@ static void ag71xx_hw_setup(struct ag71xx *ag)
|
|
/* setup FIFO configuration registers */
|
|
ag71xx_wr(ag, AG71XX_REG_FIFO_CFG0, FIFO_CFG0_INIT);
|
|
if (pdata->is_ar724x) {
|
|
- ag71xx_wr(ag, AG71XX_REG_FIFO_CFG1, pdata->fifo_cfg1);
|
|
- ag71xx_wr(ag, AG71XX_REG_FIFO_CFG2, pdata->fifo_cfg2);
|
|
+ ag71xx_wr(ag, AG71XX_REG_FIFO_CFG1, 0x0010ffff);
|
|
+ ag71xx_wr(ag, AG71XX_REG_FIFO_CFG2, 0x015500aa);
|
|
} else {
|
|
ag71xx_wr(ag, AG71XX_REG_FIFO_CFG1, 0x0fff0000);
|
|
ag71xx_wr(ag, AG71XX_REG_FIFO_CFG2, 0x00001fff);
|
|
@@ -603,7 +603,7 @@ __ag71xx_link_adjust(struct ag71xx *ag, bool update)
|
|
if (pdata->is_ar91xx)
|
|
fifo3 = 0x00780fff;
|
|
else if (pdata->is_ar724x)
|
|
- fifo3 = pdata->fifo_cfg3;
|
|
+ fifo3 = 0x01f00140;
|
|
else
|
|
fifo3 = 0x008001ff;
|
|
|