ar71xx: refresh 3.10 patches

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43051
lede-17.01
Felix Fietkau 2014-10-24 20:39:42 +00:00
parent 7004b79665
commit 2eb6b059ba
14 changed files with 79 additions and 85 deletions

View File

@ -29,11 +29,13 @@
- u32 bootstrap; - u32 bootstrap;
+ void __iomem *phy_reg; + void __iomem *phy_reg;
+ u32 t; + u32 t;
+
- bootstrap = ath79_reset_rr(AR934X_RESET_REG_BOOTSTRAP);
- if (bootstrap & AR934X_BOOTSTRAP_USB_MODE_DEVICE)
+ phy_reg = ioremap(base, 4); + phy_reg = ioremap(base, 4);
+ if (!phy_reg) + if (!phy_reg)
+ return; return;
+
+ t = ioread32(phy_reg); + t = ioread32(phy_reg);
+ t &= ~0xff; + t &= ~0xff;
+ t |= 0x58; + t |= 0x58;
@ -41,14 +43,12 @@
+ +
+ iounmap(phy_reg); + iounmap(phy_reg);
+} +}
+
- bootstrap = ath79_reset_rr(AR934X_RESET_REG_BOOTSTRAP);
- if (bootstrap & AR934X_BOOTSTRAP_USB_MODE_DEVICE)
+static void ar934x_usb_reset_notifier(struct platform_device *pdev) +static void ar934x_usb_reset_notifier(struct platform_device *pdev)
+{ +{
+ if (pdev->id != -1) + if (pdev->id != -1)
return; + return;
+
+ enable_tx_tx_idp_violation_fix(0x18116c94); + enable_tx_tx_idp_violation_fix(0x18116c94);
+ dev_info(&pdev->dev, "TX-TX IDP fix enabled\n"); + dev_info(&pdev->dev, "TX-TX IDP fix enabled\n");
+} +}

View File

