Skip to content

Commit

Permalink
ar71xx: update kernel patch to upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsnowwolf committed Nov 28, 2018
1 parent abb35b7 commit 8f16df4
Show file tree
Hide file tree
Showing 11 changed files with 82 additions and 58 deletions.
8 changes: 1 addition & 7 deletions target/linux/ar71xx/config-4.14
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ CONFIG_ATH79=y
# CONFIG_ATH79_MACH_GL_INET is not set
# CONFIG_ATH79_MACH_GL_MIFI is not set
# CONFIG_ATH79_MACH_GL_USB150 is not set
# CONFIG_ATH79_MACH_GS_MINIBOX_V32 is not set
# CONFIG_ATH79_MACH_GS_OOLITE_V1 is not set
# CONFIG_ATH79_MACH_GS_OOLITE_V5_2 is not set
# CONFIG_ATH79_MACH_HIVEAP_121 is not set
Expand Down Expand Up @@ -222,8 +223,6 @@ CONFIG_ATH79=y
# CONFIG_ATH79_MACH_TL_WR1043ND_V2 is not set
# CONFIG_ATH79_MACH_TL_WR1043ND_V4 is not set
# CONFIG_ATH79_MACH_TL_WR1043N_V5 is not set
# CONFIG_ATH79_MACH_TL_WR2041N_V1 is not set
# CONFIG_ATH79_MACH_TL_WR2041N_V2 is not set
# CONFIG_ATH79_MACH_TL_WR2543N is not set
# CONFIG_ATH79_MACH_TL_WR703N is not set
# CONFIG_ATH79_MACH_TL_WR720N_V3 is not set
Expand All @@ -237,13 +236,10 @@ CONFIG_ATH79=y
# CONFIG_ATH79_MACH_TL_WR841N_V1 is not set
# CONFIG_ATH79_MACH_TL_WR841N_V8 is not set
# CONFIG_ATH79_MACH_TL_WR841N_V9 is not set
# CONFIG_ATH79_MACH_TL_WR880N_V1 is not set
# CONFIG_ATH79_MACH_TL_WR881N_V1 is not set
# CONFIG_ATH79_MACH_TL_WR902AC_V1 is not set
# CONFIG_ATH79_MACH_TL_WR940N_V4 is not set
# CONFIG_ATH79_MACH_TL_WR941ND is not set
# CONFIG_ATH79_MACH_TL_WR941ND_V6 is not set
# CONFIG_ATH79_MACH_TL_WR941N_V7 is not set
# CONFIG_ATH79_MACH_TL_WR942N_V1 is not set
# CONFIG_ATH79_MACH_TS_D084 is not set
# CONFIG_ATH79_MACH_TUBE2H is not set
Expand Down Expand Up @@ -422,7 +418,6 @@ CONFIG_MTD_PHYSMAP=y
CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-2
CONFIG_MTD_REDBOOT_PARTS=y
CONFIG_MTD_SPI_NOR=y
# CONFIG_MTD_SPLIT_SQUASHFS_ROOT is not set
CONFIG_MTD_SPLIT_EVA_FW=y
CONFIG_MTD_SPLIT_FIRMWARE=y
CONFIG_MTD_SPLIT_LZMA_FW=y
Expand Down Expand Up @@ -489,4 +484,3 @@ CONFIG_SYS_SUPPORTS_ZBOOT=y
CONFIG_SYS_SUPPORTS_ZBOOT_UART_PROM=y
CONFIG_TICK_CPU_ACCOUNTING=y
CONFIG_USB_SUPPORT=y
CONFIG_MIPS_FPU_EMULATOR=y
9 changes: 0 additions & 9 deletions target/linux/ar71xx/config-4.9
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ CONFIG_ATH79=y
# CONFIG_ATH79_MACH_ARCHER_C25_V1 is not set
# CONFIG_ATH79_MACH_ARCHER_C58_V1 is not set
# CONFIG_ATH79_MACH_ARCHER_C59_V1 is not set
# CONFIG_ATH79_MACH_ARCHER_C59_V2 is not set
# CONFIG_ATH79_MACH_ARCHER_C60_V1 is not set
# CONFIG_ATH79_MACH_ARCHER_C60_V2 is not set
# CONFIG_ATH79_MACH_ARCHER_C7 is not set
Expand Down Expand Up @@ -125,7 +124,6 @@ CONFIG_ATH79=y
# CONFIG_ATH79_MACH_GL_AR300 is not set
# CONFIG_ATH79_MACH_GL_AR300M is not set
# CONFIG_ATH79_MACH_GL_AR750 is not set
# CONFIG_ATH79_MACH_GL_AR750S is not set
# CONFIG_ATH79_MACH_GL_DOMINO is not set
# CONFIG_ATH79_MACH_GL_INET is not set
# CONFIG_ATH79_MACH_GL_MIFI is not set
Expand Down Expand Up @@ -222,8 +220,6 @@ CONFIG_ATH79=y
# CONFIG_ATH79_MACH_TL_WR1043ND_V2 is not set
# CONFIG_ATH79_MACH_TL_WR1043ND_V4 is not set
# CONFIG_ATH79_MACH_TL_WR1043N_V5 is not set
# CONFIG_ATH79_MACH_TL_WR2041N_V1 is not set
# CONFIG_ATH79_MACH_TL_WR2041N_V2 is not set
# CONFIG_ATH79_MACH_TL_WR2543N is not set
# CONFIG_ATH79_MACH_TL_WR703N is not set
# CONFIG_ATH79_MACH_TL_WR720N_V3 is not set
Expand All @@ -237,13 +233,10 @@ CONFIG_ATH79=y
# CONFIG_ATH79_MACH_TL_WR841N_V1 is not set
# CONFIG_ATH79_MACH_TL_WR841N_V8 is not set
# CONFIG_ATH79_MACH_TL_WR841N_V9 is not set
# CONFIG_ATH79_MACH_TL_WR880N_V1 is not set
# CONFIG_ATH79_MACH_TL_WR881N_V1 is not set
# CONFIG_ATH79_MACH_TL_WR902AC_V1 is not set
# CONFIG_ATH79_MACH_TL_WR940N_V4 is not set
# CONFIG_ATH79_MACH_TL_WR941ND is not set
# CONFIG_ATH79_MACH_TL_WR941ND_V6 is not set
# CONFIG_ATH79_MACH_TL_WR941N_V7 is not set
# CONFIG_ATH79_MACH_TL_WR942N_V1 is not set
# CONFIG_ATH79_MACH_TS_D084 is not set
# CONFIG_ATH79_MACH_TUBE2H is not set
Expand Down Expand Up @@ -421,7 +414,6 @@ CONFIG_MTD_PHYSMAP=y
CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-2
CONFIG_MTD_REDBOOT_PARTS=y
CONFIG_MTD_SPI_NOR=y
# CONFIG_MTD_SPLIT_SQUASHFS_ROOT is not set
CONFIG_MTD_SPLIT_EVA_FW=y
CONFIG_MTD_SPLIT_FIRMWARE=y
CONFIG_MTD_SPLIT_LZMA_FW=y
Expand Down Expand Up @@ -488,4 +480,3 @@ CONFIG_SYS_SUPPORTS_ZBOOT=y
CONFIG_SYS_SUPPORTS_ZBOOT_UART_PROM=y
CONFIG_TICK_CPU_ACCOUNTING=y
CONFIG_USB_SUPPORT=y
CONFIG_MIPS_FPU_EMULATOR=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -1635,8 +1635,8 @@ static int __xipram do_write_oneword(str
break;
}

