summaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx
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
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')
-rw-r--r--target/linux/brcm47xx/patches-2.6.34/011-MIPS-BCM47xx-Really-fix-128MB-RAM-problem.patch2
-rw-r--r--target/linux/brcm47xx/patches-2.6.34/012-MIPS-BCM47xx-Fill-more-values-into-ssb-sprom.patch25
-rw-r--r--target/linux/brcm47xx/patches-2.6.34/013-MIPS-BCM47xx-Activate-SSB_B43_PCI_BRIDGE-by-default.patch2
-rw-r--r--target/linux/brcm47xx/patches-2.6.34/014-MIPS-BCM47xx-Setup-and-register-serial-early.patch4
-rw-r--r--target/linux/brcm47xx/patches-2.6.34/015-MIPS-BCM47xx-Remove-CFE-console.patch2
-rw-r--r--target/linux/brcm47xx/patches-2.6.34/400-arch-bcm47xx.patch2
-rw-r--r--target/linux/brcm47xx/patches-2.6.35/011-MIPS-BCM47xx-Really-fix-128MB-RAM-problem.patch2
-rw-r--r--target/linux/brcm47xx/patches-2.6.35/012-MIPS-BCM47xx-Fill-more-values-into-ssb-sprom.patch25
-rw-r--r--target/linux/brcm47xx/patches-2.6.35/013-MIPS-BCM47xx-Activate-SSB_B43_PCI_BRIDGE-by-default.patch2
-rw-r--r--target/linux/brcm47xx/patches-2.6.35/014-MIPS-BCM47xx-Setup-and-register-serial-early.patch4
-rw-r--r--target/linux/brcm47xx/patches-2.6.35/015-MIPS-BCM47xx-Remove-CFE-console.patch2
-rw-r--r--target/linux/brcm47xx/patches-2.6.35/400-arch-bcm47xx.patch2
12 files changed, 40 insertions, 34 deletions
diff --git a/target/linux/brcm47xx/patches-2.6.34/011-MIPS-BCM47xx-Really-fix-128MB-RAM-problem.patch b/target/linux/brcm47xx/patches-2.6.34/011-MIPS-BCM47xx-Really-fix-128MB-RAM-problem.patch
index 0030a7da4..eab10b6d2 100644
--- a/target/linux/brcm47xx/patches-2.6.34/011-MIPS-BCM47xx-Really-fix-128MB-RAM-problem.patch
+++ b/target/linux/brcm47xx/patches-2.6.34/011-MIPS-BCM47xx-Really-fix-128MB-RAM-problem.patch
@@ -1,4 +1,4 @@
-From b6d850fe4035d6bee7199119358e06f802aa19ed Mon Sep 17 00:00:00 2001
+From cf731bb198bdaa4ce741536252ea99518887b721 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Sun, 18 Jul 2010 12:49:41 +0200
Subject: [PATCH 1/5] MIPS: BCM47xx: Really fix 128MB RAM problem
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));
diff --git a/target/linux/brcm47xx/patches-2.6.34/013-MIPS-BCM47xx-Activate-SSB_B43_PCI_BRIDGE-by-default.patch b/target/linux/brcm47xx/patches-2.6.34/013-MIPS-BCM47xx-Activate-SSB_B43_PCI_BRIDGE-by-default.patch
index 82b757580..3c4f82301 100644
--- a/target/linux/brcm47xx/patches-2.6.34/013-MIPS-BCM47xx-Activate-SSB_B43_PCI_BRIDGE-by-default.patch
+++ b/target/linux/brcm47xx/patches-2.6.34/013-MIPS-BCM47xx-Activate-SSB_B43_PCI_BRIDGE-by-default.patch
@@ -1,4 +1,4 @@
-From b1a0abc936bf61689d1e8a56c423b232cff24da5 Mon Sep 17 00:00:00 2001
+From 13f9cbc3c26be8071d33206dd931431e84e83068 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Sun, 18 Jul 2010 13:58:09 +0200
Subject: [PATCH 3/5] MIPS: BCM47xx: Activate SSB_B43_PCI_BRIDGE by default
diff --git a/target/linux/brcm47xx/patches-2.6.34/014-MIPS-BCM47xx-Setup-and-register-serial-early.patch b/target/linux/brcm47xx/patches-2.6.34/014-MIPS-BCM47xx-Setup-and-register-serial-early.patch
index cd35d1c36..1aed45c3c 100644
--- a/target/linux/brcm47xx/patches-2.6.34/014-MIPS-BCM47xx-Setup-and-register-serial-early.patch
+++ b/target/linux/brcm47xx/patches-2.6.34/014-MIPS-BCM47xx-Setup-and-register-serial-early.patch
@@ -1,4 +1,4 @@
-From 4c6a515310f29c89f25a54a115cde905f97330f8 Mon Sep 17 00:00:00 2001
+From 09ebc2952d9d3df6b9c548d9943dc8bcffb87540 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Sun, 18 Jul 2010 14:59:24 +0200
Subject: [PATCH 4/5] MIPS: BCM47xx: Setup and register serial early
@@ -33,7 +33,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
#include <asm/bootinfo.h>
#include <asm/reboot.h>
#include <asm/time.h>
-@@ -181,12 +183,44 @@ static int bcm47xx_get_invariants(struct
+@@ -184,12 +186,44 @@ static int bcm47xx_get_invariants(struct
void __init plat_mem_setup(void)
{
diff --git a/target/linux/brcm47xx/patches-2.6.34/015-MIPS-BCM47xx-Remove-CFE-console.patch b/target/linux/brcm47xx/patches-2.6.34/015-MIPS-BCM47xx-Remove-CFE-console.patch
index f87810151..f7e73a45a 100644
--- a/target/linux/brcm47xx/patches-2.6.34/015-MIPS-BCM47xx-Remove-CFE-console.patch
+++ b/target/linux/brcm47xx/patches-2.6.34/015-MIPS-BCM47xx-Remove-CFE-console.patch
@@ -1,4 +1,4 @@
-From 6bd2c73ed31a2dfe7eab04d32c17318a5c62f9d4 Mon Sep 17 00:00:00 2001
+From 4863132bcb6c87152ea474297329048cc8516ad2 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Sun, 18 Jul 2010 15:11:26 +0200
Subject: [PATCH 5/5] MIPS: BCM47xx: Remove CFE console
diff --git a/target/linux/brcm47xx/patches-2.6.34/400-arch-bcm47xx.patch b/target/linux/brcm47xx/patches-2.6.34/400-arch-bcm47xx.patch
index 2b812a3c8..accc0cb1e 100644
--- a/target/linux/brcm47xx/patches-2.6.34/400-arch-bcm47xx.patch
+++ b/target/linux/brcm47xx/patches-2.6.34/400-arch-bcm47xx.patch
@@ -33,7 +33,7 @@
+EXPORT_SYMBOL(nvram_get);
--- a/arch/mips/bcm47xx/setup.c
+++ b/arch/mips/bcm47xx/setup.c
-@@ -226,3 +226,20 @@ void __init plat_mem_setup(void)
+@@ -229,3 +229,20 @@ void __init plat_mem_setup(void)
_machine_halt = bcm47xx_machine_halt;
pm_power_off = bcm47xx_machine_halt;
}
diff --git a/target/linux/brcm47xx/patches-2.6.35/011-MIPS-BCM47xx-Really-fix-128MB-RAM-problem.patch b/target/linux/brcm47xx/patches-2.6.35/011-MIPS-BCM47xx-Really-fix-128MB-RAM-problem.patch
index 0030a7da4..eab10b6d2 100644
--- a/target/linux/brcm47xx/patches-2.6.35/011-MIPS-BCM47xx-Really-fix-128MB-RAM-problem.patch
+++ b/target/linux/brcm47xx/patches-2.6.35/011-MIPS-BCM47xx-Really-fix-128MB-RAM-problem.patch
@@ -1,4 +1,4 @@
-From b6d850fe4035d6bee7199119358e06f802aa19ed Mon Sep 17 00:00:00 2001
+From cf731bb198bdaa4ce741536252ea99518887b721 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Sun, 18 Jul 2010 12:49:41 +0200
Subject: [PATCH 1/5] MIPS: BCM47xx: Really fix 128MB RAM problem
diff --git a/target/linux/brcm47xx/patches-2.6.35/012-MIPS-BCM47xx-Fill-more-values-into-ssb-sprom.patch b/target/linux/brcm47xx/patches-2.6.35/012-MIPS-BCM47xx-Fill-more-values-into-ssb-sprom.patch
index e3df43b35..d3831d105 100644
--- a/target/linux/brcm47xx/patches-2.6.35/012-MIPS-BCM47xx-Fill-more-values-into-ssb-sprom.patch
+++ b/target/linux/brcm47xx/patches-2.6.35/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));
diff --git a/target/linux/brcm47xx/patches-2.6.35/013-MIPS-BCM47xx-Activate-SSB_B43_PCI_BRIDGE-by-default.patch b/target/linux/brcm47xx/patches-2.6.35/013-MIPS-BCM47xx-Activate-SSB_B43_PCI_BRIDGE-by-default.patch
index 82b757580..3c4f82301 100644
--- a/target/linux/brcm47xx/patches-2.6.35/013-MIPS-BCM47xx-Activate-SSB_B43_PCI_BRIDGE-by-default.patch
+++ b/target/linux/brcm47xx/patches-2.6.35/013-MIPS-BCM47xx-Activate-SSB_B43_PCI_BRIDGE-by-default.patch
@@ -1,4 +1,4 @@
-From b1a0abc936bf61689d1e8a56c423b232cff24da5 Mon Sep 17 00:00:00 2001
+From 13f9cbc3c26be8071d33206dd931431e84e83068 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Sun, 18 Jul 2010 13:58:09 +0200
Subject: [PATCH 3/5] MIPS: BCM47xx: Activate SSB_B43_PCI_BRIDGE by default
diff --git a/target/linux/brcm47xx/patches-2.6.35/014-MIPS-BCM47xx-Setup-and-register-serial-early.patch b/target/linux/brcm47xx/patches-2.6.35/014-MIPS-BCM47xx-Setup-and-register-serial-early.patch
index cd35d1c36..1aed45c3c 100644
--- a/target/linux/brcm47xx/patches-2.6.35/014-MIPS-BCM47xx-Setup-and-register-serial-early.patch
+++ b/target/linux/brcm47xx/patches-2.6.35/014-MIPS-BCM47xx-Setup-and-register-serial-early.patch
@@ -1,4 +1,4 @@
-From 4c6a515310f29c89f25a54a115cde905f97330f8 Mon Sep 17 00:00:00 2001
+From 09ebc2952d9d3df6b9c548d9943dc8bcffb87540 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Sun, 18 Jul 2010 14:59:24 +0200
Subject: [PATCH 4/5] MIPS: BCM47xx: Setup and register serial early
@@ -33,7 +33,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
#include <asm/bootinfo.h>
#include <asm/reboot.h>
#include <asm/time.h>
-@@ -181,12 +183,44 @@ static int bcm47xx_get_invariants(struct
+@@ -184,12 +186,44 @@ static int bcm47xx_get_invariants(struct
void __init plat_mem_setup(void)
{
diff --git a/target/linux/brcm47xx/patches-2.6.35/015-MIPS-BCM47xx-Remove-CFE-console.patch b/target/linux/brcm47xx/patches-2.6.35/015-MIPS-BCM47xx-Remove-CFE-console.patch
index f87810151..f7e73a45a 100644
--- a/target/linux/brcm47xx/patches-2.6.35/015-MIPS-BCM47xx-Remove-CFE-console.patch
+++ b/target/linux/brcm47xx/patches-2.6.35/015-MIPS-BCM47xx-Remove-CFE-console.patch
@@ -1,4 +1,4 @@
-From 6bd2c73ed31a2dfe7eab04d32c17318a5c62f9d4 Mon Sep 17 00:00:00 2001
+From 4863132bcb6c87152ea474297329048cc8516ad2 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Sun, 18 Jul 2010 15:11:26 +0200
Subject: [PATCH 5/5] MIPS: BCM47xx: Remove CFE console
diff --git a/target/linux/brcm47xx/patches-2.6.35/400-arch-bcm47xx.patch b/target/linux/brcm47xx/patches-2.6.35/400-arch-bcm47xx.patch
index 2b812a3c8..accc0cb1e 100644
--- a/target/linux/brcm47xx/patches-2.6.35/400-arch-bcm47xx.patch
+++ b/target/linux/brcm47xx/patches-2.6.35/400-arch-bcm47xx.patch
@@ -33,7 +33,7 @@
+EXPORT_SYMBOL(nvram_get);
--- a/arch/mips/bcm47xx/setup.c
+++ b/arch/mips/bcm47xx/setup.c
-@@ -226,3 +226,20 @@ void __init plat_mem_setup(void)
+@@ -229,3 +229,20 @@ void __init plat_mem_setup(void)
_machine_halt = bcm47xx_machine_halt;
pm_power_off = bcm47xx_machine_halt;
}