@ -209,13 +209,13 @@
config ATH79_MACH_AP121 config ATH79_MACH_AP121
bool "Atheros AP121 reference board" bool "Atheros AP121 reference board"
select SOC_AR933X select SOC_AR933X
@@ -9,64 +64,736 @@ config ATH79_MACH_AP121 @@ -11,62 +66,734 @@ config ATH79_MACH_AP121
select ATH79_DEV_GPIO_BUTTONS
select ATH79_DEV_LEDS_GPIO
select ATH79_DEV_M25P80 select ATH79_DEV_M25P80
- select ATH79_DEV_USB select ATH79_DEV_USB
+ select ATH79_DEV_USB select ATH79_DEV_WMAC
+ select ATH79_DEV_WMAC - help
- Say 'Y' here if you want your kernel to support the
- Atheros AP121 reference board.
+ help + help
+ Say 'Y' here if you want your kernel to support the + Say 'Y' here if you want your kernel to support the
+ Atheros AP121 reference board. + Atheros AP121 reference board.
@ -678,13 +678,8 @@
+ select ATH79_DEV_GPIO_BUTTONS + select ATH79_DEV_GPIO_BUTTONS
+ select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_LEDS_GPIO
+ select ATH79_DEV_M25P80 + select ATH79_DEV_M25P80
select ATH79_DEV_WMAC + select ATH79_DEV_WMAC
- help +
- Say 'Y' here if you want your kernel to support the
- Atheros AP121 reference board.
-config ATH79_MACH_AP136
- bool "Atheros AP136/AP135 reference board"
+config ATH79_MACH_EAP7660D +config ATH79_MACH_EAP7660D
+ bool "Senao EAP7660D support" + bool "Senao EAP7660D support"
+ select SOC_AR71XX + select SOC_AR71XX
@ -695,7 +690,30 @@
+ +
+config ATH79_MACH_ARCHER_C7 +config ATH79_MACH_ARCHER_C7
+ bool "TP-LINK Archer C7 board support" + bool "TP-LINK Archer C7 board support"
select SOC_QCA955X + select SOC_QCA955X
+ select ATH79_DEV_ETH
+ select ATH79_DEV_GPIO_BUTTONS
+ select ATH79_DEV_LEDS_GPIO
+ select ATH79_DEV_M25P80
+ select ATH79_DEV_USB
+ select ATH79_DEV_WMAC
+
+config ATH79_MACH_TL_MR11U
+ bool "TP-LINK TL-MR11U/TL-MR3040 support"
+ select SOC_AR933X
+ select ATH79_DEV_ETH
+ select ATH79_DEV_GPIO_BUTTONS
+ select ATH79_DEV_LEDS_GPIO
+ select ATH79_DEV_M25P80
+ select ATH79_DEV_USB
+ select ATH79_DEV_WMAC
-config ATH79_MACH_AP136
- bool "Atheros AP136/AP135 reference board"
- select SOC_QCA955X
+config ATH79_MACH_TL_MR13U
+ bool "TP-LINK TL-MR13U support"
+ select SOC_AR933X
+ select ATH79_DEV_ETH + select ATH79_DEV_ETH
select ATH79_DEV_GPIO_BUTTONS select ATH79_DEV_GPIO_BUTTONS
select ATH79_DEV_LEDS_GPIO select ATH79_DEV_LEDS_GPIO
@ -710,26 +728,6 @@
-config ATH79_MACH_AP81 -config ATH79_MACH_AP81
- bool "Atheros AP81 reference board" - bool "Atheros AP81 reference board"
+config ATH79_MACH_TL_MR11U
+ bool "TP-LINK TL-MR11U/TL-MR3040 support"
+ select SOC_AR933X
+ select ATH79_DEV_ETH
+ select ATH79_DEV_GPIO_BUTTONS
+ select ATH79_DEV_LEDS_GPIO
+ select ATH79_DEV_M25P80
+ select ATH79_DEV_USB
+ select ATH79_DEV_WMAC
+
+config ATH79_MACH_TL_MR13U
+ bool "TP-LINK TL-MR13U support"
+ select SOC_AR933X
+ select ATH79_DEV_ETH
+ select ATH79_DEV_GPIO_BUTTONS
+ select ATH79_DEV_LEDS_GPIO
+ select ATH79_DEV_M25P80
+ select ATH79_DEV_USB
+ select ATH79_DEV_WMAC
+
+config ATH79_MACH_TL_MR3020 +config ATH79_MACH_TL_MR3020
+ bool "TP-LINK TL-MR3020 support" + bool "TP-LINK TL-MR3020 support"
+ select SOC_AR933X + select SOC_AR933X
@ -853,9 +851,10 @@
+ bool "TP-LINK TL-WR841N v1 support" + bool "TP-LINK TL-WR841N v1 support"
select SOC_AR71XX select SOC_AR71XX
+ select ATH79_DEV_DSA + select ATH79_DEV_DSA
+ select ATH79_DEV_ETH select ATH79_DEV_ETH
+ select ATH79_DEV_GPIO_BUTTONS select ATH79_DEV_GPIO_BUTTONS
+ select ATH79_DEV_LEDS_GPIO select ATH79_DEV_LEDS_GPIO
- select ATH79_DEV_SPI
+ select ATH79_DEV_M25P80 + select ATH79_DEV_M25P80
+ +
+config ATH79_MACH_TL_WR841N_V8 +config ATH79_MACH_TL_WR841N_V8
@ -902,15 +901,11 @@
+config ATH79_MACH_TL_WR1043ND_V2 +config ATH79_MACH_TL_WR1043ND_V2
+ bool "TP-LINK TL-WR1043ND v2 support" + bool "TP-LINK TL-WR1043ND v2 support"
+ select SOC_QCA955X + select SOC_QCA955X
select ATH79_DEV_ETH + select ATH79_DEV_ETH
select ATH79_DEV_GPIO_BUTTONS + select ATH79_DEV_GPIO_BUTTONS
select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_LEDS_GPIO
- select ATH79_DEV_SPI
+ select ATH79_DEV_M25P80 + select ATH79_DEV_M25P80
select ATH79_DEV_USB + select ATH79_DEV_USB
- help
- Say 'Y' here if you want your kernel to support the
- Atheros PB44 reference board.
+ select ATH79_DEV_WMAC + select ATH79_DEV_WMAC
+ +
+config ATH79_MACH_TL_WR2543N +config ATH79_MACH_TL_WR2543N
@ -970,7 +965,10 @@
+ select ATH79_DEV_GPIO_BUTTONS + select ATH79_DEV_GPIO_BUTTONS
+ select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_LEDS_GPIO
+ select ATH79_DEV_M25P80 + select ATH79_DEV_M25P80
+ select ATH79_DEV_USB select ATH79_DEV_USB
- help
- Say 'Y' here if you want your kernel to support the
- Atheros PB44 reference board.
config ATH79_MACH_UBNT_XM config ATH79_MACH_UBNT_XM
bool "Ubiquiti Networks XM/UniFi boards" bool "Ubiquiti Networks XM/UniFi boards"

View File

