diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2015-11-16 07:18:37 +0000 |
---|---|---|
committer | Rafał Miłecki <zajec5@gmail.com> | 2015-11-16 07:18:37 +0000 |
commit | f8692a4b88893a47ac3e49261c242b9a63a11175 (patch) | |
tree | 360af83203b9aba4b32a06ed65d94d5f51a717f4 /target/linux/brcm47xx/patches-4.1/033-01-MIPS-BCM47xx-Support-on-SoC-bus-in-SPROM-reading-fun.patch | |
parent | b2dab45aa776f8cacef8606af05cc657c8f99323 (diff) | |
download | upstream-f8692a4b88893a47ac3e49261c242b9a63a11175.tar.gz upstream-f8692a4b88893a47ac3e49261c242b9a63a11175.tar.bz2 upstream-f8692a4b88893a47ac3e49261c242b9a63a11175.zip |
brcm47xx: backport BCM47xx MIPS commits from 4.3 and 4.4-rc1
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 47484
Diffstat (limited to 'target/linux/brcm47xx/patches-4.1/033-01-MIPS-BCM47xx-Support-on-SoC-bus-in-SPROM-reading-fun.patch')
-rw-r--r-- | target/linux/brcm47xx/patches-4.1/033-01-MIPS-BCM47xx-Support-on-SoC-bus-in-SPROM-reading-fun.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-4.1/033-01-MIPS-BCM47xx-Support-on-SoC-bus-in-SPROM-reading-fun.patch b/target/linux/brcm47xx/patches-4.1/033-01-MIPS-BCM47xx-Support-on-SoC-bus-in-SPROM-reading-fun.patch new file mode 100644 index 0000000000..f8d945d1ba --- /dev/null +++ b/target/linux/brcm47xx/patches-4.1/033-01-MIPS-BCM47xx-Support-on-SoC-bus-in-SPROM-reading-fun.patch @@ -0,0 +1,51 @@ +From daa7ce02513d2188fe6f5ff47ce5ef83eb7de739 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com> +Date: Sun, 25 Oct 2015 22:16:47 +0100 +Subject: [PATCH 1/3] MIPS: BCM47xx: Support on-SoC bus in SPROM reading + function +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +To support (extract) SPROM on Broadcom ARM devices we should separate +SPROM code and make it a separated module. We won't want to export +bcm47xx_fill_sprom symbol so we should support SoC SPROM in the standard +fallback function and then modify ssb to use it. + +Signed-off-by: Rafał Miłecki <zajec5@gmail.com> +Acked-by: Hauke Mehrtens <hauke@hauke-m.de> +Cc: linux-mips@linux-mips.org +Patchwork: https://patchwork.linux-mips.org/patch/11355/ +Signed-off-by: Ralf Baechle <ralf@linux-mips.org> +--- + arch/mips/bcm47xx/sprom.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/arch/mips/bcm47xx/sprom.c b/arch/mips/bcm47xx/sprom.c +index 2d5c7a7..e19c1b9 100644 +--- a/arch/mips/bcm47xx/sprom.c ++++ b/arch/mips/bcm47xx/sprom.c +@@ -610,14 +610,18 @@ static int bcm47xx_get_sprom_ssb(struct ssb_bus *bus, struct ssb_sprom *out) + { + char prefix[10]; + +- if (bus->bustype == SSB_BUSTYPE_PCI) { ++ switch (bus->bustype) { ++ case SSB_BUSTYPE_SSB: ++ bcm47xx_fill_sprom(out, NULL, false); ++ return 0; ++ case SSB_BUSTYPE_PCI: + memset(out, 0, sizeof(struct ssb_sprom)); + snprintf(prefix, sizeof(prefix), "pci/%u/%u/", + bus->host_pci->bus->number + 1, + PCI_SLOT(bus->host_pci->devfn)); + bcm47xx_fill_sprom(out, prefix, false); + return 0; +- } else { ++ default: + pr_warn("Unable to fill SPROM for given bustype.\n"); + return -EINVAL; + } +-- +1.8.4.5 + |