brcm47xx: write boardflags correct into sprom

SVN-Revision: 22298
owl
Hauke Mehrtens 2010-07-19 21:45:29 +00:00
parent 3f25930247
commit c811398d00
12 changed files with 40 additions and 34 deletions

View File

@ -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

View File

@ -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));

View File

@ -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

View File

@ -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)
{

View File

@ -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

View File

@ -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;
}

View File

@ -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

View File

@ -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));

View File

@ -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

View File

@ -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)
{

View File

@ -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

View File

@ -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;
}