ar71xx: refresh patches

Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 44303
This commit is contained in:
Luka Perkov 2015-02-07 17:48:39 +00:00
parent d81a8ad523
commit 0bbcdb21da
20 changed files with 53 additions and 59 deletions

View file

@ -1,6 +1,6 @@
--- a/drivers/mtd/Kconfig --- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig
@@ -189,6 +189,12 @@ config MTD_BCM47XX_PARTS @@ -184,6 +184,12 @@ config MTD_BCM47XX_PARTS
This provides partitions parser for devices based on BCM47xx This provides partitions parser for devices based on BCM47xx
boards. boards.
@ -15,7 +15,7 @@
depends on ADM5120 || ATHEROS_AR231X || ATHEROS_AR71XX || ATH79 depends on ADM5120 || ATHEROS_AR231X || ATHEROS_AR71XX || ATH79
--- a/drivers/mtd/Makefile --- a/drivers/mtd/Makefile
+++ b/drivers/mtd/Makefile +++ b/drivers/mtd/Makefile
@@ -20,6 +20,7 @@ obj-$(CONFIG_MTD_AR7_PARTS) += ar7part.o @@ -16,6 +16,7 @@ obj-$(CONFIG_MTD_AR7_PARTS) += ar7part.o
obj-$(CONFIG_MTD_BCM63XX_PARTS) += bcm63xxpart.o obj-$(CONFIG_MTD_BCM63XX_PARTS) += bcm63xxpart.o
obj-$(CONFIG_MTD_BCM47XX_PARTS) += bcm47xxpart.o obj-$(CONFIG_MTD_BCM47XX_PARTS) += bcm47xxpart.o
obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o

View file

@ -1,6 +1,6 @@
--- a/drivers/mtd/Kconfig --- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig
@@ -191,7 +191,7 @@ config MTD_BCM47XX_PARTS @@ -186,7 +186,7 @@ config MTD_BCM47XX_PARTS
config MTD_WRT160NL_PARTS config MTD_WRT160NL_PARTS
tristate "Linksys WRT160NL partitioning support" tristate "Linksys WRT160NL partitioning support"
@ -9,7 +9,7 @@
---help--- ---help---
Linksys WRT160NL partitioning support Linksys WRT160NL partitioning support
@@ -211,6 +211,12 @@ config MTD_MYLOADER_PARTS @@ -206,6 +206,12 @@ config MTD_MYLOADER_PARTS
You will still need the parsing functions to be called by the driver You will still need the parsing functions to be called by the driver
for your particular device. It won't happen automatically. for your particular device. It won't happen automatically.
@ -24,7 +24,7 @@
# #
--- a/drivers/mtd/Makefile --- a/drivers/mtd/Makefile
+++ b/drivers/mtd/Makefile +++ b/drivers/mtd/Makefile
@@ -20,6 +20,7 @@ obj-$(CONFIG_MTD_AR7_PARTS) += ar7part.o @@ -16,6 +16,7 @@ obj-$(CONFIG_MTD_AR7_PARTS) += ar7part.o
obj-$(CONFIG_MTD_BCM63XX_PARTS) += bcm63xxpart.o obj-$(CONFIG_MTD_BCM63XX_PARTS) += bcm63xxpart.o
obj-$(CONFIG_MTD_BCM47XX_PARTS) += bcm47xxpart.o obj-$(CONFIG_MTD_BCM47XX_PARTS) += bcm47xxpart.o
obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o

View file

