From 76d079204df113afa9e382a43abb5e1a2135150d Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Thu, 21 May 2015 19:32:46 +0000 Subject: kernel: update 3.18 to 3.18.14 Changelogs: * https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.18.12 * https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.18.13 * https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.18.14 Build tested on brcm63xx and ipq806x, runtested on brcm63xx. Signed-off-by: Jonas Gorski SVN-Revision: 45711 --- ...IPS-BCM47XX-Get-rid-of-calls-to-KSEG1ADDR.patch | 5 --- ...X-Make-ssb-init-NVRAM-instead-of-bcm47xx-.patch | 15 ++------- ...X-Make-bcma-init-NVRAM-instead-of-bcm47xx.patch | 11 ++---- ...7XX-Move-SPROM-fallback-code-into-sprom.c.patch | 15 ++------- ...X-Initialize-bcma-bus-later-with-mm-avail.patch | 13 ++------ ...X-Use-mtd-as-an-alternative-way-API-to-ge.patch | 7 +--- ...030-07-MIPS-BCM47XX-Clean-up-nvram-header.patch | 15 ++------- ...XX-Support-SPROM-prefixes-for-PCI-devices.patch | 9 ++--- ...X-Fix-detecting-Microsoft-MN-700-Asus-WL5.patch | 38 --------------------- ...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 +++++------- .../280-activate_ssb_support_in_usb.patch | 2 +- ...PCI-writes-setting-CardBus-bridge-resourc.patch | 7 +--- 22 files changed, 66 insertions(+), 265 deletions(-) delete mode 100644 target/linux/brcm47xx/patches-3.18/031-02-MIPS-BCM47XX-Fix-detecting-Microsoft-MN-700-Asus-WL5.patch (limited to 'target/linux/brcm47xx') diff --git a/target/linux/brcm47xx/patches-3.18/030-01-MIPS-BCM47XX-Get-rid-of-calls-to-KSEG1ADDR.patch b/target/linux/brcm47xx/patches-3.18/030-01-MIPS-BCM47XX-Get-rid-of-calls-to-KSEG1ADDR.patch index 4b2f6a27e2..6f33548996 100644 --- a/target/linux/brcm47xx/patches-3.18/030-01-MIPS-BCM47XX-Get-rid-of-calls-to-KSEG1ADDR.patch +++ b/target/linux/brcm47xx/patches-3.18/030-01-MIPS-BCM47XX-Get-rid-of-calls-to-KSEG1ADDR.patch @@ -18,8 +18,6 @@ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/nvram.c | 44 ++++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) -diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c -index 2bed73a..e07976b 100644 --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c @@ -23,13 +23,13 @@ @@ -127,6 +125,3 @@ index 2bed73a..e07976b 100644 } #endif --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-3.18/030-02-MIPS-BCM47XX-Make-ssb-init-NVRAM-instead-of-bcm47xx-.patch b/target/linux/brcm47xx/patches-3.18/030-02-MIPS-BCM47XX-Make-ssb-init-NVRAM-instead-of-bcm47xx-.patch index 07a782da8f..ce924d90bf 100644 --- a/target/linux/brcm47xx/patches-3.18/030-02-MIPS-BCM47XX-Make-ssb-init-NVRAM-instead-of-bcm47xx-.patch +++ b/target/linux/brcm47xx/patches-3.18/030-02-MIPS-BCM47XX-Make-ssb-init-NVRAM-instead-of-bcm47xx-.patch @@ -22,8 +22,6 @@ Signed-off-by: Ralf Baechle drivers/ssb/driver_mipscore.c | 14 +++++++++- 3 files changed, 23 insertions(+), 22 deletions(-) -diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c -index e07976b..fecc5ae 100644 --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c @@ -98,7 +98,14 @@ found: @@ -42,7 +40,7 @@ index e07976b..fecc5ae 100644 { void __iomem *iobase; int err; -@@ -114,25 +121,6 @@ static int bcm47xx_nvram_init_from_mem(u32 base, u32 lim) +@@ -114,25 +121,6 @@ static int bcm47xx_nvram_init_from_mem(u return err; } @@ -77,8 +75,6 @@ index e07976b..fecc5ae 100644 #endif #ifdef CONFIG_BCM47XX_BCMA case BCM47XX_BUS_TYPE_BCMA: -diff --git a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_nvram.h b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_nvram.h -index 36a3fc1..676be22 100644 --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_nvram.h +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_nvram.h @@ -32,6 +32,7 @@ struct nvram_header { @@ -89,8 +85,6 @@ index 36a3fc1..676be22 100644 extern int bcm47xx_nvram_getenv(char *name, char *val, size_t val_len); static inline void bcm47xx_nvram_parse_macaddr(char *buf, u8 macaddr[6]) -diff --git a/drivers/ssb/driver_mipscore.c b/drivers/ssb/driver_mipscore.c -index 0907706..7b986f9 100644 --- a/drivers/ssb/driver_mipscore.c +++ b/drivers/ssb/driver_mipscore.c @@ -15,6 +15,9 @@ @@ -103,7 +97,7 @@ index 0907706..7b986f9 100644 #include "ssb_private.h" -@@ -210,6 +213,7 @@ static void ssb_mips_serial_init(struct ssb_mipscore *mcore) +@@ -210,6 +213,7 @@ static void ssb_mips_serial_init(struct static void ssb_mips_flash_detect(struct ssb_mipscore *mcore) { struct ssb_bus *bus = mcore->dev->bus; @@ -111,7 +105,7 @@ index 0907706..7b986f9 100644 struct ssb_pflash *pflash = &mcore->pflash; /* When there is no chipcommon on the bus there is 4MB flash */ -@@ -242,7 +246,15 @@ static void ssb_mips_flash_detect(struct ssb_mipscore *mcore) +@@ -242,7 +246,15 @@ static void ssb_mips_flash_detect(struct } ssb_pflash: @@ -128,6 +122,3 @@ index 0907706..7b986f9 100644 ssb_pflash_data.width = pflash->buswidth; ssb_pflash_resource.start = pflash->window; ssb_pflash_resource.end = pflash->window + pflash->window_size; --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-3.18/030-03-MIPS-BCM47XX-Make-bcma-init-NVRAM-instead-of-bcm47xx.patch b/target/linux/brcm47xx/patches-3.18/030-03-MIPS-BCM47XX-Make-bcma-init-NVRAM-instead-of-bcm47xx.patch index a616fcc0e0..000e4b5ac4 100644 --- a/target/linux/brcm47xx/patches-3.18/030-03-MIPS-BCM47XX-Make-bcma-init-NVRAM-instead-of-bcm47xx.patch +++ b/target/linux/brcm47xx/patches-3.18/030-03-MIPS-BCM47XX-Make-bcma-init-NVRAM-instead-of-bcm47xx.patch @@ -20,11 +20,9 @@ Signed-off-by: Ralf Baechle drivers/bcma/driver_mips.c | 13 +++++++++++-- 2 files changed, 13 insertions(+), 42 deletions(-) -diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c -index fecc5ae..21712fb 100644 --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c -@@ -121,48 +121,10 @@ int bcm47xx_nvram_init_from_mem(u32 base, u32 lim) +@@ -121,48 +121,10 @@ int bcm47xx_nvram_init_from_mem(u32 base return err; } @@ -75,8 +73,6 @@ index fecc5ae..21712fb 100644 return -ENXIO; } -diff --git a/drivers/bcma/driver_mips.c b/drivers/bcma/driver_mips.c -index 004d6aa..8a653dc 100644 --- a/drivers/bcma/driver_mips.c +++ b/drivers/bcma/driver_mips.c @@ -20,6 +20,9 @@ @@ -89,7 +85,7 @@ index 004d6aa..8a653dc 100644 enum bcma_boot_dev { BCMA_BOOT_DEV_UNK = 0, -@@ -316,10 +319,16 @@ static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore) +@@ -316,10 +319,16 @@ static void bcma_core_mips_flash_detect( switch (boot_dev) { case BCMA_BOOT_DEV_PARALLEL: case BCMA_BOOT_DEV_SERIAL: @@ -108,6 +104,3 @@ index 004d6aa..8a653dc 100644 break; default: break; --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-3.18/030-04-MIPS-BCM47XX-Move-SPROM-fallback-code-into-sprom.c.patch b/target/linux/brcm47xx/patches-3.18/030-04-MIPS-BCM47XX-Move-SPROM-fallback-code-into-sprom.c.patch index fe4962993b..e38fde42b6 100644 --- a/target/linux/brcm47xx/patches-3.18/030-04-MIPS-BCM47XX-Move-SPROM-fallback-code-into-sprom.c.patch +++ b/target/linux/brcm47xx/patches-3.18/030-04-MIPS-BCM47XX-Move-SPROM-fallback-code-into-sprom.c.patch @@ -20,8 +20,6 @@ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/sprom.c | 68 +++++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+), 56 deletions(-) -diff --git a/arch/mips/bcm47xx/bcm47xx_private.h b/arch/mips/bcm47xx/bcm47xx_private.h -index f1cc9d0..12a112d 100644 --- a/arch/mips/bcm47xx/bcm47xx_private.h +++ b/arch/mips/bcm47xx/bcm47xx_private.h @@ -6,6 +6,9 @@ @@ -34,8 +32,6 @@ index f1cc9d0..12a112d 100644 /* buttons.c */ int __init bcm47xx_buttons_register(void); -diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c -index c00585d..444c65a 100644 --- a/arch/mips/bcm47xx/setup.c +++ b/arch/mips/bcm47xx/setup.c @@ -102,23 +102,6 @@ static void bcm47xx_machine_halt(void) @@ -62,7 +58,7 @@ index c00585d..444c65a 100644 static int bcm47xx_get_invariants(struct ssb_bus *bus, struct ssb_init_invariants *iv) { -@@ -144,11 +127,6 @@ static void __init bcm47xx_register_ssb(void) +@@ -144,11 +127,6 @@ static void __init bcm47xx_register_ssb( char buf[100]; struct ssb_mipscore *mcore; @@ -74,7 +70,7 @@ index c00585d..444c65a 100644 err = ssb_bus_ssbbus_register(&(bcm47xx_bus.ssb), SSB_ENUM_BASE, bcm47xx_get_invariants); if (err) -@@ -171,44 +149,10 @@ static void __init bcm47xx_register_ssb(void) +@@ -171,44 +149,10 @@ static void __init bcm47xx_register_ssb( #endif #ifdef CONFIG_BCM47XX_BCMA @@ -135,11 +131,9 @@ index c00585d..444c65a 100644 bcm47xx_register_ssb(); bcm47xx_set_system_type(bcm47xx_bus.ssb.chip_id); #endif -diff --git a/arch/mips/bcm47xx/sprom.c b/arch/mips/bcm47xx/sprom.c -index 41226b6..e772e77 100644 --- a/arch/mips/bcm47xx/sprom.c +++ b/arch/mips/bcm47xx/sprom.c -@@ -801,3 +801,71 @@ void bcm47xx_fill_bcma_boardinfo(struct bcma_boardinfo *boardinfo, +@@ -801,3 +801,71 @@ void bcm47xx_fill_bcma_boardinfo(struct nvram_read_u16(prefix, NULL, "boardtype", &boardinfo->type, 0, true); } #endif @@ -211,6 +205,3 @@ index 41226b6..e772e77 100644 + pr_warn("Failed to registered bcma SPROM handler\n"); +#endif +} --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-3.18/030-05-MIPS-BCM47XX-Initialize-bcma-bus-later-with-mm-avail.patch b/target/linux/brcm47xx/patches-3.18/030-05-MIPS-BCM47XX-Initialize-bcma-bus-later-with-mm-avail.patch index 54680de0b7..1e77063804 100644 --- a/target/linux/brcm47xx/patches-3.18/030-05-MIPS-BCM47XX-Initialize-bcma-bus-later-with-mm-avail.patch +++ b/target/linux/brcm47xx/patches-3.18/030-05-MIPS-BCM47XX-Initialize-bcma-bus-later-with-mm-avail.patch @@ -21,11 +21,9 @@ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/setup.c | 33 +++++++++++++++++++++++++++------ 3 files changed, 38 insertions(+), 6 deletions(-) -diff --git a/arch/mips/bcm47xx/bcm47xx_private.h b/arch/mips/bcm47xx/bcm47xx_private.h -index 12a112d..ea909a5 100644 --- a/arch/mips/bcm47xx/bcm47xx_private.h +++ b/arch/mips/bcm47xx/bcm47xx_private.h -@@ -15,6 +15,9 @@ int __init bcm47xx_buttons_register(void); +@@ -15,6 +15,9 @@ int __init bcm47xx_buttons_register(void /* leds.c */ void __init bcm47xx_leds_register(void); @@ -35,8 +33,6 @@ index 12a112d..ea909a5 100644 /* workarounds.c */ void __init bcm47xx_workarounds(void); -diff --git a/arch/mips/bcm47xx/irq.c b/arch/mips/bcm47xx/irq.c -index e0585b7..21b4497 100644 --- a/arch/mips/bcm47xx/irq.c +++ b/arch/mips/bcm47xx/irq.c @@ -22,6 +22,8 @@ @@ -61,11 +57,9 @@ index e0585b7..21b4497 100644 #ifdef CONFIG_BCM47XX_BCMA if (bcm47xx_bus_type == BCM47XX_BUS_TYPE_BCMA) { bcma_write32(bcm47xx_bus.bcma.bus.drv_mips.core, -diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c -index 444c65a..e43b504 100644 --- a/arch/mips/bcm47xx/setup.c +++ b/arch/mips/bcm47xx/setup.c -@@ -156,15 +156,14 @@ static void __init bcm47xx_register_bcma(void) +@@ -156,15 +156,14 @@ static void __init bcm47xx_register_bcma err = bcma_host_soc_register(&bcm47xx_bus.bcma); if (err) panic("Failed to register BCMA bus (err %d)", err); @@ -115,6 +109,3 @@ index 444c65a..e43b504 100644 bcm47xx_board_detect(); mips_set_machine_name(bcm47xx_board_get_name()); } --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-3.18/030-06-MIPS-BCM47XX-Use-mtd-as-an-alternative-way-API-to-ge.patch b/target/linux/brcm47xx/patches-3.18/030-06-MIPS-BCM47XX-Use-mtd-as-an-alternative-way-API-to-ge.patch index 7f19d3ac65..1e6bc2f20b 100644 --- a/target/linux/brcm47xx/patches-3.18/030-06-MIPS-BCM47XX-Use-mtd-as-an-alternative-way-API-to-ge.patch +++ b/target/linux/brcm47xx/patches-3.18/030-06-MIPS-BCM47XX-Use-mtd-as-an-alternative-way-API-to-ge.patch @@ -20,8 +20,6 @@ Signed-off-by: Ralf Baechle arch/mips/bcm47xx/nvram.c | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) -diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c -index 21712fb..8b64991 100644 --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c @@ -13,12 +13,10 @@ @@ -38,7 +36,7 @@ index 21712fb..8b64991 100644 static char nvram_buf[NVRAM_SPACE]; static const u32 nvram_sizes[] = {0x8000, 0xF000, 0x10000}; -@@ -123,7 +121,43 @@ int bcm47xx_nvram_init_from_mem(u32 base, u32 lim) +@@ -123,7 +121,43 @@ int bcm47xx_nvram_init_from_mem(u32 base static int nvram_init(void) { @@ -83,6 +81,3 @@ index 21712fb..8b64991 100644 return -ENXIO; } --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-3.18/030-07-MIPS-BCM47XX-Clean-up-nvram-header.patch b/target/linux/brcm47xx/patches-3.18/030-07-MIPS-BCM47XX-Clean-up-nvram-header.patch index b4a07919b7..31d14a96f6 100644 --- a/target/linux/brcm47xx/patches-3.18/030-07-MIPS-BCM47XX-Clean-up-nvram-header.patch +++ b/target/linux/brcm47xx/patches-3.18/030-07-MIPS-BCM47XX-Clean-up-nvram-header.patch @@ -23,8 +23,6 @@ Signed-off-by: Ralf Baechle arch/mips/include/asm/mach-bcm47xx/bcm47xx_nvram.h | 35 +--------------------- 3 files changed, 33 insertions(+), 39 deletions(-) -diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c -index 8b64991..c5c381c 100644 --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c @@ -18,6 +18,19 @@ @@ -47,7 +45,7 @@ index 8b64991..c5c381c 100644 static char nvram_buf[NVRAM_SPACE]; static const u32 nvram_sizes[] = {0x8000, 0xF000, 0x10000}; -@@ -28,7 +41,7 @@ static u32 find_nvram_size(void __iomem *end) +@@ -28,7 +41,7 @@ static u32 find_nvram_size(void __iomem for (i = 0; i < ARRAY_SIZE(nvram_sizes); i++) { header = (struct nvram_header *)(end - nvram_sizes[i]); @@ -56,7 +54,7 @@ index 8b64991..c5c381c 100644 return nvram_sizes[i]; } -@@ -63,13 +76,13 @@ static int nvram_find_and_copy(void __iomem *iobase, u32 lim) +@@ -63,13 +76,13 @@ static int nvram_find_and_copy(void __io /* Try embedded NVRAM at 4 KB and 1 KB as last resorts */ header = (struct nvram_header *)(iobase + 4096); @@ -90,11 +88,9 @@ index 8b64991..c5c381c 100644 { char *var, *value, *end, *eq; int err; -diff --git a/arch/mips/bcm47xx/sprom.c b/arch/mips/bcm47xx/sprom.c -index e772e77..2eff7fe 100644 --- a/arch/mips/bcm47xx/sprom.c +++ b/arch/mips/bcm47xx/sprom.c -@@ -136,6 +136,20 @@ static void nvram_read_leddc(const char *prefix, const char *name, +@@ -136,6 +136,20 @@ static void nvram_read_leddc(const char *leddc_off_time = (val >> 16) & 0xff; } @@ -115,8 +111,6 @@ index e772e77..2eff7fe 100644 static void nvram_read_macaddr(const char *prefix, const char *name, u8 val[6], bool fallback) { -diff --git a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_nvram.h b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_nvram.h -index 676be22..ee59ffe 100644 --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_nvram.h +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_nvram.h @@ -14,41 +14,8 @@ @@ -162,6 +156,3 @@ index 676be22..ee59ffe 100644 int bcm47xx_nvram_gpio_pin(const char *name); #endif /* __BCM47XX_NVRAM_H */ --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-3.18/031-01-MIPS-BCM47XX-Support-SPROM-prefixes-for-PCI-devices.patch b/target/linux/brcm47xx/patches-3.18/031-01-MIPS-BCM47XX-Support-SPROM-prefixes-for-PCI-devices.patch index 095338f61d..e78b159e6f 100644 --- a/target/linux/brcm47xx/patches-3.18/031-01-MIPS-BCM47XX-Support-SPROM-prefixes-for-PCI-devices.patch +++ b/target/linux/brcm47xx/patches-3.18/031-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-3.18/031-02-MIPS-BCM47XX-Fix-detecting-Microsoft-MN-700-Asus-WL5.patch b/target/linux/brcm47xx/patches-3.18/031-02-MIPS-BCM47XX-Fix-detecting-Microsoft-MN-700-Asus-WL5.patch deleted file mode 100644 index 25125af197..0000000000 --- a/target/linux/brcm47xx/patches-3.18/031-02-MIPS-BCM47XX-Fix-detecting-Microsoft-MN-700-Asus-WL5.patch +++ /dev/null @@ -1,38 +0,0 @@ -From e0c3678ae640db049f738f30b5f23cde740799ac Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Wed, 1 Apr 2015 16:01:02 +0200 -Subject: [PATCH] MIPS: BCM47XX: Fix detecting Microsoft MN-700 & Asus WL500G -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Since the day of adding this code it was broken. We were iterating over -a wrong array and checking for wrong NVRAM entry. - -Signed-off-by: Rafał Miłecki -Cc: linux-mips@linux-mips.org -Cc: Hauke Mehrtens -Patchwork: https://patchwork.linux-mips.org/patch/9654/ -Signed-off-by: Ralf Baechle ---- - arch/mips/bcm47xx/board.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/arch/mips/bcm47xx/board.c b/arch/mips/bcm47xx/board.c -index b3ae068..3fd369d 100644 ---- a/arch/mips/bcm47xx/board.c -+++ b/arch/mips/bcm47xx/board.c -@@ -247,8 +247,8 @@ static __init const struct bcm47xx_board_type *bcm47xx_board_get_nvram(void) - } - - if (bcm47xx_nvram_getenv("hardware_version", buf1, sizeof(buf1)) >= 0 && -- bcm47xx_nvram_getenv("boardtype", buf2, sizeof(buf2)) >= 0) { -- for (e2 = bcm47xx_board_list_boot_hw; e2->value1; e2++) { -+ bcm47xx_nvram_getenv("boardnum", buf2, sizeof(buf2)) >= 0) { -+ for (e2 = bcm47xx_board_list_hw_version_num; e2->value1; e2++) { - if (!strstarts(buf1, e2->value1) && - !strcmp(buf2, e2->value2)) - return &e2->board; --- -1.8.4.5 - diff --git a/target/linux/brcm47xx/patches-3.18/031-03-MIPS-BCM47XX-Use-helpers-for-reading-NVRAM-content.patch b/target/linux/brcm47xx/patches-3.18/031-03-MIPS-BCM47XX-Use-helpers-for-reading-NVRAM-content.patch index a028d9d67e..9c9865ff83 100644 --- a/target/linux/brcm47xx/patches-3.18/031-03-MIPS-BCM47XX-Use-helpers-for-reading-NVRAM-content.patch +++ b/target/linux/brcm47xx/patches-3.18/031-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-3.18/031-04-MIPS-BCM47XX-Use-strnchr-to-avoid-reading-out-of-the.patch b/target/linux/brcm47xx/patches-3.18/031-04-MIPS-BCM47XX-Use-strnchr-to-avoid-reading-out-of-the.patch index 7b16835ae9..ee2e2732ff 100644 --- a/target/linux/brcm47xx/patches-3.18/031-04-MIPS-BCM47XX-Use-strnchr-to-avoid-reading-out-of-the.patch +++ b/target/linux/brcm47xx/patches-3.18/031-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-3.18/031-05-MIPS-BCM47xx-Move-NVRAM-header-to-the-include-linux.patch b/target/linux/brcm47xx/patches-3.18/031-05-MIPS-BCM47xx-Move-NVRAM-header-to-the-include-linux.patch index d073a06d32..c1c0927cec 100644 --- a/target/linux/brcm47xx/patches-3.18/031-05-MIPS-BCM47xx-Move-NVRAM-header-to-the-include-linux.patch +++ b/target/linux/brcm47xx/patches-3.18/031-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-3.18/031-06-MIPS-BCM47XX-Fix-coding-style-to-match-kernel-standa.patch b/target/linux/brcm47xx/patches-3.18/031-06-MIPS-BCM47XX-Fix-coding-style-to-match-kernel-standa.patch index 0e93447e30..826307b325 100644 --- a/target/linux/brcm47xx/patches-3.18/031-06-MIPS-BCM47XX-Fix-coding-style-to-match-kernel-standa.patch +++ b/target/linux/brcm47xx/patches-3.18/031-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-3.18/031-07-MIPS-BCM47XX-Include-io.h-directly-and-fix-brace-ind.patch b/target/linux/brcm47xx/patches-3.18/031-07-MIPS-BCM47XX-Include-io.h-directly-and-fix-brace-ind.patch index f7e404f6e3..6f96ee02bd 100644 --- a/target/linux/brcm47xx/patches-3.18/031-07-MIPS-BCM47XX-Include-io.h-directly-and-fix-brace-ind.patch +++ b/target/linux/brcm47xx/patches-3.18/031-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-3.18/031-08-MIPS-BCM47XX-Increase-NVRAM-buffer-size-to-64-KiB.patch b/target/linux/brcm47xx/patches-3.18/031-08-MIPS-BCM47XX-Increase-NVRAM-buffer-size-to-64-KiB.patch index af6ec8e891..a7cc1106b8 100644 --- a/target/linux/brcm47xx/patches-3.18/031-08-MIPS-BCM47XX-Increase-NVRAM-buffer-size-to-64-KiB.patch +++ b/target/linux/brcm47xx/patches-3.18/031-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-3.18/031-09-MIPS-BCM47XX-Don-t-try-guessing-NVRAM-size-on-MTD-pa.patch b/target/linux/brcm47xx/patches-3.18/031-09-MIPS-BCM47XX-Don-t-try-guessing-NVRAM-size-on-MTD-pa.patch index 50b9f2daca..c40c8b7f89 100644 --- a/target/linux/brcm47xx/patches-3.18/031-09-MIPS-BCM47XX-Don-t-try-guessing-NVRAM-size-on-MTD-pa.patch +++ b/target/linux/brcm47xx/patches-3.18/031-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-3.18/031-10-MIPS-BCM47xx-Keep-ID-entries-for-non-standard-device.patch b/target/linux/brcm47xx/patches-3.18/031-10-MIPS-BCM47xx-Keep-ID-entries-for-non-standard-device.patch index 1f7233b807..89188117ac 100644 --- a/target/linux/brcm47xx/patches-3.18/031-10-MIPS-BCM47xx-Keep-ID-entries-for-non-standard-device.patch +++ b/target/linux/brcm47xx/patches-3.18/031-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-3.18/031-11-MIPS-BCM47xx-Devices-database-update-for-4.1-or-4.2.patch b/target/linux/brcm47xx/patches-3.18/031-11-MIPS-BCM47xx-Devices-database-update-for-4.1-or-4.2.patch index e81a99f7c3..6e6166cad2 100644 --- a/target/linux/brcm47xx/patches-3.18/031-11-MIPS-BCM47xx-Devices-database-update-for-4.1-or-4.2.patch +++ b/target/linux/brcm47xx/patches-3.18/031-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-3.18/031-12-MIPS-BCM47xx-Add-generic-function-filling-SPROM-entr.patch b/target/linux/brcm47xx/patches-3.18/031-12-MIPS-BCM47xx-Add-generic-function-filling-SPROM-entr.patch index eb994facff..482aa49a15 100644 --- a/target/linux/brcm47xx/patches-3.18/031-12-MIPS-BCM47xx-Add-generic-function-filling-SPROM-entr.patch +++ b/target/linux/brcm47xx/patches-3.18/031-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-3.18/031-13-MIPS-BCM47xx-Move-filling-most-of-SPROM-to-the-gener.patch b/target/linux/brcm47xx/patches-3.18/031-13-MIPS-BCM47xx-Move-filling-most-of-SPROM-to-the-gener.patch index 6056bdf71b..6a2d64f7f8 100644 --- a/target/linux/brcm47xx/patches-3.18/031-13-MIPS-BCM47xx-Move-filling-most-of-SPROM-to-the-gener.patch +++ b/target/linux/brcm47xx/patches-3.18/031-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-3.18/280-activate_ssb_support_in_usb.patch b/target/linux/brcm47xx/patches-3.18/280-activate_ssb_support_in_usb.patch index c44131f2fe..c4082ab464 100644 --- a/target/linux/brcm47xx/patches-3.18/280-activate_ssb_support_in_usb.patch +++ b/target/linux/brcm47xx/patches-3.18/280-activate_ssb_support_in_usb.patch @@ -15,7 +15,7 @@ This prevents the options from being delete with make kernel_oldconfig. the memory. This only works with the Broadcom SoCs from the --- a/drivers/ssb/Kconfig +++ b/drivers/ssb/Kconfig -@@ -146,6 +146,7 @@ config SSB_SFLASH +@@ -147,6 +147,7 @@ config SSB_SFLASH config SSB_EMBEDDED bool depends on SSB_DRIVER_MIPS && SSB_PCICORE_HOSTMODE diff --git a/target/linux/brcm47xx/patches-3.18/900-ssb-reject-PCI-writes-setting-CardBus-bridge-resourc.patch b/target/linux/brcm47xx/patches-3.18/900-ssb-reject-PCI-writes-setting-CardBus-bridge-resourc.patch index e860acb22c..d7d2d7e59a 100644 --- a/target/linux/brcm47xx/patches-3.18/900-ssb-reject-PCI-writes-setting-CardBus-bridge-resourc.patch +++ b/target/linux/brcm47xx/patches-3.18/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