diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2021-02-17 19:07:23 +0100 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2021-02-17 20:40:16 +0100 |
commit | f323dec4f866d9ea75eae11c6762d0144d100628 (patch) | |
tree | c40f33e9a89e935b32e6a1520f02019200e7cc17 /target/linux/bcm63xx/patches-5.10/801-ssb_export_fallback_sprom.patch | |
parent | 5bb9954826229782d4d285d65dfcca8a1c9e20d9 (diff) | |
download | upstream-f323dec4f866d9ea75eae11c6762d0144d100628.tar.gz upstream-f323dec4f866d9ea75eae11c6762d0144d100628.tar.bz2 upstream-f323dec4f866d9ea75eae11c6762d0144d100628.zip |
bcm63xx: add kernel 5.10 support
Runtime-tested on Comtrend AR-5387un.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm63xx/patches-5.10/801-ssb_export_fallback_sprom.patch')
-rw-r--r-- | target/linux/bcm63xx/patches-5.10/801-ssb_export_fallback_sprom.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/target/linux/bcm63xx/patches-5.10/801-ssb_export_fallback_sprom.patch b/target/linux/bcm63xx/patches-5.10/801-ssb_export_fallback_sprom.patch new file mode 100644 index 0000000000..6e4e05a63b --- /dev/null +++ b/target/linux/bcm63xx/patches-5.10/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> +@@ -388,7 +389,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) |