aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/patches-2.6.36/010-MIPS-BCM47xx-Do-not-read-config-from-CFE.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2010-12-05 19:19:50 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2010-12-05 19:19:50 +0000
commit852f7b37ed345e32db50a7fc82e72929a0e13fdc (patch)
tree37b86bee93b62b1ec74b3a93860185a7908cb32c /target/linux/brcm47xx/patches-2.6.36/010-MIPS-BCM47xx-Do-not-read-config-from-CFE.patch
parent7b1ae48645f9b2762137448d76e10fb0d00bdeab (diff)
downloadupstream-852f7b37ed345e32db50a7fc82e72929a0e13fdc.tar.gz
upstream-852f7b37ed345e32db50a7fc82e72929a0e13fdc.tar.bz2
upstream-852f7b37ed345e32db50a7fc82e72929a0e13fdc.zip
brcm47xx: backport patch from kernel 2.6.37
Backport patches from r24162 brcm47xx: reorder patches like they were commitet upstream SVN-Revision: 24266
Diffstat (limited to 'target/linux/brcm47xx/patches-2.6.36/010-MIPS-BCM47xx-Do-not-read-config-from-CFE.patch')
-rw-r--r--target/linux/brcm47xx/patches-2.6.36/010-MIPS-BCM47xx-Do-not-read-config-from-CFE.patch76
1 files changed, 76 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-2.6.36/010-MIPS-BCM47xx-Do-not-read-config-from-CFE.patch b/target/linux/brcm47xx/patches-2.6.36/010-MIPS-BCM47xx-Do-not-read-config-from-CFE.patch
new file mode 100644
index 0000000000..b2bdf744ce
--- /dev/null
+++ b/target/linux/brcm47xx/patches-2.6.36/010-MIPS-BCM47xx-Do-not-read-config-from-CFE.patch
@@ -0,0 +1,76 @@
+From 12b15e5d5914d174e3411d0f0b3fd55dc1b5e55a Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Sat, 27 Nov 2010 00:34:02 +0100
+Subject: [PATCH 1/6] MIPS: BCM47xx: Do not read config from CFE
+
+The config options read out here are not stored in CFE, but only in
+NVRAM on the devices. Remove reading from CFE and only access the NVRAM.
+Reading out CFE does not harm, but is useless here.
+
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ arch/mips/bcm47xx/setup.c | 28 +++++++++-------------------
+ 1 files changed, 9 insertions(+), 19 deletions(-)
+
+--- a/arch/mips/bcm47xx/setup.c
++++ b/arch/mips/bcm47xx/setup.c
+@@ -32,7 +32,6 @@
+ #include <asm/reboot.h>
+ #include <asm/time.h>
+ #include <bcm47xx.h>
+-#include <asm/fw/cfe/cfe_api.h>
+ #include <asm/mach-bcm47xx/nvram.h>
+
+ struct ssb_bus ssb_bcm47xx;
+@@ -82,42 +81,33 @@ static int bcm47xx_get_invariants(struct
+ /* Fill boardinfo structure */
+ memset(&(iv->boardinfo), 0 , sizeof(struct ssb_boardinfo));
+
+- if (cfe_getenv("boardvendor", buf, sizeof(buf)) >= 0 ||
+- nvram_getenv("boardvendor", buf, sizeof(buf)) >= 0)
++ if (nvram_getenv("boardvendor", buf, sizeof(buf)) >= 0)
+ iv->boardinfo.type = (u16)simple_strtoul(buf, NULL, 0);
+- if (cfe_getenv("boardtype", buf, sizeof(buf)) >= 0 ||
+- nvram_getenv("boardtype", buf, sizeof(buf)) >= 0)
++ if (nvram_getenv("boardtype", buf, sizeof(buf)) >= 0)
+ iv->boardinfo.type = (u16)simple_strtoul(buf, NULL, 0);
+- if (cfe_getenv("boardrev", buf, sizeof(buf)) >= 0 ||
+- nvram_getenv("boardrev", buf, sizeof(buf)) >= 0)
++ if (nvram_getenv("boardrev", buf, sizeof(buf)) >= 0)
+ iv->boardinfo.rev = (u16)simple_strtoul(buf, NULL, 0);
+
+ /* Fill sprom structure */
+ memset(&(iv->sprom), 0, sizeof(struct ssb_sprom));
+ iv->sprom.revision = 3;
+
+- if (cfe_getenv("et0macaddr", buf, sizeof(buf)) >= 0 ||
+- nvram_getenv("et0macaddr", buf, sizeof(buf)) >= 0)
++ if (nvram_getenv("et0macaddr", buf, sizeof(buf)) >= 0)
+ str2eaddr(buf, iv->sprom.et0mac);
+
+- if (cfe_getenv("et1macaddr", buf, sizeof(buf)) >= 0 ||
+- nvram_getenv("et1macaddr", buf, sizeof(buf)) >= 0)
++ if (nvram_getenv("et1macaddr", buf, sizeof(buf)) >= 0)
+ str2eaddr(buf, iv->sprom.et1mac);
+
+- if (cfe_getenv("et0phyaddr", buf, sizeof(buf)) >= 0 ||
+- nvram_getenv("et0phyaddr", buf, sizeof(buf)) >= 0)
++ if (nvram_getenv("et0phyaddr", buf, sizeof(buf)) >= 0)
+ iv->sprom.et0phyaddr = simple_strtoul(buf, NULL, 0);
+
+- if (cfe_getenv("et1phyaddr", buf, sizeof(buf)) >= 0 ||
+- nvram_getenv("et1phyaddr", buf, sizeof(buf)) >= 0)
++ if (nvram_getenv("et1phyaddr", buf, sizeof(buf)) >= 0)
+ iv->sprom.et1phyaddr = simple_strtoul(buf, NULL, 0);
+
+- if (cfe_getenv("et0mdcport", buf, sizeof(buf)) >= 0 ||
+- nvram_getenv("et0mdcport", buf, sizeof(buf)) >= 0)
++ if (nvram_getenv("et0mdcport", buf, sizeof(buf)) >= 0)
+ iv->sprom.et0mdcport = simple_strtoul(buf, NULL, 10);
+
+- if (cfe_getenv("et1mdcport", buf, sizeof(buf)) >= 0 ||
+- nvram_getenv("et1mdcport", buf, sizeof(buf)) >= 0)
++ if (nvram_getenv("et1mdcport", buf, sizeof(buf)) >= 0)
+ iv->sprom.et1mdcport = simple_strtoul(buf, NULL, 10);
+
+ return 0;