@ -43,8 +43,7 @@
+ size_t readlen; + size_t readlen;
+ size_t done; + size_t done;
+ int ret; + int ret;
+
- spi_sync(flash->spi, &m);
+ ret = wait_till_ready(flash); + ret = wait_till_ready(flash);
+ if (ret) { + if (ret) {
+ mutex_unlock(&flash->lock); + mutex_unlock(&flash->lock);
@ -56,27 +55,28 @@
+ readlen = flash->max_read_len; + readlen = flash->max_read_len;
+ else + else
+ readlen = len; + readlen = len;
+
- *retlen = m.actual_length - m25p_cmdsz(flash) - dummy;
+ t[1].rx_buf = buf + ofs; + t[1].rx_buf = buf + ofs;
+ t[1].rx_nbits = m25p80_rx_nbits(flash); + t[1].rx_nbits = m25p80_rx_nbits(flash);
+ t[1].len = readlen; + t[1].len = readlen;
+
+ m25p_addr2cmd(flash, from + ofs, flash->command); + m25p_addr2cmd(flash, from + ofs, flash->command);
+ +
+ spi_sync(flash->spi, &m); + spi_sync(flash->spi, &m);
+
- spi_sync(flash->spi, &m);
+ done = m.actual_length - m25p_cmdsz(flash) - + done = m.actual_length - m25p_cmdsz(flash) -
+ dummy; + dummy;
+ if (done != readlen) { + if (done != readlen) {
+ mutex_unlock(&flash->lock); + mutex_unlock(&flash->lock);
+ return 1; + return 1;
+ } + }
+
- *retlen = m.actual_length - m25p_cmdsz(flash) - dummy;
+ ofs += done; + ofs += done;
+ len -= done; + len -= done;
+ } + }
+
+ *retlen = ofs; + *retlen = ofs;
mutex_unlock(&flash->lock); mutex_unlock(&flash->lock);

View file

@ -10,7 +10,7 @@
--- a/arch/mips/Kconfig --- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig +++ b/arch/mips/Kconfig
@@ -951,6 +951,9 @@ config MIPS_MSC @@ -952,6 +952,9 @@ config MIPS_MSC
config MIPS_NILE4 config MIPS_NILE4
bool bool

View file

@ -29,13 +29,11 @@
- 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;
@ -43,12 +41,14 @@
+ +
+ 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

