From 03110a1254dc8ec2564cacb1e8e236412b7822bd Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Fri, 19 Jun 2015 11:12:43 +0000 Subject: kernel: update 4.0 to 4.0.5 Changelog: * https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.5 Signed-off-by: Jonas Gorski git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46063 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ...XX-Support-SPROM-prefixes-for-PCI-devices.patch | 9 ++--- ...7XX-Use-helpers-for-reading-NVRAM-content.patch | 7 +--- ...X-Use-strnchr-to-avoid-reading-out-of-the.patch | 7 +--- ...xx-Move-NVRAM-header-to-the-include-linux.patch | 30 +---------------- ...X-Fix-coding-style-to-match-kernel-standa.patch | 39 ++++++---------------- ...X-Include-io.h-directly-and-fix-brace-ind.patch | 7 +--- ...47XX-Increase-NVRAM-buffer-size-to-64-KiB.patch | 5 --- ...X-Don-t-try-guessing-NVRAM-size-on-MTD-pa.patch | 30 ++++++++--------- ...x-Keep-ID-entries-for-non-standard-device.patch | 13 +++----- ...xx-Devices-database-update-for-4.1-or-4.2.patch | 23 ++++--------- ...x-Add-generic-function-filling-SPROM-entr.patch | 11 ++---- ...x-Move-filling-most-of-SPROM-to-the-gener.patch | 22 +++++------- ...CM47XX-Make-sure-NVRAM-buffer-ends-with-0.patch | 5 --- ...X-Simplify-function-looking-for-NVRAM-ent.patch | 7 +--- ...x-Extract-all-boardflags-to-new-u32-field.patch | 4 +-- ...-BCM47xx-Extract-info-about-et2-interface.patch | 4 +-- ...CM47xx-Read-board-info-for-all-bcma-buses.patch | 15 ++------- ...x-Remove-legacy-__cpuinit-data-sections-t.patch | 11 +----- ...MIPS-BCM47XX-Support-Luxul-XWR-1750-board.patch | 19 +++-------- ...x-allow-retrieval-of-complete-nvram-conte.patch | 13 ++------ ...x-Add-helper-variable-for-storing-NVRAM-l.patch | 11 ++---- ...0-MIPS-BCM47xx-Don-t-select-BCMA_HOST_PCI.patch | 5 --- ...PCI-writes-setting-CardBus-bridge-resourc.patch | 7 +--- 23 files changed, 68 insertions(+), 236 deletions(-) (limited to 'target/linux/brcm47xx') diff --git a/target/linux/brcm47xx/patches-4.0/030-01-MIPS-BCM47XX-Support-SPROM-prefixes-for-PCI-devices.patch b/target/linux/brcm47xx/patches-4.0/030-01-MIPS-BCM47XX-Support-SPROM-prefixes-for-PCI-devices.patch index 095338f61d..e78b159e6f 100644 --- a/target/linux/brcm47xx/patches-4.0/030-01-MIPS-BCM47XX-Support-SPROM-prefixes-for-PCI-devices.patch +++ b/target/linux/brcm47xx/patches-4.0/030-01-MIPS-BCM47XX-Support-SPROM-prefixes-for-PCI-devices.patch @@ -17,11 +17,9 @@ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/sprom.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) -diff --git a/arch/mips/bcm47xx/sprom.c b/arch/mips/bcm47xx/sprom.c -index 2eff7fe..eff9205 100644 --- a/arch/mips/bcm47xx/sprom.c +++ b/arch/mips/bcm47xx/sprom.c -@@ -836,6 +836,38 @@ static int bcm47xx_get_sprom_ssb(struct ssb_bus *bus, struct ssb_sprom *out) +@@ -836,6 +836,38 @@ static int bcm47xx_get_sprom_ssb(struct #endif #if defined(CONFIG_BCM47XX_BCMA) @@ -60,7 +58,7 @@ index 2eff7fe..eff9205 100644 static int bcm47xx_get_sprom_bcma(struct bcma_bus *bus, struct ssb_sprom *out) { char prefix[10]; -@@ -847,6 +879,7 @@ static int bcm47xx_get_sprom_bcma(struct bcma_bus *bus, struct ssb_sprom *out) +@@ -847,6 +879,7 @@ static int bcm47xx_get_sprom_bcma(struct snprintf(prefix, sizeof(prefix), "pci/%u/%u/", bus->host_pci->bus->number + 1, PCI_SLOT(bus->host_pci->devfn)); @@ -68,6 +66,3 @@ index 2eff7fe..eff9205 100644 bcm47xx_fill_sprom(out, prefix, false); return 0; case BCMA_HOSTTYPE_SOC: --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.0/030-03-MIPS-BCM47XX-Use-helpers-for-reading-NVRAM-content.patch b/target/linux/brcm47xx/patches-4.0/030-03-MIPS-BCM47XX-Use-helpers-for-reading-NVRAM-content.patch index a028d9d67e..9c9865ff83 100644 --- a/target/linux/brcm47xx/patches-4.0/030-03-MIPS-BCM47XX-Use-helpers-for-reading-NVRAM-content.patch +++ b/target/linux/brcm47xx/patches-4.0/030-03-MIPS-BCM47XX-Use-helpers-for-reading-NVRAM-content.patch @@ -18,11 +18,9 @@ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/nvram.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) -diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c -index c5c381c..5e4ae04 100644 --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c -@@ -91,7 +91,6 @@ static int nvram_find_and_copy(void __iomem *iobase, u32 lim) +@@ -91,7 +91,6 @@ static int nvram_find_and_copy(void __io return -ENXIO; found: @@ -51,6 +49,3 @@ index c5c381c..5e4ae04 100644 return 0; } --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.0/030-04-MIPS-BCM47XX-Use-strnchr-to-avoid-reading-out-of-the.patch b/target/linux/brcm47xx/patches-4.0/030-04-MIPS-BCM47XX-Use-strnchr-to-avoid-reading-out-of-the.patch index 7b16835ae9..ee2e2732ff 100644 --- a/target/linux/brcm47xx/patches-4.0/030-04-MIPS-BCM47XX-Use-strnchr-to-avoid-reading-out-of-the.patch +++ b/target/linux/brcm47xx/patches-4.0/030-04-MIPS-BCM47XX-Use-strnchr-to-avoid-reading-out-of-the.patch @@ -16,8 +16,6 @@ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/nvram.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c -index 5e4ae04..d805d8a 100644 --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c @@ -175,7 +175,7 @@ static int nvram_init(void) @@ -29,7 +27,7 @@ index 5e4ae04..d805d8a 100644 if (!name) return -EINVAL; -@@ -191,7 +191,9 @@ int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len) +@@ -191,7 +191,9 @@ int bcm47xx_nvram_getenv(const char *nam end = nvram_buf + sizeof(nvram_buf) - 2; end[0] = end[1] = '\0'; for (; *var; var = value + strlen(value) + 1) { @@ -40,6 +38,3 @@ index 5e4ae04..d805d8a 100644 if (!eq) break; value = eq + 1; --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.0/030-05-MIPS-BCM47xx-Move-NVRAM-header-to-the-include-linux.patch b/target/linux/brcm47xx/patches-4.0/030-05-MIPS-BCM47xx-Move-NVRAM-header-to-the-include-linux.patch index d073a06d32..c1c0927cec 100644 --- a/target/linux/brcm47xx/patches-4.0/030-05-MIPS-BCM47xx-Move-NVRAM-header-to-the-include-linux.patch +++ b/target/linux/brcm47xx/patches-4.0/030-05-MIPS-BCM47xx-Move-NVRAM-header-to-the-include-linux.patch @@ -39,8 +39,6 @@ Signed-off-by: Ralf Baechle delete mode 100644 arch/mips/include/asm/mach-bcm47xx/bcm47xx_nvram.h create mode 100644 include/linux/bcm47xx_nvram.h -diff --git a/arch/mips/bcm47xx/board.c b/arch/mips/bcm47xx/board.c -index b3ae068..6e85130 100644 --- a/arch/mips/bcm47xx/board.c +++ b/arch/mips/bcm47xx/board.c @@ -1,8 +1,8 @@ @@ -53,8 +51,6 @@ index b3ae068..6e85130 100644 struct bcm47xx_board_type { const enum bcm47xx_board board; -diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c -index d805d8a..7c77a88 100644 --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c @@ -16,7 +16,7 @@ @@ -66,8 +62,6 @@ index d805d8a..7c77a88 100644 #define NVRAM_MAGIC 0x48534C46 /* 'FLSH' */ #define NVRAM_SPACE 0x8000 -diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c -index e43b504..b26c9c2 100644 --- a/arch/mips/bcm47xx/setup.c +++ b/arch/mips/bcm47xx/setup.c @@ -42,7 +42,6 @@ @@ -78,8 +72,6 @@ index e43b504..b26c9c2 100644 #include union bcm47xx_bus bcm47xx_bus; -diff --git a/arch/mips/bcm47xx/sprom.c b/arch/mips/bcm47xx/sprom.c -index eff9205..c114b02 100644 --- a/arch/mips/bcm47xx/sprom.c +++ b/arch/mips/bcm47xx/sprom.c @@ -27,7 +27,6 @@ @@ -90,8 +82,6 @@ index eff9205..c114b02 100644 #include #include -diff --git a/arch/mips/bcm47xx/time.c b/arch/mips/bcm47xx/time.c -index 2c85d92..5b46510 100644 --- a/arch/mips/bcm47xx/time.c +++ b/arch/mips/bcm47xx/time.c @@ -27,7 +27,6 @@ @@ -102,8 +92,6 @@ index 2c85d92..5b46510 100644 #include void __init plat_time_init(void) -diff --git a/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h b/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h -index 7527c1d..8ed77f6 100644 --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h @@ -22,6 +22,7 @@ @@ -139,8 +127,6 @@ index 7527c1d..8ed77f6 100644 - -#endif /* __BCM47XX_NVRAM_H */ +#include -diff --git a/drivers/bcma/driver_mips.c b/drivers/bcma/driver_mips.c -index 04faf6d..24424f3 100644 --- a/drivers/bcma/driver_mips.c +++ b/drivers/bcma/driver_mips.c @@ -21,7 +21,7 @@ @@ -152,11 +138,9 @@ index 04faf6d..24424f3 100644 #endif enum bcma_boot_dev { -diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c -index bd5916a..77363d6 100644 --- a/drivers/net/ethernet/broadcom/b44.c +++ b/drivers/net/ethernet/broadcom/b44.c -@@ -400,7 +400,7 @@ static void b44_set_flow_ctrl(struct b44 *bp, u32 local, u32 remote) +@@ -400,7 +400,7 @@ static void b44_set_flow_ctrl(struct b44 } #ifdef CONFIG_BCM47XX @@ -165,8 +149,6 @@ index bd5916a..77363d6 100644 static void b44_wap54g10_workaround(struct b44 *bp) { char buf[20]; -diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c -index 0469f72..be059df 100644 --- a/drivers/net/ethernet/broadcom/bgmac.c +++ b/drivers/net/ethernet/broadcom/bgmac.c @@ -18,7 +18,7 @@ @@ -178,8 +160,6 @@ index 0469f72..be059df 100644 static const struct bcma_device_id bgmac_bcma_tbl[] = { BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_4706_MAC_GBIT, BCMA_ANY_REV, BCMA_ANY_CLASS), -diff --git a/drivers/ssb/driver_chipcommon_pmu.c b/drivers/ssb/driver_chipcommon_pmu.c -index 1173a09..0942841 100644 --- a/drivers/ssb/driver_chipcommon_pmu.c +++ b/drivers/ssb/driver_chipcommon_pmu.c @@ -14,7 +14,7 @@ @@ -191,8 +171,6 @@ index 1173a09..0942841 100644 #endif #include "ssb_private.h" -diff --git a/drivers/ssb/driver_mipscore.c b/drivers/ssb/driver_mipscore.c -index 7b986f9..f87efef 100644 --- a/drivers/ssb/driver_mipscore.c +++ b/drivers/ssb/driver_mipscore.c @@ -16,7 +16,7 @@ @@ -204,9 +182,6 @@ index 7b986f9..f87efef 100644 #endif #include "ssb_private.h" -diff --git a/include/linux/bcm47xx_nvram.h b/include/linux/bcm47xx_nvram.h -new file mode 100644 -index 0000000..b12b07e --- /dev/null +++ b/include/linux/bcm47xx_nvram.h @@ -0,0 +1,34 @@ @@ -244,6 +219,3 @@ index 0000000..b12b07e +#endif + +#endif /* __BCM47XX_NVRAM_H */ --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.0/030-06-MIPS-BCM47XX-Fix-coding-style-to-match-kernel-standa.patch b/target/linux/brcm47xx/patches-4.0/030-06-MIPS-BCM47XX-Fix-coding-style-to-match-kernel-standa.patch index 0e93447e30..826307b325 100644 --- a/target/linux/brcm47xx/patches-4.0/030-06-MIPS-BCM47XX-Fix-coding-style-to-match-kernel-standa.patch +++ b/target/linux/brcm47xx/patches-4.0/030-06-MIPS-BCM47XX-Fix-coding-style-to-match-kernel-standa.patch @@ -25,8 +25,6 @@ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/time.c | 1 - 8 files changed, 34 insertions(+), 30 deletions(-) -diff --git a/arch/mips/bcm47xx/bcm47xx_private.h b/arch/mips/bcm47xx/bcm47xx_private.h -index ea909a5..41796be 100644 --- a/arch/mips/bcm47xx/bcm47xx_private.h +++ b/arch/mips/bcm47xx/bcm47xx_private.h @@ -1,6 +1,10 @@ @@ -40,8 +38,6 @@ index ea909a5..41796be 100644 #include /* prom.c */ -diff --git a/arch/mips/bcm47xx/board.c b/arch/mips/bcm47xx/board.c -index 6e85130..d4a5a51 100644 --- a/arch/mips/bcm47xx/board.c +++ b/arch/mips/bcm47xx/board.c @@ -330,9 +330,8 @@ void __init bcm47xx_board_detect(void) @@ -55,8 +51,6 @@ index 6e85130..d4a5a51 100644 board_detected = bcm47xx_board_get_nvram(); bcm47xx_board.board = board_detected->board; -diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c -index 7c77a88..6a97732 100644 --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c @@ -18,8 +18,10 @@ @@ -83,7 +77,7 @@ index 7c77a88..6a97732 100644 for (i = 0; i < sizeof(struct nvram_header); i += 4) *dst++ = __raw_readl(src++); for (; i < header->len && i < NVRAM_SPACE && i < size; i += 4) -@@ -189,7 +191,8 @@ int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len) +@@ -189,7 +191,8 @@ int bcm47xx_nvram_getenv(const char *nam /* Look for name=value and return value */ var = &nvram_buf[sizeof(struct nvram_header)]; end = nvram_buf + sizeof(nvram_buf) - 2; @@ -93,7 +87,7 @@ index 7c77a88..6a97732 100644 for (; *var; var = value + strlen(value) + 1) { data_left = end - var; -@@ -197,11 +200,10 @@ int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len) +@@ -197,11 +200,10 @@ int bcm47xx_nvram_getenv(const char *nam if (!eq) break; value = eq + 1; @@ -122,8 +116,6 @@ index 7c77a88..6a97732 100644 err = snprintf(nvram_var, sizeof(nvram_var), "gpio%i", i); if (err <= 0) continue; -diff --git a/arch/mips/bcm47xx/prom.c b/arch/mips/bcm47xx/prom.c -index 1b170bf..ab698ba 100644 --- a/arch/mips/bcm47xx/prom.c +++ b/arch/mips/bcm47xx/prom.c @@ -35,7 +35,6 @@ @@ -143,11 +135,9 @@ index 1b170bf..ab698ba 100644 break; } if (!memcmp(prom_init, prom_init + mem, 32)) -diff --git a/arch/mips/bcm47xx/serial.c b/arch/mips/bcm47xx/serial.c -index 2f5bbd6..df761d3 100644 --- a/arch/mips/bcm47xx/serial.c +++ b/arch/mips/bcm47xx/serial.c -@@ -36,8 +36,8 @@ static int __init uart8250_init_ssb(void) +@@ -36,8 +36,8 @@ static int __init uart8250_init_ssb(void struct plat_serial8250_port *p = &(uart8250_data[i]); struct ssb_serial_port *ssb_port = &(mcore->serial_ports[i]); @@ -158,7 +148,7 @@ index 2f5bbd6..df761d3 100644 p->irq = ssb_port->irq + 2; p->uartclk = ssb_port->baud_base; p->regshift = ssb_port->reg_shift; -@@ -62,8 +62,8 @@ static int __init uart8250_init_bcma(void) +@@ -62,8 +62,8 @@ static int __init uart8250_init_bcma(voi struct bcma_serial_port *bcma_port; bcma_port = &(cc->serial_ports[i]); @@ -169,8 +159,6 @@ index 2f5bbd6..df761d3 100644 p->irq = bcma_port->irq; p->uartclk = bcma_port->baud_base; p->regshift = bcma_port->reg_shift; -diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c -index b26c9c2..82ff9fd 100644 --- a/arch/mips/bcm47xx/setup.c +++ b/arch/mips/bcm47xx/setup.c @@ -52,7 +52,7 @@ EXPORT_SYMBOL(bcm47xx_bus_type); @@ -182,7 +170,7 @@ index b26c9c2..82ff9fd 100644 local_irq_disable(); /* Set the watchdog timer to reset immediately */ switch (bcm47xx_bus_type) { -@@ -107,7 +107,7 @@ static int bcm47xx_get_invariants(struct ssb_bus *bus, +@@ -107,7 +107,7 @@ static int bcm47xx_get_invariants(struct char buf[20]; /* Fill boardinfo structure */ @@ -191,7 +179,7 @@ index b26c9c2..82ff9fd 100644 bcm47xx_fill_ssb_boardinfo(&iv->boardinfo, NULL); -@@ -126,7 +126,7 @@ static void __init bcm47xx_register_ssb(void) +@@ -126,7 +126,7 @@ static void __init bcm47xx_register_ssb( char buf[100]; struct ssb_mipscore *mcore; @@ -200,7 +188,7 @@ index b26c9c2..82ff9fd 100644 bcm47xx_get_invariants); if (err) panic("Failed to initialize SSB bus (err %d)", err); -@@ -136,7 +136,7 @@ static void __init bcm47xx_register_ssb(void) +@@ -136,7 +136,7 @@ static void __init bcm47xx_register_ssb( if (strstr(buf, "console=ttyS1")) { struct ssb_serial_port port; @@ -227,11 +215,9 @@ index b26c9c2..82ff9fd 100644 #ifdef CONFIG_BCM47XX_SSB bcm47xx_bus_type = BCM47XX_BUS_TYPE_SSB; bcm47xx_sprom_register_fallbacks(); -diff --git a/arch/mips/bcm47xx/sprom.c b/arch/mips/bcm47xx/sprom.c -index c114b02..5d32afc 100644 --- a/arch/mips/bcm47xx/sprom.c +++ b/arch/mips/bcm47xx/sprom.c -@@ -780,8 +780,8 @@ void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix, +@@ -780,8 +780,8 @@ void bcm47xx_fill_sprom(struct ssb_sprom bcm47xx_fill_sprom_path_r4589(sprom, prefix, fallback); break; default: @@ -242,7 +228,7 @@ index c114b02..5d32afc 100644 sprom->revision = 1; bcm47xx_fill_sprom_r1234589(sprom, prefix, fallback); bcm47xx_fill_sprom_r12389(sprom, prefix, fallback); -@@ -828,7 +828,7 @@ static int bcm47xx_get_sprom_ssb(struct ssb_bus *bus, struct ssb_sprom *out) +@@ -828,7 +828,7 @@ static int bcm47xx_get_sprom_ssb(struct bcm47xx_fill_sprom(out, prefix, false); return 0; } else { @@ -251,7 +237,7 @@ index c114b02..5d32afc 100644 return -EINVAL; } } -@@ -893,7 +893,7 @@ static int bcm47xx_get_sprom_bcma(struct bcma_bus *bus, struct ssb_sprom *out) +@@ -893,7 +893,7 @@ static int bcm47xx_get_sprom_bcma(struct } return 0; default: @@ -260,8 +246,6 @@ index c114b02..5d32afc 100644 return -EINVAL; } } -diff --git a/arch/mips/bcm47xx/time.c b/arch/mips/bcm47xx/time.c -index 5b46510..74224cf 100644 --- a/arch/mips/bcm47xx/time.c +++ b/arch/mips/bcm47xx/time.c @@ -22,7 +22,6 @@ @@ -272,6 +256,3 @@ index 5b46510..74224cf 100644 #include #include #include --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.0/030-07-MIPS-BCM47XX-Include-io.h-directly-and-fix-brace-ind.patch b/target/linux/brcm47xx/patches-4.0/030-07-MIPS-BCM47XX-Include-io.h-directly-and-fix-brace-ind.patch index f7e404f6e3..6f96ee02bd 100644 --- a/target/linux/brcm47xx/patches-4.0/030-07-MIPS-BCM47XX-Include-io.h-directly-and-fix-brace-ind.patch +++ b/target/linux/brcm47xx/patches-4.0/030-07-MIPS-BCM47XX-Include-io.h-directly-and-fix-brace-ind.patch @@ -17,8 +17,6 @@ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/nvram.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c -index 6a97732..2357ea3 100644 --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c @@ -11,6 +11,7 @@ @@ -29,7 +27,7 @@ index 6a97732..2357ea3 100644 #include #include #include -@@ -203,7 +204,7 @@ int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len) +@@ -203,7 +204,7 @@ int bcm47xx_nvram_getenv(const char *nam if (eq - var == strlen(name) && strncmp(var, name, eq - var) == 0) return snprintf(val, val_len, "%s", value); @@ -38,6 +36,3 @@ index 6a97732..2357ea3 100644 return -ENOENT; } EXPORT_SYMBOL(bcm47xx_nvram_getenv); --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.0/030-08-MIPS-BCM47XX-Increase-NVRAM-buffer-size-to-64-KiB.patch b/target/linux/brcm47xx/patches-4.0/030-08-MIPS-BCM47XX-Increase-NVRAM-buffer-size-to-64-KiB.patch index af6ec8e891..a7cc1106b8 100644 --- a/target/linux/brcm47xx/patches-4.0/030-08-MIPS-BCM47XX-Increase-NVRAM-buffer-size-to-64-KiB.patch +++ b/target/linux/brcm47xx/patches-4.0/030-08-MIPS-BCM47XX-Increase-NVRAM-buffer-size-to-64-KiB.patch @@ -19,8 +19,6 @@ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/nvram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c -index 2357ea3..2ac7482 100644 --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c @@ -20,7 +20,7 @@ @@ -32,6 +30,3 @@ index 2357ea3..2ac7482 100644 #define NVRAM_MAX_GPIO_ENTRIES 32 #define NVRAM_MAX_GPIO_VALUE_LEN 30 --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.0/030-09-MIPS-BCM47XX-Don-t-try-guessing-NVRAM-size-on-MTD-pa.patch b/target/linux/brcm47xx/patches-4.0/030-09-MIPS-BCM47XX-Don-t-try-guessing-NVRAM-size-on-MTD-pa.patch index 50b9f2daca..c40c8b7f89 100644 --- a/target/linux/brcm47xx/patches-4.0/030-09-MIPS-BCM47XX-Don-t-try-guessing-NVRAM-size-on-MTD-pa.patch +++ b/target/linux/brcm47xx/patches-4.0/030-09-MIPS-BCM47XX-Don-t-try-guessing-NVRAM-size-on-MTD-pa.patch @@ -19,8 +19,6 @@ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/nvram.c | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-) -diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c -index 2ac7482..ba632ff 100644 --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c @@ -139,36 +139,28 @@ static int nvram_init(void) @@ -39,28 +37,29 @@ index 2ac7482..ba632ff 100644 - - if (from < 0) - continue; -- -- err = mtd_read(mtd, from, sizeof(header), &bytes_read, -- (uint8_t *)&header); -- if (!err && header.magic == NVRAM_MAGIC) { -- u8 *dst = (uint8_t *)nvram_buf; -- size_t len = header.len; + err = mtd_read(mtd, 0, sizeof(header), &bytes_read, (uint8_t *)&header); + if (!err && header.magic == NVRAM_MAGIC) { + u8 *dst = (uint8_t *)nvram_buf; + size_t len = header.len; - -- if (header.len > NVRAM_SPACE) { -- pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n", -- header.len, NVRAM_SPACE); -- len = NVRAM_SPACE; -- } ++ + if (header.len > NVRAM_SPACE) { + pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n", + header.len, NVRAM_SPACE); + len = NVRAM_SPACE; + } +- err = mtd_read(mtd, from, sizeof(header), &bytes_read, +- (uint8_t *)&header); +- if (!err && header.magic == NVRAM_MAGIC) { +- u8 *dst = (uint8_t *)nvram_buf; +- size_t len = header.len; +- +- if (header.len > NVRAM_SPACE) { +- pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n", +- header.len, NVRAM_SPACE); +- len = NVRAM_SPACE; +- } +- - err = mtd_read(mtd, from, len, &bytes_read, dst); - if (err) - return err; @@ -74,6 +73,3 @@ index 2ac7482..ba632ff 100644 } #endif --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.0/030-10-MIPS-BCM47xx-Keep-ID-entries-for-non-standard-device.patch b/target/linux/brcm47xx/patches-4.0/030-10-MIPS-BCM47xx-Keep-ID-entries-for-non-standard-device.patch index 1f7233b807..89188117ac 100644 --- a/target/linux/brcm47xx/patches-4.0/030-10-MIPS-BCM47xx-Keep-ID-entries-for-non-standard-device.patch +++ b/target/linux/brcm47xx/patches-4.0/030-10-MIPS-BCM47xx-Keep-ID-entries-for-non-standard-device.patch @@ -16,11 +16,9 @@ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/board.c | 48 ++++++++++++++++++++--------------------------- 1 file changed, 20 insertions(+), 28 deletions(-) -diff --git a/arch/mips/bcm47xx/board.c b/arch/mips/bcm47xx/board.c -index d4a5a51..f936dcc 100644 --- a/arch/mips/bcm47xx/board.c +++ b/arch/mips/bcm47xx/board.c -@@ -40,20 +40,6 @@ struct bcm47xx_board_type_list1 bcm47xx_board_list_model_name[] __initconst = { +@@ -40,20 +40,6 @@ struct bcm47xx_board_type_list1 bcm47xx_ { {0}, NULL}, }; @@ -41,7 +39,7 @@ index d4a5a51..f936dcc 100644 /* hardware_version */ static const struct bcm47xx_board_type_list1 bcm47xx_board_list_hardware_version[] __initconst = { -@@ -202,6 +188,18 @@ struct bcm47xx_board_type_list2 bcm47xx_board_list_board_type_rev[] __initconst +@@ -202,6 +188,18 @@ struct bcm47xx_board_type_list2 bcm47xx_ { {0}, NULL}, }; @@ -60,7 +58,7 @@ index d4a5a51..f936dcc 100644 static const struct bcm47xx_board_type bcm47xx_board_unknown[] __initconst = { {BCM47XX_BOARD_UNKNOWN, "Unknown Board"}, -@@ -225,20 +223,6 @@ static __init const struct bcm47xx_board_type *bcm47xx_board_get_nvram(void) +@@ -225,20 +223,6 @@ static __init const struct bcm47xx_board } } @@ -81,7 +79,7 @@ index d4a5a51..f936dcc 100644 if (bcm47xx_nvram_getenv("hardware_version", buf1, sizeof(buf1)) >= 0) { for (e1 = bcm47xx_board_list_hardware_version; e1->value1; e1++) { if (strstarts(buf1, e1->value1)) -@@ -314,6 +298,14 @@ static __init const struct bcm47xx_board_type *bcm47xx_board_get_nvram(void) +@@ -314,6 +298,14 @@ static __init const struct bcm47xx_board return &e2->board; } } @@ -96,6 +94,3 @@ index d4a5a51..f936dcc 100644 return bcm47xx_board_unknown; } --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.0/030-11-MIPS-BCM47xx-Devices-database-update-for-4.1-or-4.2.patch b/target/linux/brcm47xx/patches-4.0/030-11-MIPS-BCM47xx-Devices-database-update-for-4.1-or-4.2.patch index e81a99f7c3..6e6166cad2 100644 --- a/target/linux/brcm47xx/patches-4.0/030-11-MIPS-BCM47xx-Devices-database-update-for-4.1-or-4.2.patch +++ b/target/linux/brcm47xx/patches-4.0/030-11-MIPS-BCM47xx-Devices-database-update-for-4.1-or-4.2.patch @@ -18,8 +18,6 @@ Signed-off-by: Ralf Baechle arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 4 ++++ 4 files changed, 36 insertions(+) -diff --git a/arch/mips/bcm47xx/board.c b/arch/mips/bcm47xx/board.c -index f936dcc..41b9736 100644 --- a/arch/mips/bcm47xx/board.c +++ b/arch/mips/bcm47xx/board.c @@ -151,9 +151,11 @@ static const @@ -34,7 +32,7 @@ index f936dcc..41b9736 100644 {{BCM47XX_BOARD_NETGEAR_WNDR3400VCNA, "Netgear WNDR3400 Vcna"}, "U12H155T01_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WNDR3700V3, "Netgear WNDR3700 V3"}, "U12H194T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WNDR4000, "Netgear WNDR4000"}, "U12H181T00_NETGEAR"}, -@@ -196,6 +198,8 @@ struct bcm47xx_board_type_list2 bcm47xx_board_list_board_type_rev[] __initconst +@@ -196,6 +198,8 @@ struct bcm47xx_board_type_list2 bcm47xx_ static const struct bcm47xx_board_type_list2 bcm47xx_board_list_key_value[] __initconst = { {{BCM47XX_BOARD_ASUS_WL700GE, "Asus WL700"}, "model_no", "WL700"}, @@ -43,11 +41,9 @@ index f936dcc..41b9736 100644 {{BCM47XX_BOARD_LINKSYS_WRTSL54GS, "Linksys WRTSL54GS"}, "machine_name", "WRTSL54GS"}, { {0}, NULL}, }; -diff --git a/arch/mips/bcm47xx/buttons.c b/arch/mips/bcm47xx/buttons.c -index 913182b..276276a 100644 --- a/arch/mips/bcm47xx/buttons.c +++ b/arch/mips/bcm47xx/buttons.c -@@ -252,6 +252,12 @@ bcm47xx_buttons_linksys_wrt160nv3[] __initconst = { +@@ -252,6 +252,12 @@ bcm47xx_buttons_linksys_wrt160nv3[] __in }; static const struct gpio_keys_button @@ -60,7 +56,7 @@ index 913182b..276276a 100644 bcm47xx_buttons_linksys_wrt300nv11[] __initconst = { BCM47XX_GPIO_KEY(4, KEY_UNKNOWN), BCM47XX_GPIO_KEY(6, KEY_RESTART), -@@ -327,6 +333,12 @@ bcm47xx_buttons_netgear_wndr3400v1[] __initconst = { +@@ -327,6 +333,12 @@ bcm47xx_buttons_netgear_wndr3400v1[] __i }; static const struct gpio_keys_button @@ -73,7 +69,7 @@ index 913182b..276276a 100644 bcm47xx_buttons_netgear_wndr3700v3[] __initconst = { BCM47XX_GPIO_KEY(2, KEY_RFKILL), BCM47XX_GPIO_KEY(3, KEY_RESTART), -@@ -516,6 +528,9 @@ int __init bcm47xx_buttons_register(void) +@@ -516,6 +528,9 @@ int __init bcm47xx_buttons_register(void case BCM47XX_BOARD_LINKSYS_WRT160NV3: err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt160nv3); break; @@ -83,7 +79,7 @@ index 913182b..276276a 100644 case BCM47XX_BOARD_LINKSYS_WRT300NV11: err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt300nv11); break; -@@ -557,6 +572,9 @@ int __init bcm47xx_buttons_register(void) +@@ -557,6 +572,9 @@ int __init bcm47xx_buttons_register(void case BCM47XX_BOARD_NETGEAR_WNDR3400V1: err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1); break; @@ -93,11 +89,9 @@ index 913182b..276276a 100644 case BCM47XX_BOARD_NETGEAR_WNDR3700V3: err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3700v3); break; -diff --git a/arch/mips/bcm47xx/leds.c b/arch/mips/bcm47xx/leds.c -index 903a656..0e4ade3 100644 --- a/arch/mips/bcm47xx/leds.c +++ b/arch/mips/bcm47xx/leds.c -@@ -292,6 +292,13 @@ bcm47xx_leds_linksys_wrt160nv3[] __initconst = { +@@ -292,6 +292,13 @@ bcm47xx_leds_linksys_wrt160nv3[] __initc }; static const struct gpio_led @@ -121,8 +115,6 @@ index 903a656..0e4ade3 100644 case BCM47XX_BOARD_LINKSYS_WRT300NV11: bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt300nv11); break; -diff --git a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h -index 1f5643b..c41d1dc 100644 --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h @@ -67,6 +67,7 @@ enum bcm47xx_board { @@ -153,6 +145,3 @@ index 1f5643b..c41d1dc 100644 BCM47XX_BOARD_NETGEAR_WNDR3400VCNA, BCM47XX_BOARD_NETGEAR_WNDR3700V3, BCM47XX_BOARD_NETGEAR_WNDR4000, --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.0/030-12-MIPS-BCM47xx-Add-generic-function-filling-SPROM-entr.patch b/target/linux/brcm47xx/patches-4.0/030-12-MIPS-BCM47xx-Add-generic-function-filling-SPROM-entr.patch index eb994facff..482aa49a15 100644 --- a/target/linux/brcm47xx/patches-4.0/030-12-MIPS-BCM47xx-Add-generic-function-filling-SPROM-entr.patch +++ b/target/linux/brcm47xx/patches-4.0/030-12-MIPS-BCM47xx-Add-generic-function-filling-SPROM-entr.patch @@ -23,11 +23,9 @@ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/sprom.c | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) -diff --git a/arch/mips/bcm47xx/sprom.c b/arch/mips/bcm47xx/sprom.c -index 5d32afc..77790c9 100644 --- a/arch/mips/bcm47xx/sprom.c +++ b/arch/mips/bcm47xx/sprom.c -@@ -180,6 +180,33 @@ static void nvram_read_alpha2(const char *prefix, const char *name, +@@ -180,6 +180,33 @@ static void nvram_read_alpha2(const char memcpy(val, buf, 2); } @@ -61,7 +59,7 @@ index 5d32afc..77790c9 100644 static void bcm47xx_fill_sprom_r1234589(struct ssb_sprom *sprom, const char *prefix, bool fallback) { -@@ -714,9 +741,6 @@ static void bcm47xx_fill_sprom_ethernet(struct ssb_sprom *sprom, +@@ -714,9 +741,6 @@ static void bcm47xx_fill_sprom_ethernet( static void bcm47xx_fill_board_data(struct ssb_sprom *sprom, const char *prefix, bool fallback) { @@ -71,7 +69,7 @@ index 5d32afc..77790c9 100644 nvram_read_u16(prefix, NULL, "boardtype", &sprom->board_type, 0, true); nvram_read_u32_2(prefix, "boardflags", &sprom->boardflags_lo, &sprom->boardflags_hi, fallback); -@@ -787,6 +811,8 @@ void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix, +@@ -787,6 +811,8 @@ void bcm47xx_fill_sprom(struct ssb_sprom bcm47xx_fill_sprom_r12389(sprom, prefix, fallback); bcm47xx_fill_sprom_r1(sprom, prefix, fallback); } @@ -80,6 +78,3 @@ index 5d32afc..77790c9 100644 } #ifdef CONFIG_BCM47XX_SSB --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.0/030-13-MIPS-BCM47xx-Move-filling-most-of-SPROM-to-the-gener.patch b/target/linux/brcm47xx/patches-4.0/030-13-MIPS-BCM47xx-Move-filling-most-of-SPROM-to-the-gener.patch index 6056bdf71b..6a2d64f7f8 100644 --- a/target/linux/brcm47xx/patches-4.0/030-13-MIPS-BCM47xx-Move-filling-most-of-SPROM-to-the-gener.patch +++ b/target/linux/brcm47xx/patches-4.0/030-13-MIPS-BCM47xx-Move-filling-most-of-SPROM-to-the-gener.patch @@ -27,22 +27,19 @@ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/sprom.c | 605 ++++++++++++++++------------------------------ 1 file changed, 204 insertions(+), 401 deletions(-) -diff --git a/arch/mips/bcm47xx/sprom.c b/arch/mips/bcm47xx/sprom.c -index 77790c9..68ebf23 100644 --- a/arch/mips/bcm47xx/sprom.c +++ b/arch/mips/bcm47xx/sprom.c -@@ -201,9 +201,211 @@ static void bcm47xx_sprom_fill_auto(struct ssb_sprom *sprom, +@@ -201,9 +201,211 @@ static void bcm47xx_sprom_fill_auto(stru bool fb = fallback; ENTRY(0xfffffffe, u16, pre, "boardrev", board_rev, 0, true); + ENTRY(0x00000002, u16, pre, "boardflags", boardflags_lo, 0, fb); + ENTRY(0xfffffffc, u16, pre, "boardtype", board_type, 0, true); ENTRY(0xfffffffe, u16, pre, "boardnum", board_num, 0, fb); -- -- /* TODO: Move more mappings here */ + ENTRY(0x00000002, u8, pre, "cc", country_code, 0, fb); + ENTRY(0xfffffff8, u8, pre, "regrev", regrev, 0, fb); -+ + +- /* TODO: Move more mappings here */ + ENTRY(0xfffffffe, u8, pre, "ledbh0", gpio0, 0xff, fb); + ENTRY(0xfffffffe, u8, pre, "ledbh1", gpio1, 0xff, fb); + ENTRY(0xfffffffe, u8, pre, "ledbh2", gpio2, 0xff, fb); @@ -245,7 +242,7 @@ index 77790c9..68ebf23 100644 } #undef ENTRY /* It's specififc, uses local variable, don't use it (again). */ -@@ -211,90 +413,12 @@ static void bcm47xx_fill_sprom_r1234589(struct ssb_sprom *sprom, +@@ -211,90 +413,12 @@ static void bcm47xx_fill_sprom_r1234589( const char *prefix, bool fallback) { nvram_read_u16(prefix, NULL, "devid", &sprom->dev_id, 0, fallback); @@ -336,7 +333,7 @@ index 77790c9..68ebf23 100644 nvram_read_leddc(prefix, "leddc", &sprom->leddc_on_time, &sprom->leddc_off_time, fallback); } -@@ -302,309 +426,10 @@ static void bcm47xx_fill_sprom_r3(struct ssb_sprom *sprom, const char *prefix, +@@ -302,309 +426,10 @@ static void bcm47xx_fill_sprom_r3(struct static void bcm47xx_fill_sprom_r4589(struct ssb_sprom *sprom, const char *prefix, bool fallback) { @@ -646,7 +643,7 @@ index 77790c9..68ebf23 100644 static void bcm47xx_fill_sprom_path_r4589(struct ssb_sprom *sprom, const char *prefix, bool fallback) { -@@ -741,7 +566,6 @@ static void bcm47xx_fill_sprom_ethernet(struct ssb_sprom *sprom, +@@ -741,7 +566,6 @@ static void bcm47xx_fill_sprom_ethernet( static void bcm47xx_fill_board_data(struct ssb_sprom *sprom, const char *prefix, bool fallback) { @@ -654,7 +651,7 @@ index 77790c9..68ebf23 100644 nvram_read_u32_2(prefix, "boardflags", &sprom->boardflags_lo, &sprom->boardflags_hi, fallback); nvram_read_u32_2(prefix, "boardflags2", &sprom->boardflags2_lo, -@@ -759,48 +583,29 @@ void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix, +@@ -759,48 +583,29 @@ void bcm47xx_fill_sprom(struct ssb_sprom switch (sprom->revision) { case 1: bcm47xx_fill_sprom_r1234589(sprom, prefix, fallback); @@ -703,7 +700,7 @@ index 77790c9..68ebf23 100644 bcm47xx_fill_sprom_path_r4589(sprom, prefix, fallback); break; default: -@@ -808,8 +613,6 @@ void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix, +@@ -808,8 +613,6 @@ void bcm47xx_fill_sprom(struct ssb_sprom sprom->revision); sprom->revision = 1; bcm47xx_fill_sprom_r1234589(sprom, prefix, fallback); @@ -712,6 +709,3 @@ index 77790c9..68ebf23 100644 } bcm47xx_sprom_fill_auto(sprom, prefix, fallback); --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.0/031-01-MIPS-BCM47XX-Make-sure-NVRAM-buffer-ends-with-0.patch b/target/linux/brcm47xx/patches-4.0/031-01-MIPS-BCM47XX-Make-sure-NVRAM-buffer-ends-with-0.patch index 05b6d2d42e..7577da10a8 100644 --- a/target/linux/brcm47xx/patches-4.0/031-01-MIPS-BCM47XX-Make-sure-NVRAM-buffer-ends-with-0.patch +++ b/target/linux/brcm47xx/patches-4.0/031-01-MIPS-BCM47XX-Make-sure-NVRAM-buffer-ends-with-0.patch @@ -19,8 +19,6 @@ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/nvram.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) -diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c -index ba632ff..dee1c32 100644 --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c @@ -98,7 +98,7 @@ found: @@ -54,6 +52,3 @@ index ba632ff..dee1c32 100644 } err = mtd_read(mtd, 0, len, &bytes_read, dst); --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.0/031-02-MIPS-BCM47XX-Simplify-function-looking-for-NVRAM-ent.patch b/target/linux/brcm47xx/patches-4.0/031-02-MIPS-BCM47XX-Simplify-function-looking-for-NVRAM-ent.patch index c74bd06495..7a3ddc3980 100644 --- a/target/linux/brcm47xx/patches-4.0/031-02-MIPS-BCM47XX-Simplify-function-looking-for-NVRAM-ent.patch +++ b/target/linux/brcm47xx/patches-4.0/031-02-MIPS-BCM47XX-Simplify-function-looking-for-NVRAM-ent.patch @@ -22,8 +22,6 @@ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/nvram.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) -diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c -index dee1c32..95d028c 100644 --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c @@ -171,7 +171,7 @@ static int nvram_init(void) @@ -35,7 +33,7 @@ index dee1c32..95d028c 100644 if (!name) return -EINVAL; -@@ -184,19 +184,16 @@ int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len) +@@ -184,19 +184,16 @@ int bcm47xx_nvram_getenv(const char *nam /* Look for name=value and return value */ var = &nvram_buf[sizeof(struct nvram_header)]; @@ -59,6 +57,3 @@ index dee1c32..95d028c 100644 } return -ENOENT; } --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.0/031-03-MIPS-BCM47xx-Extract-all-boardflags-to-new-u32-field.patch b/target/linux/brcm47xx/patches-4.0/031-03-MIPS-BCM47xx-Extract-all-boardflags-to-new-u32-field.patch index 6c09264b48..7a5babc667 100644 --- a/target/linux/brcm47xx/patches-4.0/031-03-MIPS-BCM47xx-Extract-all-boardflags-to-new-u32-field.patch +++ b/target/linux/brcm47xx/patches-4.0/031-03-MIPS-BCM47xx-Extract-all-boardflags-to-new-u32-field.patch @@ -21,11 +21,9 @@ Signed-off-by: Ralf Baechle include/linux/ssb/ssb.h | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) -diff --git a/arch/mips/bcm47xx/sprom.c b/arch/mips/bcm47xx/sprom.c -index 68ebf23..4048083 100644 --- a/arch/mips/bcm47xx/sprom.c +++ b/arch/mips/bcm47xx/sprom.c -@@ -201,6 +201,9 @@ static void bcm47xx_sprom_fill_auto(struct ssb_sprom *sprom, +@@ -201,6 +201,9 @@ static void bcm47xx_sprom_fill_auto(stru bool fb = fallback; ENTRY(0xfffffffe, u16, pre, "boardrev", board_rev, 0, true); diff --git a/target/linux/brcm47xx/patches-4.0/031-04-MIPS-BCM47xx-Extract-info-about-et2-interface.patch b/target/linux/brcm47xx/patches-4.0/031-04-MIPS-BCM47xx-Extract-info-about-et2-interface.patch index e3c8e1352d..957bb680bd 100644 --- a/target/linux/brcm47xx/patches-4.0/031-04-MIPS-BCM47xx-Extract-info-about-et2-interface.patch +++ b/target/linux/brcm47xx/patches-4.0/031-04-MIPS-BCM47xx-Extract-info-about-et2-interface.patch @@ -21,8 +21,6 @@ Signed-off-by: Ralf Baechle include/linux/ssb/ssb.h | 3 +++ 2 files changed, 9 insertions(+) -diff --git a/arch/mips/bcm47xx/sprom.c b/arch/mips/bcm47xx/sprom.c -index 4048083..92a6c9d 100644 --- a/arch/mips/bcm47xx/sprom.c +++ b/arch/mips/bcm47xx/sprom.c @@ -531,6 +531,8 @@ static int mac_addr_used = 2; @@ -34,7 +32,7 @@ index 4048083..92a6c9d 100644 nvram_read_macaddr(prefix, "et0macaddr", sprom->et0mac, fallback); nvram_read_u8(prefix, NULL, "et0mdcport", &sprom->et0mdcport, 0, fallback); -@@ -543,6 +545,10 @@ static void bcm47xx_fill_sprom_ethernet(struct ssb_sprom *sprom, +@@ -543,6 +545,10 @@ static void bcm47xx_fill_sprom_ethernet( nvram_read_u8(prefix, NULL, "et1phyaddr", &sprom->et1phyaddr, 0, fallback); diff --git a/target/linux/brcm47xx/patches-4.0/031-05-MIPS-BCM47xx-Read-board-info-for-all-bcma-buses.patch b/target/linux/brcm47xx/patches-4.0/031-05-MIPS-BCM47xx-Read-board-info-for-all-bcma-buses.patch index d3873d4ae6..314a6c4904 100644 --- a/target/linux/brcm47xx/patches-4.0/031-05-MIPS-BCM47xx-Read-board-info-for-all-bcma-buses.patch +++ b/target/linux/brcm47xx/patches-4.0/031-05-MIPS-BCM47xx-Read-board-info-for-all-bcma-buses.patch @@ -27,8 +27,6 @@ Signed-off-by: Ralf Baechle arch/mips/include/asm/mach-bcm47xx/bcm47xx.h | 4 --- 3 files changed, 22 insertions(+), 29 deletions(-) -diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c -index 82ff9fd..98c075f 100644 --- a/arch/mips/bcm47xx/setup.c +++ b/arch/mips/bcm47xx/setup.c @@ -206,9 +206,6 @@ void __init bcm47xx_bus_setup(void) @@ -41,11 +39,9 @@ index 82ff9fd..98c075f 100644 } #endif -diff --git a/arch/mips/bcm47xx/sprom.c b/arch/mips/bcm47xx/sprom.c -index 92a6c9d..b0d62e7 100644 --- a/arch/mips/bcm47xx/sprom.c +++ b/arch/mips/bcm47xx/sprom.c -@@ -640,19 +640,6 @@ void bcm47xx_fill_ssb_boardinfo(struct ssb_boardinfo *boardinfo, +@@ -640,19 +640,6 @@ void bcm47xx_fill_ssb_boardinfo(struct s } #endif @@ -65,7 +61,7 @@ index 92a6c9d..b0d62e7 100644 #if defined(CONFIG_BCM47XX_SSB) static int bcm47xx_get_sprom_ssb(struct ssb_bus *bus, struct ssb_sprom *out) { -@@ -707,33 +694,46 @@ static void bcm47xx_sprom_apply_prefix_alias(char *prefix, size_t prefix_size) +@@ -707,33 +694,46 @@ static void bcm47xx_sprom_apply_prefix_a static int bcm47xx_get_sprom_bcma(struct bcma_bus *bus, struct ssb_sprom *out) { @@ -121,11 +117,9 @@ index 92a6c9d..b0d62e7 100644 } #endif -diff --git a/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h b/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h -index 8ed77f6..1461c10 100644 --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h -@@ -52,10 +52,6 @@ void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix, +@@ -52,10 +52,6 @@ void bcm47xx_fill_sprom(struct ssb_sprom void bcm47xx_fill_ssb_boardinfo(struct ssb_boardinfo *boardinfo, const char *prefix); #endif @@ -136,6 +130,3 @@ index 8ed77f6..1461c10 100644 void bcm47xx_set_system_type(u16 chip_id); --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.0/031-06-MIPS-BCM77xx-Remove-legacy-__cpuinit-data-sections-t.patch b/target/linux/brcm47xx/patches-4.0/031-06-MIPS-BCM77xx-Remove-legacy-__cpuinit-data-sections-t.patch index 329fe812cc..38b95d2eca 100644 --- a/target/linux/brcm47xx/patches-4.0/031-06-MIPS-BCM77xx-Remove-legacy-__cpuinit-data-sections-t.patch +++ b/target/linux/brcm47xx/patches-4.0/031-06-MIPS-BCM77xx-Remove-legacy-__cpuinit-data-sections-t.patch @@ -25,8 +25,6 @@ Signed-off-by: Ralf Baechle arch/mips/mm/tlb-r4k.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) -diff --git a/arch/mips/bcm47xx/prom.c b/arch/mips/bcm47xx/prom.c -index ab698ba..135a540 100644 --- a/arch/mips/bcm47xx/prom.c +++ b/arch/mips/bcm47xx/prom.c @@ -126,7 +126,7 @@ void __init prom_free_prom_memory(void) @@ -38,8 +36,6 @@ index ab698ba..135a540 100644 { write_c0_pagemask(PM_DEFAULT_MASK); write_c0_wired(0); -diff --git a/arch/mips/include/asm/pgtable-32.h b/arch/mips/include/asm/pgtable-32.h -index 7d56686..832e216 100644 --- a/arch/mips/include/asm/pgtable-32.h +++ b/arch/mips/include/asm/pgtable-32.h @@ -18,7 +18,7 @@ @@ -51,11 +47,9 @@ index 7d56686..832e216 100644 /* * - add_temporary_entry() add a temporary TLB entry. We use TLB entries -diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c -index 08318ec..5037d58 100644 --- a/arch/mips/mm/tlb-r4k.c +++ b/arch/mips/mm/tlb-r4k.c -@@ -411,7 +411,7 @@ int __init has_transparent_hugepage(void) +@@ -411,7 +411,7 @@ int __init has_transparent_hugepage(void * lifetime of the system */ @@ -64,6 +58,3 @@ index 08318ec..5037d58 100644 __init int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1, unsigned long entryhi, unsigned long pagemask) --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.0/031-07-MIPS-BCM47XX-Support-Luxul-XWR-1750-board.patch b/target/linux/brcm47xx/patches-4.0/031-07-MIPS-BCM47XX-Support-Luxul-XWR-1750-board.patch index 430edc4531..73f066238d 100644 --- a/target/linux/brcm47xx/patches-4.0/031-07-MIPS-BCM47XX-Support-Luxul-XWR-1750-board.patch +++ b/target/linux/brcm47xx/patches-4.0/031-07-MIPS-BCM47XX-Support-Luxul-XWR-1750-board.patch @@ -20,11 +20,9 @@ Signed-off-by: Ralf Baechle arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 2 ++ 4 files changed, 28 insertions(+) -diff --git a/arch/mips/bcm47xx/board.c b/arch/mips/bcm47xx/board.c -index bd56415..a88975a 100644 --- a/arch/mips/bcm47xx/board.c +++ b/arch/mips/bcm47xx/board.c -@@ -149,6 +149,7 @@ struct bcm47xx_board_type_list2 bcm47xx_board_list_boot_hw[] __initconst = { +@@ -149,6 +149,7 @@ struct bcm47xx_board_type_list2 bcm47xx_ /* board_id */ static const struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = { @@ -32,11 +30,9 @@ index bd56415..a88975a 100644 {{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"}, -diff --git a/arch/mips/bcm47xx/buttons.c b/arch/mips/bcm47xx/buttons.c -index 276276a..08a4abf 100644 --- a/arch/mips/bcm47xx/buttons.c +++ b/arch/mips/bcm47xx/buttons.c -@@ -299,6 +299,13 @@ bcm47xx_buttons_linksys_wrtsl54gs[] __initconst = { +@@ -299,6 +299,13 @@ bcm47xx_buttons_linksys_wrtsl54gs[] __in BCM47XX_GPIO_KEY(6, KEY_RESTART), }; @@ -50,7 +46,7 @@ index 276276a..08a4abf 100644 /* Microsoft */ static const struct gpio_keys_button -@@ -555,6 +562,10 @@ int __init bcm47xx_buttons_register(void) +@@ -555,6 +562,10 @@ int __init bcm47xx_buttons_register(void err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrtsl54gs); break; @@ -61,11 +57,9 @@ index 276276a..08a4abf 100644 case BCM47XX_BOARD_MICROSOFT_MN700: err = bcm47xx_copy_bdata(bcm47xx_buttons_microsoft_nm700); break; -diff --git a/arch/mips/bcm47xx/leds.c b/arch/mips/bcm47xx/leds.c -index 0e4ade3..d20ae63 100644 --- a/arch/mips/bcm47xx/leds.c +++ b/arch/mips/bcm47xx/leds.c -@@ -370,6 +370,16 @@ bcm47xx_leds_linksys_wrtsl54gs[] __initconst = { +@@ -370,6 +370,16 @@ bcm47xx_leds_linksys_wrtsl54gs[] __initc BCM47XX_GPIO_LED(7, "orange", "wps", 1, LEDS_GPIO_DEFSTATE_OFF), }; @@ -93,8 +87,6 @@ index 0e4ade3..d20ae63 100644 case BCM47XX_BOARD_MICROSOFT_MN700: bcm47xx_set_pdata(bcm47xx_leds_microsoft_nm700); break; -diff --git a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h -index c41d1dc..2afb840 100644 --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h @@ -80,6 +80,8 @@ enum bcm47xx_board { @@ -106,6 +98,3 @@ index c41d1dc..2afb840 100644 BCM47XX_BOARD_MICROSOFT_MN700, BCM47XX_BOARD_MOTOROLA_WE800G, --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.0/031-08-mips-bcm47xx-allow-retrieval-of-complete-nvram-conte.patch b/target/linux/brcm47xx/patches-4.0/031-08-mips-bcm47xx-allow-retrieval-of-complete-nvram-conte.patch index bfa93af41c..105c65142a 100644 --- a/target/linux/brcm47xx/patches-4.0/031-08-mips-bcm47xx-allow-retrieval-of-complete-nvram-conte.patch +++ b/target/linux/brcm47xx/patches-4.0/031-08-mips-bcm47xx-allow-retrieval-of-complete-nvram-conte.patch @@ -22,11 +22,9 @@ Signed-off-by: Ralf Baechle include/linux/bcm47xx_nvram.h | 15 +++++++++++ 2 files changed, 60 insertions(+), 15 deletions(-) -diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c -index 95d028c..2ed762e 100644 --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c -@@ -94,17 +94,22 @@ static int nvram_find_and_copy(void __iomem *iobase, u32 lim) +@@ -94,17 +94,22 @@ static int nvram_find_and_copy(void __io return -ENXIO; found: @@ -94,7 +92,7 @@ index 95d028c..2ed762e 100644 return 0; } #endif -@@ -219,3 +226,26 @@ int bcm47xx_nvram_gpio_pin(const char *name) +@@ -219,3 +226,26 @@ int bcm47xx_nvram_gpio_pin(const char *n return -ENOENT; } EXPORT_SYMBOL(bcm47xx_nvram_gpio_pin); @@ -121,8 +119,6 @@ index 95d028c..2ed762e 100644 + return nvram; +} +EXPORT_SYMBOL(bcm47xx_nvram_get_contents); -diff --git a/include/linux/bcm47xx_nvram.h b/include/linux/bcm47xx_nvram.h -index b12b07e..c73927c 100644 --- a/include/linux/bcm47xx_nvram.h +++ b/include/linux/bcm47xx_nvram.h @@ -10,11 +10,17 @@ @@ -143,7 +139,7 @@ index b12b07e..c73927c 100644 #else static inline int bcm47xx_nvram_init_from_mem(u32 base, u32 lim) { -@@ -29,6 +35,15 @@ static inline int bcm47xx_nvram_gpio_pin(const char *name) +@@ -29,6 +35,15 @@ static inline int bcm47xx_nvram_gpio_pin { return -ENOTSUPP; }; @@ -159,6 +155,3 @@ index b12b07e..c73927c 100644 #endif #endif /* __BCM47XX_NVRAM_H */ --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.0/031-09-MIPS-BCM47xx-Add-helper-variable-for-storing-NVRAM-l.patch b/target/linux/brcm47xx/patches-4.0/031-09-MIPS-BCM47xx-Add-helper-variable-for-storing-NVRAM-l.patch index ab7ceaa0f3..053144a07d 100644 --- a/target/linux/brcm47xx/patches-4.0/031-09-MIPS-BCM47xx-Add-helper-variable-for-storing-NVRAM-l.patch +++ b/target/linux/brcm47xx/patches-4.0/031-09-MIPS-BCM47xx-Add-helper-variable-for-storing-NVRAM-l.patch @@ -24,8 +24,6 @@ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/nvram.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) -diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c -index 2ed762e..9ccdce8 100644 --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c @@ -35,6 +35,7 @@ struct nvram_header { @@ -36,7 +34,7 @@ index 2ed762e..9ccdce8 100644 static const u32 nvram_sizes[] = {0x8000, 0xF000, 0x10000}; static u32 find_nvram_size(void __iomem *end) -@@ -60,7 +61,7 @@ static int nvram_find_and_copy(void __iomem *iobase, u32 lim) +@@ -60,7 +61,7 @@ static int nvram_find_and_copy(void __io u32 *src, *dst; u32 size; @@ -103,7 +101,7 @@ index 2ed762e..9ccdce8 100644 } #endif -@@ -183,7 +180,7 @@ int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len) +@@ -183,7 +180,7 @@ int bcm47xx_nvram_getenv(const char *nam if (!name) return -EINVAL; @@ -112,7 +110,7 @@ index 2ed762e..9ccdce8 100644 err = nvram_init(); if (err) return err; -@@ -231,16 +228,14 @@ char *bcm47xx_nvram_get_contents(size_t *nvram_size) +@@ -231,16 +228,14 @@ char *bcm47xx_nvram_get_contents(size_t { int err; char *nvram; @@ -131,6 +129,3 @@ index 2ed762e..9ccdce8 100644 nvram = vmalloc(*nvram_size); if (!nvram) return NULL; --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.0/031-10-MIPS-BCM47xx-Don-t-select-BCMA_HOST_PCI.patch b/target/linux/brcm47xx/patches-4.0/031-10-MIPS-BCM47xx-Don-t-select-BCMA_HOST_PCI.patch index 0114daa137..5bcbaa5765 100644 --- a/target/linux/brcm47xx/patches-4.0/031-10-MIPS-BCM47xx-Don-t-select-BCMA_HOST_PCI.patch +++ b/target/linux/brcm47xx/patches-4.0/031-10-MIPS-BCM47xx-Don-t-select-BCMA_HOST_PCI.patch @@ -18,8 +18,6 @@ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/Kconfig | 1 - 1 file changed, 1 deletion(-) -diff --git a/arch/mips/bcm47xx/Kconfig b/arch/mips/bcm47xx/Kconfig -index fc21d36..51ed599 100644 --- a/arch/mips/bcm47xx/Kconfig +++ b/arch/mips/bcm47xx/Kconfig @@ -25,7 +25,6 @@ config BCM47XX_BCMA @@ -30,6 +28,3 @@ index fc21d36..51ed599 100644 select BCMA_DRIVER_PCI_HOSTMODE if PCI select BCMA_DRIVER_GPIO default y --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-4.0/900-ssb-reject-PCI-writes-setting-CardBus-bridge-resourc.patch b/target/linux/brcm47xx/patches-4.0/900-ssb-reject-PCI-writes-setting-CardBus-bridge-resourc.patch index e860acb22c..d7d2d7e59a 100644 --- a/target/linux/brcm47xx/patches-4.0/900-ssb-reject-PCI-writes-setting-CardBus-bridge-resourc.patch +++ b/target/linux/brcm47xx/patches-4.0/900-ssb-reject-PCI-writes-setting-CardBus-bridge-resourc.patch @@ -15,11 +15,9 @@ Signed-off-by: Rafał Miłecki drivers/ssb/driver_pcicore.c | 4 ++++ 1 file changed, 4 insertions(+) -diff --git a/drivers/ssb/driver_pcicore.c b/drivers/ssb/driver_pcicore.c -index 15a7ee3..c603d19 100644 --- a/drivers/ssb/driver_pcicore.c +++ b/drivers/ssb/driver_pcicore.c -@@ -164,6 +164,10 @@ static int ssb_extpci_write_config(struct ssb_pcicore *pc, +@@ -164,6 +164,10 @@ static int ssb_extpci_write_config(struc SSB_WARN_ON(!pc->hostmode); if (unlikely(len != 1 && len != 2 && len != 4)) goto out; @@ -30,6 +28,3 @@ index 15a7ee3..c603d19 100644 addr = get_cfgspace_addr(pc, bus, dev, func, off); if (unlikely(!addr)) goto out; --- -1.8.4.5 - -- cgit v1.2.3