From: Hauke Mehrtens Date: Sat, 7 May 2011 12:49:17 +0000 (+0000) Subject: brcm47xx: update patches X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=732abc44ccb1641889ad7824bfc8aa6295e435f1;p=openwrt%2Fstaging%2Fthess.git brcm47xx: update patches SVN-Revision: 26846 --- diff --git a/target/linux/brcm47xx/patches-2.6.37/031-ssb-add-callback-for-sprom.patch b/target/linux/brcm47xx/patches-2.6.37/031-ssb-add-callback-for-sprom.patch index 9dac61c6b3..bf19ae0b98 100644 --- a/target/linux/brcm47xx/patches-2.6.37/031-ssb-add-callback-for-sprom.patch +++ b/target/linux/brcm47xx/patches-2.6.37/031-ssb-add-callback-for-sprom.patch @@ -40,7 +40,7 @@ int err; u16 *buf; -@@ -707,10 +706,14 @@ static int ssb_pci_sprom_get(struct ssb_ +@@ -707,10 +706,17 @@ static int ssb_pci_sprom_get(struct ssb_ if (err) { /* All CRC attempts failed. * Maybe there is no SPROM on the device? @@ -56,6 +56,9 @@ + " fallback SPROM failed (err %d)\n", + err); + } else { ++ ssb_dprintk(KERN_DEBUG PFX "Using SPROM" ++ " revision %d provided by" ++ " platform.\n", sprom->revision); err = 0; goto out_free; } diff --git a/target/linux/brcm47xx/patches-2.6.37/033-bcm47xx-register-fallback-callback.patch b/target/linux/brcm47xx/patches-2.6.37/033-bcm47xx-register-fallback-callback.patch index 4e88cf644d..495a0bff26 100644 --- a/target/linux/brcm47xx/patches-2.6.37/033-bcm47xx-register-fallback-callback.patch +++ b/target/linux/brcm47xx/patches-2.6.37/033-bcm47xx-register-fallback-callback.patch @@ -1,6 +1,14 @@ --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c -@@ -23,7 +23,7 @@ +@@ -3,6 +3,7 @@ + * + * Copyright (C) 2005 Broadcom Corporation + * Copyright (C) 2006 Felix Fietkau ++ * Copyright (C) 2010-2011 Hauke Mehrtens + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the +@@ -23,7 +24,7 @@ static char nvram_buf[NVRAM_SPACE]; /* Probe for NVRAM header */ @@ -11,7 +19,15 @@ struct nvram_header *header; --- a/arch/mips/bcm47xx/setup.c +++ b/arch/mips/bcm47xx/setup.c -@@ -156,6 +156,22 @@ static void bcm47xx_fill_sprom(struct ss +@@ -3,6 +3,7 @@ + * Copyright (C) 2006 Felix Fietkau + * Copyright (C) 2006 Michael Buesch + * Copyright (C) 2010 Waldemar Brodkorb ++ * Copyright (C) 2010-2011 Hauke Mehrtens + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the +@@ -156,6 +157,22 @@ static void bcm47xx_fill_sprom(struct ss } } @@ -20,7 +36,7 @@ + char prefix[10]; + + if (bus->bustype == SSB_BUSTYPE_PCI) { -+ snprintf(prefix, sizeof(prefix), "pci/%x/%x/", ++ snprintf(prefix, sizeof(prefix), "pci/%u/%u/", + bus->host_pci->bus->number + 1, + PCI_SLOT(bus->host_pci->devfn)); + bcm47xx_fill_sprom(out, prefix); @@ -34,7 +50,7 @@ static int bcm47xx_get_invariants(struct ssb_bus *bus, struct ssb_init_invariants *iv) { -@@ -212,6 +228,11 @@ void __init plat_mem_setup(void) +@@ -212,6 +229,11 @@ void __init plat_mem_setup(void) char buf[100]; struct ssb_mipscore *mcore; diff --git a/target/linux/brcm47xx/patches-2.6.37/034-bcm47xx-extend-and-fix-fill-sprom.patch b/target/linux/brcm47xx/patches-2.6.37/034-bcm47xx-extend-and-fix-fill-sprom.patch index 2352639686..6711e3d558 100644 --- a/target/linux/brcm47xx/patches-2.6.37/034-bcm47xx-extend-and-fix-fill-sprom.patch +++ b/target/linux/brcm47xx/patches-2.6.37/034-bcm47xx-extend-and-fix-fill-sprom.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm47xx/setup.c +++ b/arch/mips/bcm47xx/setup.c -@@ -62,6 +62,11 @@ static void bcm47xx_machine_halt(void) +@@ -63,6 +63,11 @@ static void bcm47xx_machine_halt(void) if (nvram_getprefix(prefix, name, buf, sizeof(buf)) >= 0)\ sprom->_outvar = simple_strtoul(buf, NULL, 0); @@ -12,7 +12,7 @@ static inline int nvram_getprefix(const char *prefix, char *name, char *buf, int len) { -@@ -75,6 +80,27 @@ static inline int nvram_getprefix(const +@@ -76,6 +81,27 @@ static inline int nvram_getprefix(const return nvram_getenv(name, buf, len); } @@ -40,7 +40,7 @@ static void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix) { char buf[100]; -@@ -84,7 +110,8 @@ static void bcm47xx_fill_sprom(struct ss +@@ -85,7 +111,8 @@ static void bcm47xx_fill_sprom(struct ss sprom->revision = 1; /* Fallback: Old hardware does not define this. */ READ_FROM_NVRAM(revision, "sromrev", buf); @@ -50,7 +50,7 @@ nvram_parse_macaddr(buf, sprom->il0mac); if (nvram_getprefix(prefix, "et0macaddr", buf, sizeof(buf)) >= 0) nvram_parse_macaddr(buf, sprom->et0mac); -@@ -110,20 +137,36 @@ static void bcm47xx_fill_sprom(struct ss +@@ -111,20 +138,36 @@ static void bcm47xx_fill_sprom(struct ss READ_FROM_NVRAM(pa1hib0, "pa1hib0", buf); READ_FROM_NVRAM(pa1hib2, "pa1hib1", buf); READ_FROM_NVRAM(pa1hib1, "pa1hib2", buf); @@ -97,7 +97,7 @@ READ_FROM_NVRAM(rxpo2g, "rxpo2g", buf); READ_FROM_NVRAM(rxpo5g, "rxpo5g", buf); READ_FROM_NVRAM(rssisav2g, "rssisav2g", buf); -@@ -135,10 +178,18 @@ static void bcm47xx_fill_sprom(struct ss +@@ -136,10 +179,18 @@ static void bcm47xx_fill_sprom(struct ss READ_FROM_NVRAM(rssismf5g, "rssismf5g", buf); READ_FROM_NVRAM(bxa5g, "bxa5g", buf); READ_FROM_NVRAM(cck2gpo, "cck2gpo", buf); diff --git a/target/linux/brcm47xx/patches-2.6.37/400-arch-bcm47xx.patch b/target/linux/brcm47xx/patches-2.6.37/400-arch-bcm47xx.patch index 5ccb62fc6f..14b408842d 100644 --- a/target/linux/brcm47xx/patches-2.6.37/400-arch-bcm47xx.patch +++ b/target/linux/brcm47xx/patches-2.6.37/400-arch-bcm47xx.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c -@@ -92,3 +92,30 @@ int nvram_getenv(char *name, char *val, +@@ -93,3 +93,30 @@ int nvram_getenv(char *name, char *val, return NVRAM_ERR_ENVNOTFOUND; } EXPORT_SYMBOL(nvram_getenv); @@ -33,7 +33,7 @@ +EXPORT_SYMBOL(nvram_get); --- a/arch/mips/bcm47xx/setup.c +++ b/arch/mips/bcm47xx/setup.c -@@ -311,3 +311,20 @@ void __init plat_mem_setup(void) +@@ -312,3 +312,20 @@ void __init plat_mem_setup(void) _machine_halt = bcm47xx_machine_halt; pm_power_off = bcm47xx_machine_halt; } diff --git a/target/linux/brcm47xx/patches-2.6.37/820-wgt634u-nvram-fix.patch b/target/linux/brcm47xx/patches-2.6.37/820-wgt634u-nvram-fix.patch index 29e12a81b9..e1bf69f8c8 100644 --- a/target/linux/brcm47xx/patches-2.6.37/820-wgt634u-nvram-fix.patch +++ b/target/linux/brcm47xx/patches-2.6.37/820-wgt634u-nvram-fix.patch @@ -245,7 +245,7 @@ out the configuration than the in kernel cfe config reader. + --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c -@@ -21,6 +21,8 @@ +@@ -22,6 +22,8 @@ #include static char nvram_buf[NVRAM_SPACE]; @@ -254,7 +254,7 @@ out the configuration than the in kernel cfe config reader. /* Probe for NVRAM header */ static void early_nvram_init(void) -@@ -33,6 +35,25 @@ static void early_nvram_init(void) +@@ -34,6 +36,25 @@ static void early_nvram_init(void) base = mcore->flash_window; lim = mcore->flash_window_size; @@ -280,7 +280,7 @@ out the configuration than the in kernel cfe config reader. off = FLASH_MIN; while (off <= lim) { -@@ -74,6 +95,12 @@ int nvram_getenv(char *name, char *val, +@@ -75,6 +96,12 @@ int nvram_getenv(char *name, char *val, if (!nvram_buf[0]) early_nvram_init(); @@ -293,7 +293,7 @@ out the configuration than the in kernel cfe config reader. /* Look for name=value and return value */ var = &nvram_buf[sizeof(struct nvram_header)]; end = nvram_buf + sizeof(nvram_buf) - 2; -@@ -103,6 +130,9 @@ char *nvram_get(const char *name) +@@ -104,6 +131,9 @@ char *nvram_get(const char *name) if (!nvram_buf[0]) early_nvram_init(); diff --git a/target/linux/brcm47xx/patches-2.6.37/980-wnr834b_no_cardbus_invariant.patch b/target/linux/brcm47xx/patches-2.6.37/980-wnr834b_no_cardbus_invariant.patch index 1d6e069e6b..518e634010 100644 --- a/target/linux/brcm47xx/patches-2.6.37/980-wnr834b_no_cardbus_invariant.patch +++ b/target/linux/brcm47xx/patches-2.6.37/980-wnr834b_no_cardbus_invariant.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm47xx/setup.c +++ b/arch/mips/bcm47xx/setup.c -@@ -245,6 +245,10 @@ static int bcm47xx_get_invariants(struct +@@ -246,6 +246,10 @@ static int bcm47xx_get_invariants(struct if (nvram_getenv("cardbus", buf, sizeof(buf)) >= 0) iv->has_cardbus_slot = !!simple_strtoul(buf, NULL, 10); diff --git a/target/linux/brcm47xx/patches-2.6.37/999-wl_exports.patch b/target/linux/brcm47xx/patches-2.6.37/999-wl_exports.patch index b4f264e5e8..e93dcce4f9 100644 --- a/target/linux/brcm47xx/patches-2.6.37/999-wl_exports.patch +++ b/target/linux/brcm47xx/patches-2.6.37/999-wl_exports.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c -@@ -20,7 +20,8 @@ +@@ -21,7 +21,8 @@ #include #include diff --git a/target/linux/brcm47xx/patches-2.6.38/031-ssb-add-callback-for-sprom.patch b/target/linux/brcm47xx/patches-2.6.38/031-ssb-add-callback-for-sprom.patch index 9dac61c6b3..bf19ae0b98 100644 --- a/target/linux/brcm47xx/patches-2.6.38/031-ssb-add-callback-for-sprom.patch +++ b/target/linux/brcm47xx/patches-2.6.38/031-ssb-add-callback-for-sprom.patch @@ -40,7 +40,7 @@ int err; u16 *buf; -@@ -707,10 +706,14 @@ static int ssb_pci_sprom_get(struct ssb_ +@@ -707,10 +706,17 @@ static int ssb_pci_sprom_get(struct ssb_ if (err) { /* All CRC attempts failed. * Maybe there is no SPROM on the device? @@ -56,6 +56,9 @@ + " fallback SPROM failed (err %d)\n", + err); + } else { ++ ssb_dprintk(KERN_DEBUG PFX "Using SPROM" ++ " revision %d provided by" ++ " platform.\n", sprom->revision); err = 0; goto out_free; } diff --git a/target/linux/brcm47xx/patches-2.6.38/033-bcm47xx-register-fallback-callback.patch b/target/linux/brcm47xx/patches-2.6.38/033-bcm47xx-register-fallback-callback.patch index 4e88cf644d..495a0bff26 100644 --- a/target/linux/brcm47xx/patches-2.6.38/033-bcm47xx-register-fallback-callback.patch +++ b/target/linux/brcm47xx/patches-2.6.38/033-bcm47xx-register-fallback-callback.patch @@ -1,6 +1,14 @@ --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c -@@ -23,7 +23,7 @@ +@@ -3,6 +3,7 @@ + * + * Copyright (C) 2005 Broadcom Corporation + * Copyright (C) 2006 Felix Fietkau ++ * Copyright (C) 2010-2011 Hauke Mehrtens + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the +@@ -23,7 +24,7 @@ static char nvram_buf[NVRAM_SPACE]; /* Probe for NVRAM header */ @@ -11,7 +19,15 @@ struct nvram_header *header; --- a/arch/mips/bcm47xx/setup.c +++ b/arch/mips/bcm47xx/setup.c -@@ -156,6 +156,22 @@ static void bcm47xx_fill_sprom(struct ss +@@ -3,6 +3,7 @@ + * Copyright (C) 2006 Felix Fietkau + * Copyright (C) 2006 Michael Buesch + * Copyright (C) 2010 Waldemar Brodkorb ++ * Copyright (C) 2010-2011 Hauke Mehrtens + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the +@@ -156,6 +157,22 @@ static void bcm47xx_fill_sprom(struct ss } } @@ -20,7 +36,7 @@ + char prefix[10]; + + if (bus->bustype == SSB_BUSTYPE_PCI) { -+ snprintf(prefix, sizeof(prefix), "pci/%x/%x/", ++ snprintf(prefix, sizeof(prefix), "pci/%u/%u/", + bus->host_pci->bus->number + 1, + PCI_SLOT(bus->host_pci->devfn)); + bcm47xx_fill_sprom(out, prefix); @@ -34,7 +50,7 @@ static int bcm47xx_get_invariants(struct ssb_bus *bus, struct ssb_init_invariants *iv) { -@@ -212,6 +228,11 @@ void __init plat_mem_setup(void) +@@ -212,6 +229,11 @@ void __init plat_mem_setup(void) char buf[100]; struct ssb_mipscore *mcore; diff --git a/target/linux/brcm47xx/patches-2.6.38/034-bcm47xx-extend-and-fix-fill-sprom.patch b/target/linux/brcm47xx/patches-2.6.38/034-bcm47xx-extend-and-fix-fill-sprom.patch index 2352639686..6711e3d558 100644 --- a/target/linux/brcm47xx/patches-2.6.38/034-bcm47xx-extend-and-fix-fill-sprom.patch +++ b/target/linux/brcm47xx/patches-2.6.38/034-bcm47xx-extend-and-fix-fill-sprom.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm47xx/setup.c +++ b/arch/mips/bcm47xx/setup.c -@@ -62,6 +62,11 @@ static void bcm47xx_machine_halt(void) +@@ -63,6 +63,11 @@ static void bcm47xx_machine_halt(void) if (nvram_getprefix(prefix, name, buf, sizeof(buf)) >= 0)\ sprom->_outvar = simple_strtoul(buf, NULL, 0); @@ -12,7 +12,7 @@ static inline int nvram_getprefix(const char *prefix, char *name, char *buf, int len) { -@@ -75,6 +80,27 @@ static inline int nvram_getprefix(const +@@ -76,6 +81,27 @@ static inline int nvram_getprefix(const return nvram_getenv(name, buf, len); } @@ -40,7 +40,7 @@ static void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix) { char buf[100]; -@@ -84,7 +110,8 @@ static void bcm47xx_fill_sprom(struct ss +@@ -85,7 +111,8 @@ static void bcm47xx_fill_sprom(struct ss sprom->revision = 1; /* Fallback: Old hardware does not define this. */ READ_FROM_NVRAM(revision, "sromrev", buf); @@ -50,7 +50,7 @@ nvram_parse_macaddr(buf, sprom->il0mac); if (nvram_getprefix(prefix, "et0macaddr", buf, sizeof(buf)) >= 0) nvram_parse_macaddr(buf, sprom->et0mac); -@@ -110,20 +137,36 @@ static void bcm47xx_fill_sprom(struct ss +@@ -111,20 +138,36 @@ static void bcm47xx_fill_sprom(struct ss READ_FROM_NVRAM(pa1hib0, "pa1hib0", buf); READ_FROM_NVRAM(pa1hib2, "pa1hib1", buf); READ_FROM_NVRAM(pa1hib1, "pa1hib2", buf); @@ -97,7 +97,7 @@ READ_FROM_NVRAM(rxpo2g, "rxpo2g", buf); READ_FROM_NVRAM(rxpo5g, "rxpo5g", buf); READ_FROM_NVRAM(rssisav2g, "rssisav2g", buf); -@@ -135,10 +178,18 @@ static void bcm47xx_fill_sprom(struct ss +@@ -136,10 +179,18 @@ static void bcm47xx_fill_sprom(struct ss READ_FROM_NVRAM(rssismf5g, "rssismf5g", buf); READ_FROM_NVRAM(bxa5g, "bxa5g", buf); READ_FROM_NVRAM(cck2gpo, "cck2gpo", buf); diff --git a/target/linux/brcm47xx/patches-2.6.38/400-arch-bcm47xx.patch b/target/linux/brcm47xx/patches-2.6.38/400-arch-bcm47xx.patch index 5ccb62fc6f..14b408842d 100644 --- a/target/linux/brcm47xx/patches-2.6.38/400-arch-bcm47xx.patch +++ b/target/linux/brcm47xx/patches-2.6.38/400-arch-bcm47xx.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c -@@ -92,3 +92,30 @@ int nvram_getenv(char *name, char *val, +@@ -93,3 +93,30 @@ int nvram_getenv(char *name, char *val, return NVRAM_ERR_ENVNOTFOUND; } EXPORT_SYMBOL(nvram_getenv); @@ -33,7 +33,7 @@ +EXPORT_SYMBOL(nvram_get); --- a/arch/mips/bcm47xx/setup.c +++ b/arch/mips/bcm47xx/setup.c -@@ -311,3 +311,20 @@ void __init plat_mem_setup(void) +@@ -312,3 +312,20 @@ void __init plat_mem_setup(void) _machine_halt = bcm47xx_machine_halt; pm_power_off = bcm47xx_machine_halt; } diff --git a/target/linux/brcm47xx/patches-2.6.38/820-wgt634u-nvram-fix.patch b/target/linux/brcm47xx/patches-2.6.38/820-wgt634u-nvram-fix.patch index 29e12a81b9..e1bf69f8c8 100644 --- a/target/linux/brcm47xx/patches-2.6.38/820-wgt634u-nvram-fix.patch +++ b/target/linux/brcm47xx/patches-2.6.38/820-wgt634u-nvram-fix.patch @@ -245,7 +245,7 @@ out the configuration than the in kernel cfe config reader. + --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c -@@ -21,6 +21,8 @@ +@@ -22,6 +22,8 @@ #include static char nvram_buf[NVRAM_SPACE]; @@ -254,7 +254,7 @@ out the configuration than the in kernel cfe config reader. /* Probe for NVRAM header */ static void early_nvram_init(void) -@@ -33,6 +35,25 @@ static void early_nvram_init(void) +@@ -34,6 +36,25 @@ static void early_nvram_init(void) base = mcore->flash_window; lim = mcore->flash_window_size; @@ -280,7 +280,7 @@ out the configuration than the in kernel cfe config reader. off = FLASH_MIN; while (off <= lim) { -@@ -74,6 +95,12 @@ int nvram_getenv(char *name, char *val, +@@ -75,6 +96,12 @@ int nvram_getenv(char *name, char *val, if (!nvram_buf[0]) early_nvram_init(); @@ -293,7 +293,7 @@ out the configuration than the in kernel cfe config reader. /* Look for name=value and return value */ var = &nvram_buf[sizeof(struct nvram_header)]; end = nvram_buf + sizeof(nvram_buf) - 2; -@@ -103,6 +130,9 @@ char *nvram_get(const char *name) +@@ -104,6 +131,9 @@ char *nvram_get(const char *name) if (!nvram_buf[0]) early_nvram_init(); diff --git a/target/linux/brcm47xx/patches-2.6.38/980-wnr834b_no_cardbus_invariant.patch b/target/linux/brcm47xx/patches-2.6.38/980-wnr834b_no_cardbus_invariant.patch index 1d6e069e6b..518e634010 100644 --- a/target/linux/brcm47xx/patches-2.6.38/980-wnr834b_no_cardbus_invariant.patch +++ b/target/linux/brcm47xx/patches-2.6.38/980-wnr834b_no_cardbus_invariant.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm47xx/setup.c +++ b/arch/mips/bcm47xx/setup.c -@@ -245,6 +245,10 @@ static int bcm47xx_get_invariants(struct +@@ -246,6 +246,10 @@ static int bcm47xx_get_invariants(struct if (nvram_getenv("cardbus", buf, sizeof(buf)) >= 0) iv->has_cardbus_slot = !!simple_strtoul(buf, NULL, 10); diff --git a/target/linux/brcm47xx/patches-2.6.38/999-wl_exports.patch b/target/linux/brcm47xx/patches-2.6.38/999-wl_exports.patch index b4f264e5e8..e93dcce4f9 100644 --- a/target/linux/brcm47xx/patches-2.6.38/999-wl_exports.patch +++ b/target/linux/brcm47xx/patches-2.6.38/999-wl_exports.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c -@@ -20,7 +20,8 @@ +@@ -21,7 +21,8 @@ #include #include