aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm63xx/patches-4.19/801-ssb_export_fallback_sprom.patch
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-02-08 20:33:30 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-02-14 14:10:51 +0100
commite7bfda2c243e66a75ff966ba04c28b1590b5d24c (patch)
tree069959b7e6a8cf31b0feb2857a63c7c4c0e3dcbf /target/linux/bcm63xx/patches-4.19/801-ssb_export_fallback_sprom.patch
parent8fe5ad5d3373cebed4fbc55a7b779721971ce427 (diff)
downloadupstream-e7bfda2c243e66a75ff966ba04c28b1590b5d24c.tar.gz
upstream-e7bfda2c243e66a75ff966ba04c28b1590b5d24c.tar.bz2
upstream-e7bfda2c243e66a75ff966ba04c28b1590b5d24c.zip
brcm63xx: rename target to bcm63xx
This change makes the names of Broadcom targets consistent by using the common notation based on SoC/CPU ID (which is used internally anyway), bcmXXXX instead of brcmXXXX. This is even used for target TITLE in make menuconfig already, only the short target name used brcm so far. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/bcm63xx/patches-4.19/801-ssb_export_fallback_sprom.patch')
-rw-r--r--target/linux/bcm63xx/patches-4.19/801-ssb_export_fallback_sprom.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/target/linux/bcm63xx/patches-4.19/801-ssb_export_fallback_sprom.patch b/target/linux/bcm63xx/patches-4.19/801-ssb_export_fallback_sprom.patch
new file mode 100644
index 0000000000..11a83536b7
--- /dev/null
+++ b/target/linux/bcm63xx/patches-4.19/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)