aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/broadcom-wl/patches
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2014-10-02 12:24:05 +0000
committerJonas Gorski <jogo@openwrt.org>2014-10-02 12:24:05 +0000
commitf4c1b25a5fb12cda1c83e3875efa75de836f81a6 (patch)
tree6ac1d4e44a28f0484cdd89588790d764c8c40909 /package/kernel/broadcom-wl/patches
parentfed0932d4d41990bbb14d044b4ee9ed4ca50e070 (diff)
downloadmaster-187ad058-f4c1b25a5fb12cda1c83e3875efa75de836f81a6.tar.gz
master-187ad058-f4c1b25a5fb12cda1c83e3875efa75de836f81a6.tar.bz2
master-187ad058-f4c1b25a5fb12cda1c83e3875efa75de836f81a6.zip
brcm-wl: use new brcm63xx fallback sprom
This fixes brcm63xx fallback sprom extraction. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42725 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/broadcom-wl/patches')
-rw-r--r--package/kernel/broadcom-wl/patches/910-fallback-sprom.patch24
1 files changed, 9 insertions, 15 deletions
diff --git a/package/kernel/broadcom-wl/patches/910-fallback-sprom.patch b/package/kernel/broadcom-wl/patches/910-fallback-sprom.patch
index 749ecbf31f..a85e40bc14 100644
--- a/package/kernel/broadcom-wl/patches/910-fallback-sprom.patch
+++ b/package/kernel/broadcom-wl/patches/910-fallback-sprom.patch
@@ -6,24 +6,13 @@
+#if defined(CONFIG_SSB_PCIHOST) && defined(CONFIG_BOARD_BCM963XX)
+#include <linux/ssb/ssb.h>
-+extern struct ssb_sprom bcm63xx_sprom;
++extern int bcm63xx_get_fallback_sprom(uint pci_bus, uint pci_slot, struct ssb_sprom *out);
+#endif
+
#ifdef WLTEST
#include <sbsprom.h>
#endif /* WLTEST */
-@@ -2058,6 +2063,10 @@ BCMATTACHFN(initvars_srom_pci)(si_t *sih
- bool flash = FALSE;
- int err = 0;
-
-+#if defined(CONFIG_SSB_PCIHOST) && defined(CONFIG_BOARD_BCM963XX)
-+ char eabuf[18];
-+#endif
-+
- /*
- * Apply CRC over SROM content regardless SROM is present or not,
- * and use variable <devpath>sromrev's existance in flash to decide
-@@ -2120,6 +2129,58 @@ BCMATTACHFN(initvars_srom_pci)(si_t *sih
+@@ -2120,6 +2125,63 @@ BCMATTACHFN(initvars_srom_pci)(si_t *sih
goto varscont;
}
@@ -32,9 +21,14 @@
+
+ if( base != NULL )
+ {
-+ varbuf_init(&b, base, MAXSZ_NVRAM_VARS);
++ char eabuf[18];
++ struct ssb_sprom bcm63xx_sprom;
++ uint pci_bus = osl_pci_bus(osh), pci_slot = osl_pci_slot(osh);
++
++ bcm63xx_get_fallback_sprom(pci_bus, pci_slot, &bcm63xx_sprom);
++ printk("BCM%X(%02x:%02x) using sprom version %i\n", sih->chip, pci_bus, pci_slot, bcm63xx_sprom.revision);
+
-+ printk("Got version %i SPROM from SSB\n", bcm63xx_sprom.revision);
++ varbuf_init(&b, base, MAXSZ_NVRAM_VARS);
+
+ varbuf_append(&b, vstr_sromrev, bcm63xx_sprom.revision);
+ varbuf_append(&b, vstr_boardrev, bcm63xx_sprom.board_rev);