- if (chip_ready(map, adr))
- break;
+ if (chip_good(map, adr, datum))
+ goto enable_xip;

/* Latency issues. Drop the lock, wait a while and retry */
UDELAY(map, chip, adr, 1);
@@ -1652,6 +1652,8 @@ static int __xipram do_write_oneword(str

ret = -EIO;
}
+
+ enable_xip:
xip_enable(map, chip, adr);
op_done:
if (mode == FL_OTP_WRITE)
@@ -2230,7 +2232,6 @@ static int cfi_amdstd_panic_write(struct
return 0;
}

-
/*
* Handle devices with one erase region, that only implement
* the chip erase command.
@@ -2298,7 +2299,7 @@ static int __xipram do_erase_chip(struct
}

if (chip_good(map, adr, map_word_ff(map)))
- break;
+ goto op_done;

if (time_after(jiffies, timeo)) {
printk(KERN_WARNING "MTD %s(): software timeout\n",
@@ -2322,6 +2323,7 @@ static int __xipram do_erase_chip(struct
}
}

+ op_done:
chip->state = FL_READY;
xip_enable(map, chip, adr);
DISABLE_VPP(map);
@@ -2395,7 +2397,7 @@ static int __xipram do_erase_oneblock(st

if (chip_good(map, adr, map_word_ff(map))) {
xip_enable(map, chip, adr);
- break;
+ goto op_done;
}

if (time_after(jiffies, timeo)) {
@@ -2421,6 +2423,7 @@ static int __xipram do_erase_oneblock(st
}
}

+ op_done:
chip->state = FL_READY;
DISABLE_VPP(map);
put_chip(map, chip, adr);
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,23 @@

/* Atmel chips don't use the same PRI format as AMD chips */
static void fixup_convert_atmel_pri(struct mtd_info *mtd)
@@ -1792,6 +1796,7 @@ static int cfi_amdstd_write_words(struct
@@ -1794,6 +1798,7 @@ static int cfi_amdstd_write_words(struct
/*
* FIXME: interleaved mode not tested, and probably not supported!
*/
+#if !FORCE_WORD_WRITE
static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
unsigned long adr, const u_char *buf,
int len)
@@ -1920,7 +1925,6 @@ static int __xipram do_write_buffer(stru
@@ -1922,7 +1927,6 @@ static int __xipram do_write_buffer(stru
return ret;
}

-
static int cfi_amdstd_write_buffers(struct mtd_info *mtd, loff_t to, size_t len,
size_t *retlen, const u_char *buf)
{
@@ -1995,6 +1999,7 @@ static int cfi_amdstd_write_buffers(stru
@@ -1997,6 +2001,7 @@ static int cfi_amdstd_write_buffers(stru

return 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
#define AR71XX_GPIO_COUNT 16
#define AR7240_GPIO_COUNT 18
#define AR7241_GPIO_COUNT 20
@@ -570,4 +681,237 @@
@@ -570,4 +681,235 @@
#define AR934X_SRIF_DPLL2_OUTDIV_SHIFT 13
#define AR934X_SRIF_DPLL2_OUTDIV_MASK 0x7

Expand Down Expand Up @@ -433,8 +433,6 @@
+#define QCA955X_GMAC_REG_ETH_CFG 0x00
+
+#define QCA955X_ETH_CFG_RGMII_EN BIT(0)
+#define QCA955X_ETH_CFG_GE0_MII_EN BIT(1)
+#define QCA955X_ETH_CFG_GE0_MII_SLAVE BIT(4)
+#define QCA955X_ETH_CFG_MII_GE0 BIT(1)
+#define QCA955X_ETH_CFG_GMII_GE0 BIT(2)
+#define QCA955X_ETH_CFG_MII_GE0_MASTER BIT(3)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/drivers/mtd/redboot.c
+++ b/drivers/mtd/redboot.c
@@ -77,12 +77,18 @@ static int parse_redboot_partitions(stru
@@ -76,12 +76,18 @@ static int parse_redboot_partitions(stru
static char nullstring[] = "unallocated";
#endif

Expand All @@ -19,7 +19,7 @@
return -EIO;
}
offset -= master->erasesize;
@@ -95,10 +101,6 @@ static int parse_redboot_partitions(stru
@@ -94,10 +100,6 @@ static int parse_redboot_partitions(stru
goto nogood;
}
}
Expand All @@ -30,7 +30,7 @@

printk(KERN_NOTICE "Searching for RedBoot partition table in %s at offset 0x%lx\n",
master->name, offset);
@@ -171,6 +173,11 @@ static int parse_redboot_partitions(stru
@@ -170,6 +172,11 @@ static int parse_redboot_partitions(stru
}
if (i == numslots) {
/* Didn't find it */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,23 @@

/* Atmel chips don't use the same PRI format as AMD chips */
static void fixup_convert_atmel_pri(struct mtd_info *mtd)
@@ -1788,6 +1792,7 @@ static int cfi_amdstd_write_words(struct
@@ -1790,6 +1794,7 @@ static int cfi_amdstd_write_words(struct
/*
* FIXME: interleaved mode not tested, and probably not supported!
*/
+#if !FORCE_WORD_WRITE
static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
unsigned long adr, const u_char *buf,
int len)
@@ -1916,7 +1921,6 @@ static int __xipram do_write_buffer(stru
@@ -1918,7 +1923,6 @@ static int __xipram do_write_buffer(stru
return ret;
}

-
static int cfi_amdstd_write_buffers(struct mtd_info *mtd, loff_t to, size_t len,
size_t *retlen, const u_char *buf)
{
@@ -1991,6 +1995,7 @@ static int cfi_amdstd_write_buffers(stru
@@ -1993,6 +1997,7 @@ static int cfi_amdstd_write_buffers(stru

return 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
#define AR71XX_GPIO_COUNT 16
#define AR7240_GPIO_COUNT 18
#define AR7241_GPIO_COUNT 20
@@ -570,4 +681,237 @@
@@ -570,4 +681,235 @@
#define AR934X_SRIF_DPLL2_OUTDIV_SHIFT 13
#define AR934X_SRIF_DPLL2_OUTDIV_MASK 0x7

Expand Down Expand Up @@ -433,8 +433,6 @@
+#define QCA955X_GMAC_REG_ETH_CFG 0x00
+
+#define QCA955X_ETH_CFG_RGMII_EN BIT(0)
+#define QCA955X_ETH_CFG_GE0_MII_EN BIT(1)
+#define QCA955X_ETH_CFG_GE0_MII_SLAVE BIT(4)
+#define QCA955X_ETH_CFG_MII_GE0 BIT(1)
+#define QCA955X_ETH_CFG_GMII_GE0 BIT(2)
+#define QCA955X_ETH_CFG_MII_GE0_MASTER BIT(3)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/arch/mips/ath79/prom.c
+++ b/arch/mips/ath79/prom.c
@@ -136,6 +136,32 @@ void __init prom_init(void)
@@ -136,6 +136,31 @@ void __init prom_init(void)
initrd_end = initrd_start + fw_getenvl("initrd_size");
}
#endif
Expand All @@ -22,7 +22,6 @@
+ strstr(arcs_cmdline, "board=map-hb") ||
+ strstr(arcs_cmdline, "board=map2-hb") ||
+ strstr(arcs_cmdline, "board=wap-hb") ||
+ strstr(arcs_cmdline, "board=wap-lte") ||
+ strstr(arcs_cmdline, "board=wapg-sc") ||
+ strstr(arcs_cmdline, "board=2011L") ||
+ strstr(arcs_cmdline, "board=2011r") ||
Expand Down
10 changes: 5 additions & 5 deletions target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@

#define IP6_MF 0x0001
#define IP6_OFFSET 0xFFF8
@@ -443,8 +443,8 @@ static inline void __ipv6_addr_set_half(
@@ -436,8 +436,8 @@ static inline void __ipv6_addr_set_half(
}
#endif
#endif
Expand All @@ -632,7 +632,7 @@
}

static inline void ipv6_addr_set(struct in6_addr *addr,
@@ -503,6 +503,8 @@ static inline bool ipv6_prefix_equal(con
@@ -496,6 +496,8 @@ static inline bool ipv6_prefix_equal(con
const __be32 *a1 = addr1->s6_addr32;
const __be32 *a2 = addr2->s6_addr32;
unsigned int pdw, pbi;
Expand All @@ -641,7 +641,7 @@

/* check complete u32 in prefix */
pdw = prefixlen >> 5;
@@ -511,7 +513,9 @@ static inline bool ipv6_prefix_equal(con
@@ -504,7 +506,9 @@ static inline bool ipv6_prefix_equal(con

/* check incomplete u32 in prefix */
pbi = prefixlen & 0x1f;
Expand All @@ -652,7 +652,7 @@
return false;

return true;
@@ -655,13 +659,13 @@ static inline void ipv6_addr_set_v4mappe
@@ -633,13 +637,13 @@ static inline void ipv6_addr_set_v4mappe
*/
static inline int __ipv6_addr_diff32(const void *token1, const void *token2, int addrlen)
{
Expand All @@ -668,7 +668,7 @@
if (xb)
return i * 32 + 31 - __fls(ntohl(xb));
}
@@ -830,17 +834,18 @@ static inline int ip6_default_np_autolab
@@ -808,17 +812,18 @@ static inline int ip6_default_np_autolab
static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass,
__be32 flowlabel)
{
Expand Down
20 changes: 0 additions & 20 deletions target/linux/ar71xx/patches-4.9/999-mdio_hack.patch

This file was deleted.

0 comments on commit 8f16df4

Please sign in to comment.