aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/patches-3.2/199-MIPS-BCM47XX-provide-sprom-to-bcma-bus.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2012-03-27 17:07:28 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2012-03-27 17:07:28 +0000
commita5abb0810078a982452e4a398cd7b2ccee31c28d (patch)
treeed5093337bd35fcd845ad498e3691307a277f30f /target/linux/brcm47xx/patches-3.2/199-MIPS-BCM47XX-provide-sprom-to-bcma-bus.patch
parented8902d6868d8be313179ed297a54d76f8672574 (diff)
downloadupstream-a5abb0810078a982452e4a398cd7b2ccee31c28d.tar.gz
upstream-a5abb0810078a982452e4a398cd7b2ccee31c28d.tar.bz2
upstream-a5abb0810078a982452e4a398cd7b2ccee31c28d.zip
brcm47xx: update sprom patches like they are in the mainline kernel
SVN-Revision: 31093
Diffstat (limited to 'target/linux/brcm47xx/patches-3.2/199-MIPS-BCM47XX-provide-sprom-to-bcma-bus.patch')
-rw-r--r--target/linux/brcm47xx/patches-3.2/199-MIPS-BCM47XX-provide-sprom-to-bcma-bus.patch94
1 files changed, 0 insertions, 94 deletions
diff --git a/target/linux/brcm47xx/patches-3.2/199-MIPS-BCM47XX-provide-sprom-to-bcma-bus.patch b/target/linux/brcm47xx/patches-3.2/199-MIPS-BCM47XX-provide-sprom-to-bcma-bus.patch
deleted file mode 100644
index c96813c857..0000000000
--- a/target/linux/brcm47xx/patches-3.2/199-MIPS-BCM47XX-provide-sprom-to-bcma-bus.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From 112b2e12edda60f495b57e8a1d85eb95e2662845 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke@hauke-m.de>
-Date: Thu, 16 Feb 2012 23:44:26 +0100
-Subject: [PATCH 199/202] MIPS: BCM47XX: provide sprom to bcma bus
-
-On SoCs the sprom is often stored in nvram in the flashchip. This patch
-registers a sprom fallback callback handler in bcma and provides the
-sprom needed for this device.
-
-Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
----
- arch/mips/bcm47xx/setup.c | 39 +++++++++++++++++++++++++++++++++++----
- 1 files changed, 35 insertions(+), 4 deletions(-)
-
---- a/arch/mips/bcm47xx/setup.c
-+++ b/arch/mips/bcm47xx/setup.c
-@@ -3,7 +3,7 @@
- * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
- * Copyright (C) 2006 Michael Buesch <m@bues.ch>
- * Copyright (C) 2010 Waldemar Brodkorb <wbx@openadk.org>
-- * Copyright (C) 2010-2011 Hauke Mehrtens <hauke@hauke-m.de>
-+ * Copyright (C) 2010-2012 Hauke Mehrtens <hauke@hauke-m.de>
- * Copyright (C) 2011-2012 Tathagata Das <tathagata@alumnux.com>
- *
- * This program is free software; you can redistribute it and/or modify it
-@@ -93,7 +93,7 @@ static void bcm47xx_machine_halt(void)
- }
-
- #ifdef CONFIG_BCM47XX_SSB
--static int bcm47xx_get_sprom(struct ssb_bus *bus, struct ssb_sprom *out)
-+static int bcm47xx_get_sprom_ssb(struct ssb_bus *bus, struct ssb_sprom *out)
- {
- char prefix[10];
-
-@@ -110,7 +110,7 @@ static int bcm47xx_get_sprom(struct ssb_
- }
-
- static int bcm47xx_get_invariants(struct ssb_bus *bus,
-- struct ssb_init_invariants *iv)
-+ struct ssb_init_invariants *iv)
- {
- char buf[20];
-
-@@ -165,7 +165,7 @@ static void __init bcm47xx_register_ssb(
- char buf[100];
- struct ssb_mipscore *mcore;
-
-- err = ssb_arch_register_fallback_sprom(&bcm47xx_get_sprom);
-+ err = ssb_arch_register_fallback_sprom(&bcm47xx_get_sprom_ssb);
- if (err)
- printk(KERN_WARNING "bcm47xx: someone else already registered"
- " a ssb SPROM callback handler (err %d)\n", err);
-@@ -199,10 +199,41 @@ static void __init bcm47xx_register_ssb(
- #endif
-
- #ifdef CONFIG_BCM47XX_BCMA
-+static int bcm47xx_get_sprom_bcma(struct bcma_bus *bus, struct ssb_sprom *out)
-+{
-+ char prefix[10];
-+ struct bcma_device *core;
-+
-+ if (bus->hosttype == BCMA_HOSTTYPE_PCI) {
-+ snprintf(prefix, sizeof(prefix), "pci/%u/%u/",
-+ bus->host_pci->bus->number + 1,
-+ PCI_SLOT(bus->host_pci->devfn));
-+ bcm47xx_fill_sprom(out, prefix);
-+ return 0;
-+ } else if (bus->hosttype == BCMA_HOSTTYPE_SOC) {
-+ bcm47xx_fill_sprom_ethernet(out, NULL);
-+ core = bcma_find_core(bus, BCMA_CORE_80211);
-+ if (core) {
-+ snprintf(prefix, sizeof(prefix), "sb/%u/",
-+ core->core_index);
-+ bcm47xx_fill_sprom(out, prefix);
-+ }
-+ return 0;
-+ } else {
-+ printk(KERN_WARNING "bcm47xx: unable to fill SPROM for given bustype.\n");
-+ return -EINVAL;
-+ }
-+}
-+
- static void __init bcm47xx_register_bcma(void)
- {
- int err;
-
-+ err = bcma_arch_register_fallback_sprom(&bcm47xx_get_sprom_bcma);
-+ if (err)
-+ printk(KERN_WARNING "bcm47xx: someone else already registered"
-+ " a bcma SPROM callback handler (err %d)\n", err);
-+
- err = bcma_host_soc_register(&bcm47xx_bus.bcma);
- if (err)
- panic("Failed to initialize BCMA bus (err %d)\n", err);