@ -140,8 +140,8 @@
+ ubnt_loco_m_xw_setup); + ubnt_loco_m_xw_setup);
--- a/arch/mips/ath79/machtypes.h --- a/arch/mips/ath79/machtypes.h
+++ b/arch/mips/ath79/machtypes.h +++ b/arch/mips/ath79/machtypes.h
@@ -122,9 +122,11 @@ enum ath79_mach_type { @@ -123,9 +123,11 @@ enum ath79_mach_type {
ATH79_MACH_TL_WR941ND, /* TP-LINK TL-WR941ND */ ATH79_MACH_TL_WR941ND_V5, /* TP-LINK TL-WR941ND v5 */
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_LOCO_M_XW, /* Ubiquiti Loco M XW */ + ATH79_MACH_UBNT_LOCO_M_XW, /* Ubiquiti Loco M XW */

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
@@ -567,7 +567,7 @@ config ATH79_MACH_WNR2000 @@ -452,7 +452,7 @@ config ATH79_MACH_WNR2000
select ATH79_DEV_WMAC select ATH79_DEV_WMAC
config ATH79_MACH_WNR2000_V3 config ATH79_MACH_WNR2000_V3
@ -11,7 +11,7 @@
select ATH79_DEV_ETH select ATH79_DEV_ETH
--- a/arch/mips/ath79/machtypes.h --- a/arch/mips/ath79/machtypes.h
+++ b/arch/mips/ath79/machtypes.h +++ b/arch/mips/ath79/machtypes.h
@@ -173,6 +173,7 @@ enum ath79_mach_type { @@ -149,6 +149,7 @@ enum ath79_mach_type {
ATH79_MACH_WNR2000_V3, /* NETGEAR WNR2000 v3 */ ATH79_MACH_WNR2000_V3, /* NETGEAR WNR2000 v3 */
ATH79_MACH_WNR2200, /* NETGEAR WNR2200 */ ATH79_MACH_WNR2200, /* NETGEAR WNR2200 */
ATH79_MACH_WNR612_V2, /* NETGEAR WNR612 v2 */ ATH79_MACH_WNR612_V2, /* NETGEAR WNR612 v2 */

View file

@ -29,11 +29,11 @@
obj-$(CONFIG_ATH79_MACH_WPE72) += mach-wpe72.o obj-$(CONFIG_ATH79_MACH_WPE72) += mach-wpe72.o
--- a/arch/mips/ath79/machtypes.h --- a/arch/mips/ath79/machtypes.h
+++ b/arch/mips/ath79/machtypes.h +++ b/arch/mips/ath79/machtypes.h
@@ -145,6 +145,7 @@ enum ath79_mach_type { @@ -147,6 +147,7 @@ enum ath79_mach_type {
ATH79_MACH_WNDR4300, /* NETGEAR WNDR4300 */ ATH79_MACH_WNDR4300, /* NETGEAR WNDR4300 */
ATH79_MACH_WNR2000, /* NETGEAR WNR2000 */ ATH79_MACH_WNR2000, /* NETGEAR WNR2000 */
ATH79_MACH_WNR2000_V3, /* NETGEAR WNR2000 v3 */ ATH79_MACH_WNR2000_V3, /* NETGEAR WNR2000 v3 */
+ ATH79_MACH_WNR2000_V4, /* NETGEAR WNR2000 v4 */ + ATH79_MACH_WNR2000_V4, /* NETGEAR WNR2000 v4 */
ATH79_MACH_WNR2200, /* NETGEAR WNR2200 */ ATH79_MACH_WNR2200, /* NETGEAR WNR2200 */
ATH79_MACH_WNR612_V2, /* NETGEAR WNR612 v2 */ ATH79_MACH_WNR612_V2, /* NETGEAR WNR612 v2 */
ATH79_MACH_WP543, /* Compex WP543 */ ATH79_MACH_WNR1000_V2, /* NETGEAR WNR1000 v2 */

View file

@ -35,4 +35,4 @@
+ ATH79_MACH_TL_WR841N_V9, /* TP-LINK TL-WR841N/ND v9 */ + ATH79_MACH_TL_WR841N_V9, /* TP-LINK TL-WR841N/ND v9 */
ATH79_MACH_TL_WR842N_V2, /* TP-LINK TL-WR842N/ND v2 */ ATH79_MACH_TL_WR842N_V2, /* TP-LINK TL-WR842N/ND v2 */
ATH79_MACH_TL_WR941ND, /* TP-LINK TL-WR941ND */ ATH79_MACH_TL_WR941ND, /* TP-LINK TL-WR941ND */
ATH79_MACH_UBNT_AIRROUTER, /* Ubiquiti AirRouter */ ATH79_MACH_TL_WR941ND_V5, /* TP-LINK TL-WR941ND v5 */

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"
@@ -407,3 +409,65 @@ MIPS_MACHINE(ATH79_MACH_UBNT_NANO_M_XW, @@ -452,3 +454,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);
@ -80,9 +80,9 @@
+ +
--- a/arch/mips/ath79/machtypes.h --- a/arch/mips/ath79/machtypes.h
+++ b/arch/mips/ath79/machtypes.h +++ b/arch/mips/ath79/machtypes.h
@@ -144,6 +144,7 @@ enum ath79_mach_type { @@ -145,6 +145,7 @@ enum ath79_mach_type {
ATH79_MACH_TL_WR842N_V2, /* TP-LINK TL-WR842N/ND v2 */
ATH79_MACH_TL_WR941ND, /* TP-LINK TL-WR941ND */ ATH79_MACH_TL_WR941ND, /* TP-LINK TL-WR941ND */
ATH79_MACH_TL_WR941ND_V5, /* TP-LINK TL-WR941ND v5 */
ATH79_MACH_TUBE2H, /* Alfa Network Tube2H */ ATH79_MACH_TUBE2H, /* Alfa Network Tube2H */
+ ATH79_MACH_UBNT_AIRGW, /* Ubiquiti AirGateway */ + ATH79_MACH_UBNT_AIRGW, /* Ubiquiti AirGateway */
ATH79_MACH_UBNT_AIRROUTER, /* Ubiquiti AirRouter */ ATH79_MACH_UBNT_AIRROUTER, /* Ubiquiti AirRouter */

View file

@ -1,6 +1,6 @@
--- a/arch/mips/ath79/machtypes.h --- a/arch/mips/ath79/machtypes.h
+++ b/arch/mips/ath79/machtypes.h +++ b/arch/mips/ath79/machtypes.h
@@ -185,6 +185,7 @@ enum ath79_mach_type { @@ -188,6 +188,7 @@ enum ath79_mach_type {
ATH79_MACH_WZR_HP_G300NH, /* Buffalo WZR-HP-G300NH */ ATH79_MACH_WZR_HP_G300NH, /* Buffalo WZR-HP-G300NH */
ATH79_MACH_WZR_HP_G300NH2, /* Buffalo WZR-HP-G300NH2 */ ATH79_MACH_WZR_HP_G300NH2, /* Buffalo WZR-HP-G300NH2 */
ATH79_MACH_WZR_HP_G450H, /* Buffalo WZR-HP-G450H */ ATH79_MACH_WZR_HP_G450H, /* Buffalo WZR-HP-G450H */

View file

@ -1,7 +1,5 @@
Index: linux-3.14.28/arch/mips/ath79/Kconfig --- a/arch/mips/ath79/Kconfig
=================================================================== +++ b/arch/mips/ath79/Kconfig
--- linux-3.14.28.orig/arch/mips/ath79/Kconfig
+++ linux-3.14.28/arch/mips/ath79/Kconfig
@@ -803,6 +803,16 @@ config ATH79_MACH_TL_WAX50RE @@ -803,6 +803,16 @@ config ATH79_MACH_TL_WAX50RE
select ATH79_DEV_M25P80 select ATH79_DEV_M25P80
select ATH79_DEV_WMAC select ATH79_DEV_WMAC
@ -19,10 +17,8 @@ Index: linux-3.14.28/arch/mips/ath79/Kconfig
config ATH79_MACH_TL_WA830RE_V2 config ATH79_MACH_TL_WA830RE_V2
bool "TP-LINK TL-WA830RE v2 support" bool "TP-LINK TL-WA830RE v2 support"
select SOC_AR934X select SOC_AR934X
Index: linux-3.14.28/arch/mips/ath79/Makefile --- a/arch/mips/ath79/Makefile
=================================================================== +++ b/arch/mips/ath79/Makefile
--- linux-3.14.28.orig/arch/mips/ath79/Makefile
+++ linux-3.14.28/arch/mips/ath79/Makefile
@@ -109,6 +109,7 @@ obj-$(CONFIG_ATH79_MACH_TL_MR13U) += mac @@ -109,6 +109,7 @@ obj-$(CONFIG_ATH79_MACH_TL_MR13U) += mac
obj-$(CONFIG_ATH79_MACH_TL_MR3020) += mach-tl-mr3020.o obj-$(CONFIG_ATH79_MACH_TL_MR3020) += mach-tl-mr3020.o
obj-$(CONFIG_ATH79_MACH_TL_MR3X20) += mach-tl-mr3x20.o obj-$(CONFIG_ATH79_MACH_TL_MR3X20) += mach-tl-mr3x20.o
@ -31,10 +27,8 @@ Index: linux-3.14.28/arch/mips/ath79/Makefile
obj-$(CONFIG_ATH79_MACH_TL_WA830RE_V2) += mach-tl-wa830re-v2.o obj-$(CONFIG_ATH79_MACH_TL_WA830RE_V2) += mach-tl-wa830re-v2.o
obj-$(CONFIG_ATH79_MACH_TL_WA901ND) += mach-tl-wa901nd.o obj-$(CONFIG_ATH79_MACH_TL_WA901ND) += mach-tl-wa901nd.o
obj-$(CONFIG_ATH79_MACH_TL_WA901ND_V2) += mach-tl-wa901nd-v2.o obj-$(CONFIG_ATH79_MACH_TL_WA901ND_V2) += mach-tl-wa901nd-v2.o
Index: linux-3.14.28/arch/mips/ath79/machtypes.h --- a/arch/mips/ath79/machtypes.h
=================================================================== +++ b/arch/mips/ath79/machtypes.h
--- linux-3.14.28.orig/arch/mips/ath79/machtypes.h
+++ linux-3.14.28/arch/mips/ath79/machtypes.h
@@ -126,6 +126,7 @@ enum ath79_mach_type { @@ -126,6 +126,7 @@ enum ath79_mach_type {
ATH79_MACH_TL_MR3220_V2, /* TP-LINK TL-MR3220 v2 */ ATH79_MACH_TL_MR3220_V2, /* TP-LINK TL-MR3220 v2 */
ATH79_MACH_TL_MR3420, /* TP-LINK TL-MR3420 */ ATH79_MACH_TL_MR3420, /* TP-LINK TL-MR3420 */