diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2011-06-27 21:28:40 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2011-06-27 21:28:40 +0000 |
commit | ca979845ccc58feb6ca04e913d24414fe90708c4 (patch) | |
tree | 6fcc301d99db0e44a014bd66cc9cf97c5148274b /target/linux/brcm63xx | |
parent | e439de144f0bd6dd3cdea921960bb5ae9a7be208 (diff) | |
download | upstream-ca979845ccc58feb6ca04e913d24414fe90708c4.tar.gz upstream-ca979845ccc58feb6ca04e913d24414fe90708c4.tar.bz2 upstream-ca979845ccc58feb6ca04e913d24414fe90708c4.zip |
kernel: update ssb and bcma to linux-next next-20110627
SVN-Revision: 27295
Diffstat (limited to 'target/linux/brcm63xx')
-rw-r--r-- | target/linux/brcm63xx/patches-2.6.39/500-ssb-add-callback-for-sprom.patch | 111 |
1 files changed, 0 insertions, 111 deletions
diff --git a/target/linux/brcm63xx/patches-2.6.39/500-ssb-add-callback-for-sprom.patch b/target/linux/brcm63xx/patches-2.6.39/500-ssb-add-callback-for-sprom.patch index e7d2823306..23f4d94aa1 100644 --- a/target/linux/brcm63xx/patches-2.6.39/500-ssb-add-callback-for-sprom.patch +++ b/target/linux/brcm63xx/patches-2.6.39/500-ssb-add-callback-for-sprom.patch @@ -30,114 +30,3 @@ } #endif ---- a/drivers/ssb/pci.c -+++ b/drivers/ssb/pci.c -@@ -662,7 +662,6 @@ static int sprom_extract(struct ssb_bus - static int ssb_pci_sprom_get(struct ssb_bus *bus, - struct ssb_sprom *sprom) - { -- const struct ssb_sprom *fallback; - int err; - u16 *buf; - -@@ -707,10 +706,14 @@ static int ssb_pci_sprom_get(struct ssb_ - if (err) { - /* All CRC attempts failed. - * Maybe there is no SPROM on the device? -- * If we have a fallback, use that. */ -- fallback = ssb_get_fallback_sprom(); -- if (fallback) { -- memcpy(sprom, fallback, sizeof(*sprom)); -+ * Now we ask the arch code if there is some sprom -+ * avaliable for this device in some other storage */ -+ err = ssb_fill_sprom_with_fallback(bus, sprom); -+ if (err) { -+ ssb_printk(KERN_WARNING PFX "WARNING: Using" -+ " fallback SPROM failed (err %d)\n", -+ err); -+ } else { - err = 0; - goto out_free; - } ---- a/drivers/ssb/sprom.c -+++ b/drivers/ssb/sprom.c -@@ -17,7 +17,7 @@ - #include <linux/slab.h> - - --static const struct ssb_sprom *fallback_sprom; -+static int(*get_fallback_sprom)(struct ssb_bus *dev, struct ssb_sprom *out); - - - static int sprom2hex(const u16 *sprom, char *buf, size_t buf_len, -@@ -145,13 +145,14 @@ out: - } - - /** -- * ssb_arch_set_fallback_sprom - Set a fallback SPROM for use if no SPROM is found. -+ * ssb_arch_register_fallback_sprom - Registers a method providing a fallback -+ * SPROM if no SPROM is found. - * -- * @sprom: The SPROM data structure to register. -+ * @sprom_callback: The callbcak function. - * -- * With this function the architecture implementation may register a fallback -- * SPROM data structure. The fallback is only used for PCI based SSB devices, -- * where no valid SPROM can be found in the shadow registers. -+ * With this function the architecture implementation may register a callback -+ * handler which wills the SPROM data structure. The fallback is only used for -+ * PCI based SSB devices, where no valid SPROM can be found in the shadow registers. - * - * This function is useful for weird architectures that have a half-assed SSB device - * hardwired to their PCI bus. -@@ -163,18 +164,21 @@ out: - * - * This function is available for architecture code, only. So it is not exported. - */ --int ssb_arch_set_fallback_sprom(const struct ssb_sprom *sprom) -+int ssb_arch_register_fallback_sprom(int (*sprom_callback)(struct ssb_bus *bus, struct ssb_sprom *out)) - { -- if (fallback_sprom) -+ if (get_fallback_sprom) - return -EEXIST; -- fallback_sprom = sprom; -+ get_fallback_sprom = sprom_callback; - - return 0; - } - --const struct ssb_sprom *ssb_get_fallback_sprom(void) -+int ssb_fill_sprom_with_fallback(struct ssb_bus *bus, struct ssb_sprom *out) - { -- return fallback_sprom; -+ if (!get_fallback_sprom) -+ return -ENOENT; -+ -+ return get_fallback_sprom(bus, out); - } - - /* http://bcm-v4.sipsolutions.net/802.11/IsSpromAvailable */ ---- a/drivers/ssb/ssb_private.h -+++ b/drivers/ssb/ssb_private.h -@@ -171,7 +171,7 @@ ssize_t ssb_attr_sprom_store(struct ssb_ - const char *buf, size_t count, - int (*sprom_check_crc)(const u16 *sprom, size_t size), - int (*sprom_write)(struct ssb_bus *bus, const u16 *sprom)); --extern const struct ssb_sprom *ssb_get_fallback_sprom(void); -+extern int ssb_fill_sprom_with_fallback(struct ssb_bus *bus, struct ssb_sprom *out); - - - /* core.c */ ---- a/include/linux/ssb/ssb.h -+++ b/include/linux/ssb/ssb.h -@@ -404,7 +404,9 @@ extern bool ssb_is_sprom_available(struc - - /* Set a fallback SPROM. - * See kdoc at the function definition for complete documentation. */ --extern int ssb_arch_set_fallback_sprom(const struct ssb_sprom *sprom); -+extern int ssb_arch_register_fallback_sprom( -+ int (*sprom_callback)(struct ssb_bus *bus, -+ struct ssb_sprom *out)); - - /* Suspend a SSB bus. - * Call this from the parent bus suspend routine. */ |