Ignore:
Timestamp:
2011-05-01T22:28:35+02:00 (6 years ago)
Author:
hauke
Message:

brcm47xx: add fallback sprom for pci devices without an own sprom.

If there is no sprom on an ssb based pci device on the brcm47xx
architecture ssb now asks the architecture code to look into the nvram
to get some sprom data for this device. Now we are able to read out
pci/1/1/ foo or pci/1/3/ foo config options.

This will fix some problems where the wireless devices does not got an
mac address and the following message was show:
ssb: WARNING: Invalid SPROM CRC (corrupt SPROM)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/brcm63xx/patches-2.6.37/977-ssb_export_fallback_sprom.patch

    r25629 r26801  
    1 --- a/drivers/ssb/sprom.c 
    2 +++ b/drivers/ssb/sprom.c 
    3 @@ -176,6 +176,7 @@ const struct ssb_sprom *ssb_get_fallback 
     1--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c 
     2+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c 
     3@@ -1907,7 +1907,7 @@ static void __init nb4_nvram_fixup(void) 
     4  * bcm4318 WLAN work 
     5  */ 
     6 #ifdef CONFIG_SSB_PCIHOST 
     7-static struct ssb_sprom bcm63xx_sprom = { 
     8+struct ssb_sprom bcm63xx_sprom = { 
     9        .revision               = 0x02, 
     10        .board_rev              = 0x17, 
     11        .country_code           = 0x0, 
     12@@ -1927,6 +1927,7 @@ static struct ssb_sprom bcm63xx_sprom = 
     13        .boardflags_lo          = 0x2848, 
     14        .boardflags_hi          = 0x0000, 
     15 }; 
     16+EXPORT_SYMBOL(bcm63xx_sprom); 
     17  
     18 int bcm63xx_get_fallback_sprom(struct ssb_bus *bus) 
    419 { 
    5         return fallback_sprom; 
    6  } 
    7 +EXPORT_SYMBOL(ssb_get_fallback_sprom); 
    8   
    9  /* http://bcm-v4.sipsolutions.net/802.11/IsSpromAvailable */ 
    10  bool ssb_is_sprom_available(struct ssb_bus *bus) 
    11 --- a/include/linux/ssb/ssb.h 
    12 +++ b/include/linux/ssb/ssb.h 
    13 @@ -401,6 +401,7 @@ extern bool ssb_is_sprom_available(struc 
    14  /* Set a fallback SPROM. 
    15   * See kdoc at the function definition for complete documentation. */ 
    16  extern int ssb_arch_set_fallback_sprom(const struct ssb_sprom *sprom); 
    17 +extern const struct ssb_sprom *ssb_get_fallback_sprom(void); 
    18   
    19  /* Suspend a SSB bus. 
    20   * Call this from the parent bus suspend routine. */ 
Note: See TracChangeset for help on using the changeset viewer.