summaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/patches-2.6.34/012-MIPS-BCM47xx-Fill-more-values-into-ssb-sprom.patch
diff options
context:
space:
mode:
authorhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-07-19 21:45:29 +0000
committerhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-07-19 21:45:29 +0000
commita7a1dcb8770ef34596f1c04b33b4fa6b72711955 (patch)
tree96b15978bc096d3c30b4dbd449b92c7e81063782 /target/linux/brcm47xx/patches-2.6.34/012-MIPS-BCM47xx-Fill-more-values-into-ssb-sprom.patch
parentdba337333dc22aca6c609bb601e9f3898f6422d0 (diff)
brcm47xx: write boardflags correct into sprom
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22298 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx/patches-2.6.34/012-MIPS-BCM47xx-Fill-more-values-into-ssb-sprom.patch')
-rw-r--r--target/linux/brcm47xx/patches-2.6.34/012-MIPS-BCM47xx-Fill-more-values-into-ssb-sprom.patch25
1 files changed, 14 insertions, 11 deletions
diff --git a/target/linux/brcm47xx/patches-2.6.34/012-MIPS-BCM47xx-Fill-more-values-into-ssb-sprom.patch b/target/linux/brcm47xx/patches-2.6.34/012-MIPS-BCM47xx-Fill-more-values-into-ssb-sprom.patch
index e3df43b35..d3831d105 100644
--- a/target/linux/brcm47xx/patches-2.6.34/012-MIPS-BCM47xx-Fill-more-values-into-ssb-sprom.patch
+++ b/target/linux/brcm47xx/patches-2.6.34/012-MIPS-BCM47xx-Fill-more-values-into-ssb-sprom.patch
@@ -1,4 +1,4 @@
-From d6c049e08568aac29fff854ea0385e63c7150e09 Mon Sep 17 00:00:00 2001
+From 493d4a90850509e5f09b4799d4fc234b734a9d30 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Sun, 18 Jul 2010 13:34:32 +0200
Subject: [PATCH 2/5] MIPS: BCM47xx: Fill more values into ssb sprom
@@ -10,18 +10,19 @@ drivers needs them.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
- arch/mips/bcm47xx/setup.c | 122 +++++++++++++++++++++++++++++++++------------
- 1 files changed, 89 insertions(+), 33 deletions(-)
+ arch/mips/bcm47xx/setup.c | 125 +++++++++++++++++++++++++++++++++------------
+ 1 files changed, 92 insertions(+), 33 deletions(-)
--- a/arch/mips/bcm47xx/setup.c
+++ b/arch/mips/bcm47xx/setup.c
-@@ -74,6 +74,86 @@ static void str2eaddr(char *str, char *d
+@@ -74,6 +74,89 @@ static void str2eaddr(char *str, char *d
}
}
+static void bcm47xx_fill_sprom(struct ssb_sprom *sprom)
+{
+ char buf[100];
++ u64 boardflags;
+
+ memset(sprom, 0, sizeof(struct ssb_sprom));
+
@@ -89,20 +90,22 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+ if (nvram_getenv("pa1itssit", buf, sizeof(buf)) >= 0 ||
+ cfe_getenv("pa1itssit", buf, sizeof(buf)) >= 0)
+ sprom->itssi_a = simple_strtoul(buf, NULL, 0);
-+ sprom->boardflags_lo = 0;
-+ if (nvram_getenv("boardflags", buf, sizeof(buf)) >= 0 ||
-+ cfe_getenv("boardflags", buf, sizeof(buf)) >= 0)
-+ sprom->boardflags_lo = simple_strtoul(buf, NULL, 0);
-+ sprom->boardflags_hi = 0;
++
+ if (nvram_getenv("boardflags", buf, sizeof(buf)) >= 0 ||
+ cfe_getenv("boardflags", buf, sizeof(buf)) >= 0)
-+ sprom->boardflags_hi = simple_strtoul(buf, NULL, 0);
++ boardflags = simple_strtoll(buf, NULL, 0);
++ if (boardflags) {
++ sprom->boardflags_lo = (boardflags & 0x000000000000FFFFLLU);
++ sprom->boardflags_hi = (boardflags & 0x00000000FFFF0000LLU) >> 16;
++ sprom->boardflags2_lo = (boardflags & 0x0000FFFF00000000LLU) >> 32;
++ sprom->boardflags2_hi = (boardflags & 0xFFFF000000000000LLU) >> 48;
++ }
+}
+
static int bcm47xx_get_invariants(struct ssb_bus *bus,
struct ssb_init_invariants *iv)
{
-@@ -82,43 +162,19 @@ static int bcm47xx_get_invariants(struct
+@@ -82,43 +165,19 @@ static int bcm47xx_get_invariants(struct
/* Fill boardinfo structure */
memset(&(iv->boardinfo), 0 , sizeof(struct ssb_boardinfo));