aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx/patches-4.4/801-ssb_export_fallback_sprom.patch
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2015-12-02 22:24:46 +0000
committerJonas Gorski <jogo@openwrt.org>2015-12-02 22:24:46 +0000
commite395433178224ff1e2a6053105d12936b46c7576 (patch)
tree6fd6e2bb8019d78d1b8a57d63516ebbe3cff47f6 /target/linux/brcm63xx/patches-4.4/801-ssb_export_fallback_sprom.patch
parent621677154f39f2e0b698a558b8b795db84a8e014 (diff)
downloadupstream-e395433178224ff1e2a6053105d12936b46c7576.tar.gz
upstream-e395433178224ff1e2a6053105d12936b46c7576.tar.bz2
upstream-e395433178224ff1e2a6053105d12936b46c7576.zip
brcm63xx: add linux 4.4 support
Only netboot tested. Flash at your own risk. Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 47702
Diffstat (limited to 'target/linux/brcm63xx/patches-4.4/801-ssb_export_fallback_sprom.patch')
-rw-r--r--target/linux/brcm63xx/patches-4.4/801-ssb_export_fallback_sprom.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-4.4/801-ssb_export_fallback_sprom.patch b/target/linux/brcm63xx/patches-4.4/801-ssb_export_fallback_sprom.patch
new file mode 100644
index 0000000000..11a83536b7
--- /dev/null
+++ b/target/linux/brcm63xx/patches-4.4/801-ssb_export_fallback_sprom.patch
@@ -0,0 +1,31 @@
+--- a/arch/mips/bcm63xx/sprom.c
++++ b/arch/mips/bcm63xx/sprom.c
+@@ -8,6 +8,7 @@
+ */
+
+ #include <linux/init.h>
++#include <linux/export.h>
+ #include <linux/kernel.h>
+ #include <linux/string.h>
+ #include <linux/platform_device.h>
+@@ -387,7 +388,19 @@ struct fallback_sprom_match {
+ struct ssb_sprom sprom;
+ };
+
+-static struct fallback_sprom_match fallback_sprom;
++struct fallback_sprom_match fallback_sprom;
++
++int bcm63xx_get_fallback_sprom(uint pci_bus, uint pci_slot, struct ssb_sprom *out)
++{
++ if (pci_bus != fallback_sprom.pci_bus ||
++ pci_slot != fallback_sprom.pci_dev)
++ pr_warn("fallback_sprom: pci bus/device num mismatch: expected %i/%i, but got %i/%i\n",
++ fallback_sprom.pci_bus, fallback_sprom.pci_dev,
++ pci_bus, pci_slot);
++ memcpy(out, &fallback_sprom.sprom, sizeof(struct ssb_sprom));
++ return 0;
++}
++EXPORT_SYMBOL(bcm63xx_get_fallback_sprom);
+
+ #if defined(CONFIG_SSB_PCIHOST)
+ int bcm63xx_get_fallback_ssb_sprom(struct ssb_bus *bus, struct ssb_sprom *out)