@ -7,7 +7,7 @@
+ ATH79_MACH_TUBE2H, /* Alfa Network Tube2H */ + ATH79_MACH_TUBE2H, /* Alfa Network Tube2H */
ATH79_MACH_UBNT_AIRROUTER, /* Ubiquiti AirRouter */ ATH79_MACH_UBNT_AIRROUTER, /* Ubiquiti AirRouter */
ATH79_MACH_UBNT_BULLET_M, /* Ubiquiti Bullet M */ ATH79_MACH_UBNT_BULLET_M, /* Ubiquiti Bullet M */
ATH79_MACH_UBNT_LSSR71, /* Ubiquiti LS-SR71 */ ATH79_MACH_UBNT_LOCO_M_XW, /* Ubiquiti Loco M XW */
--- a/arch/mips/ath79/Kconfig --- a/arch/mips/ath79/Kconfig
+++ b/arch/mips/ath79/Kconfig +++ b/arch/mips/ath79/Kconfig
@@ -29,6 +29,15 @@ config ATH79_MACH_ALFA_NX @@ -29,6 +29,15 @@ config ATH79_MACH_ALFA_NX

View File

@ -12,7 +12,7 @@
#include "dev-ap9x-pci.h" #include "dev-ap9x-pci.h"
#include "dev-eth.h" #include "dev-eth.h"
#include "dev-gpio-buttons.h" #include "dev-gpio-buttons.h"
@@ -406,3 +408,65 @@ MIPS_MACHINE(ATH79_MACH_UBNT_NANO_M_XW, @@ -407,3 +409,65 @@ MIPS_MACHINE(ATH79_MACH_UBNT_NANO_M_XW,
MIPS_MACHINE(ATH79_MACH_UBNT_LOCO_M_XW, "UBNT-LOCO-XW", "Ubiquiti Loco M XW", MIPS_MACHINE(ATH79_MACH_UBNT_LOCO_M_XW, "UBNT-LOCO-XW", "Ubiquiti Loco M XW",
ubnt_loco_m_xw_setup); ubnt_loco_m_xw_setup);

View File

@ -1,7 +1,5 @@
Index: linux-3.10.49/arch/mips/ath79/mach-rb2011.c --- a/arch/mips/ath79/mach-rb2011.c
=================================================================== +++ b/arch/mips/ath79/mach-rb2011.c
--- linux-3.10.49.orig/arch/mips/ath79/mach-rb2011.c
+++ linux-3.10.49/arch/mips/ath79/mach-rb2011.c
@@ -323,7 +323,7 @@ MIPS_MACHINE_NONAME(ATH79_MACH_RB_2011US @@ -323,7 +323,7 @@ MIPS_MACHINE_NONAME(ATH79_MACH_RB_2011US
static void __init rb2011r5_setup(void) static void __init rb2011r5_setup(void)
@ -11,10 +9,8 @@ Index: linux-3.10.49/arch/mips/ath79/mach-rb2011.c
} }
MIPS_MACHINE_NONAME(ATH79_MACH_RB_2011R5, "2011r5", rb2011r5_setup); MIPS_MACHINE_NONAME(ATH79_MACH_RB_2011R5, "2011r5", rb2011r5_setup);
Index: linux-3.10.49/arch/mips/ath79/machtypes.h --- a/arch/mips/ath79/machtypes.h
=================================================================== +++ b/arch/mips/ath79/machtypes.h
--- linux-3.10.49.orig/arch/mips/ath79/machtypes.h
+++ linux-3.10.49/arch/mips/ath79/machtypes.h
@@ -99,7 +99,7 @@ enum ath79_mach_type { @@ -99,7 +99,7 @@ enum ath79_mach_type {
ATH79_MACH_RB_2011G, /* Mikrotik RouterBOARD 2011UAS-2HnD */ ATH79_MACH_RB_2011G, /* Mikrotik RouterBOARD 2011UAS-2HnD */
ATH79_MACH_RB_2011L, /* Mikrotik RouterBOARD 2011L */ ATH79_MACH_RB_2011L, /* Mikrotik RouterBOARD 2011L */

View File

@ -1,6 +1,6 @@
--- a/arch/mips/ath79/Kconfig --- a/arch/mips/ath79/Kconfig
+++ b/arch/mips/ath79/Kconfig +++ b/arch/mips/ath79/Kconfig
@@ -1034,6 +1034,17 @@ @@ -1034,6 +1034,17 @@ config ATH79_MACH_BHU_BXU2000N2_A
select ATH79_DEV_USB select ATH79_DEV_USB
select ATH79_DEV_WMAC select ATH79_DEV_WMAC
@ -20,7 +20,7 @@
config SOC_AR71XX config SOC_AR71XX
--- a/arch/mips/ath79/machtypes.h --- a/arch/mips/ath79/machtypes.h
+++ b/arch/mips/ath79/machtypes.h +++ b/arch/mips/ath79/machtypes.h
@@ -80,6 +80,7 @@ @@ -80,6 +80,7 @@ enum ath79_mach_type {
ATH79_MACH_OM5P, /* OpenMesh OM5P */ ATH79_MACH_OM5P, /* OpenMesh OM5P */
ATH79_MACH_PB42, /* Atheros PB42 */ ATH79_MACH_PB42, /* Atheros PB42 */
ATH79_MACH_PB92, /* Atheros PB92 */ ATH79_MACH_PB92, /* Atheros PB92 */
@ -30,7 +30,7 @@
ATH79_MACH_RB_433, /* MikroTik RouterBOARD 433/433AH */ ATH79_MACH_RB_433, /* MikroTik RouterBOARD 433/433AH */
--- a/arch/mips/ath79/Makefile --- a/arch/mips/ath79/Makefile
+++ b/arch/mips/ath79/Makefile +++ b/arch/mips/ath79/Makefile
@@ -85,6 +85,7 @@ @@ -85,6 +85,7 @@ obj-$(CONFIG_ATH79_MACH_OM5P) += mach-o
obj-$(CONFIG_ATH79_MACH_PB42) += mach-pb42.o obj-$(CONFIG_ATH79_MACH_PB42) += mach-pb42.o
obj-$(CONFIG_ATH79_MACH_PB44) += mach-pb44.o obj-$(CONFIG_ATH79_MACH_PB44) += mach-pb44.o
obj-$(CONFIG_ATH79_MACH_PB92) += mach-pb92.o obj-$(CONFIG_ATH79_MACH_PB92) += mach-pb92.o

View File

@ -380,7 +380,7 @@
for (p = *head; p; p = p->next) { for (p = *head; p; p = p->next) {
--- a/net/ipv4/route.c --- a/net/ipv4/route.c
+++ b/net/ipv4/route.c +++ b/net/ipv4/route.c
@@ -461,7 +461,7 @@ static struct neighbour *ipv4_neigh_look @@ -462,7 +462,7 @@ static struct neighbour *ipv4_neigh_look
else if (skb) else if (skb)
pkey = &ip_hdr(skb)->daddr; pkey = &ip_hdr(skb)->daddr;
@ -720,7 +720,7 @@
return false; return false;
return true; return true;
@@ -587,13 +591,13 @@ static inline void ipv6_addr_set_v4mappe @@ -592,13 +596,13 @@ static inline void ipv6_addr_set_v4mappe
*/ */
static inline int __ipv6_addr_diff32(const void *token1, const void *token2, int addrlen) static inline int __ipv6_addr_diff32(const void *token1, const void *token2, int addrlen)
{ {
@ -736,7 +736,7 @@
if (xb) if (xb)
return i * 32 + 31 - __fls(ntohl(xb)); return i * 32 + 31 - __fls(ntohl(xb));
} }
@@ -657,12 +661,13 @@ extern void ipv6_select_ident(struct fra @@ -660,12 +664,13 @@ static inline int ipv6_addr_diff(const s
static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass, static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass,
__be32 flowlabel) __be32 flowlabel)
{ {
@ -760,8 +760,8 @@
#include <linux/types.h> #include <linux/types.h>
+#include <linux/in6.h> +#include <linux/in6.h>
extern __u32 secure_ip_id(__be32 daddr); extern u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport);
extern __u32 secure_ipv6_id(const __be32 daddr[4]); extern u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr,
--- a/include/uapi/linux/in.h --- a/include/uapi/linux/in.h
+++ b/include/uapi/linux/in.h +++ b/include/uapi/linux/in.h
@@ -55,7 +55,7 @@ enum { @@ -55,7 +55,7 @@ enum {
@ -803,7 +803,7 @@
secret[4] = net_secret[4] + (__force u32)dport; secret[4] = net_secret[4] + (__force u32)dport;
for (i = 5; i < MD5_MESSAGE_BYTES / 4; i++) for (i = 5; i < MD5_MESSAGE_BYTES / 4; i++)
secret[i] = net_secret[i]; secret[i] = net_secret[i];
@@ -185,11 +187,12 @@ u64 secure_dccpv6_sequence_number(__be32 @@ -160,11 +162,12 @@ u64 secure_dccpv6_sequence_number(__be32
u32 hash[MD5_DIGEST_WORDS]; u32 hash[MD5_DIGEST_WORDS];
u64 seq; u64 seq;
u32 i; u32 i;