From 9a24294b02236a1f97f7e303222f9ea29fb536d0 Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Thu, 2 Oct 2014 12:24:05 +0000 Subject: [PATCH] brcm-wl: use new brcm63xx fallback sprom MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This fixes brcm63xx fallback sprom extraction. Signed-off-by: Álvaro Fernández Rojas Signed-off-by: Jonas Gorski SVN-Revision: 42725 --- .../patches/910-fallback-sprom.patch | 24 +++++++------------ 1 file 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 749ecbf31fce..a85e40bc1401 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 -+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 #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 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); -- 2.30.2