|
|
|
@ -119,15 +119,14 @@ |
|
|
|
|
{
|
|
|
|
|
int i = 0;
|
|
|
|
|
|
|
|
|
|
@@ -73,51 +83,143 @@ static void str2eaddr(char *str, char *d
|
|
|
|
|
@@ -73,51 +83,142 @@ static void str2eaddr(char *str, char *d
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-static int bcm47xx_get_invariants(struct ssb_bus *bus,
|
|
|
|
|
- struct ssb_init_invariants *iv)
|
|
|
|
|
+static void bcm47xx_fill_sprom(struct ssb_sprom *sprom)
|
|
|
|
|
{
|
|
|
|
|
char buf[100];
|
|
|
|
|
+{
|
|
|
|
|
+ char *s;
|
|
|
|
|
+
|
|
|
|
|
+ memset(sprom, 0xFF, sizeof(struct ssb_sprom));
|
|
|
|
@ -184,17 +183,20 @@ |
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+static int bcm47xx_get_invariants(struct ssb_bus *bus, struct ssb_init_invariants *iv)
|
|
|
|
|
+{
|
|
|
|
|
{
|
|
|
|
|
- char buf[100];
|
|
|
|
|
+ char *s;
|
|
|
|
|
|
|
|
|
|
- /* Fill boardinfo structure */
|
|
|
|
|
- memset(&(iv->boardinfo), 0 , sizeof(struct ssb_boardinfo));
|
|
|
|
|
+
|
|
|
|
|
+ iv->boardinfo.vendor = SSB_BOARDVENDOR_BCM;
|
|
|
|
|
+ if ((s = nvram_get("boardtype")))
|
|
|
|
|
+ iv->boardinfo.type = (u16)simple_strtoul(s, NULL, 0);
|
|
|
|
|
+ if ((s = nvram_get("boardrev")))
|
|
|
|
|
+ iv->boardinfo.rev = (u16)simple_strtoul(s, NULL, 0);
|
|
|
|
|
|
|
|
|
|
- /* Fill boardinfo structure */
|
|
|
|
|
- memset(&(iv->boardinfo), 0 , sizeof(struct ssb_boardinfo));
|
|
|
|
|
+ bcm47xx_fill_sprom(&iv->sprom);
|
|
|
|
|
|
|
|
|
|
- if (cfe_getenv("boardvendor", buf, sizeof(buf)) >= 0)
|
|
|
|
|
- iv->boardinfo.type = (u16)simple_strtoul(buf, NULL, 0);
|
|
|
|
|
- if (cfe_getenv("boardtype", buf, sizeof(buf)) >= 0)
|
|
|
|
@ -218,8 +220,6 @@ |
|
|
|
|
- iv->sprom.et0mdcport = simple_strtoul(buf, NULL, 10);
|
|
|
|
|
- if (cfe_getenv("et1mdcport", buf, sizeof(buf)) >= 0)
|
|
|
|
|
- iv->sprom.et1mdcport = simple_strtoul(buf, NULL, 10);
|
|
|
|
|
+ bcm47xx_fill_sprom(&iv->sprom);
|
|
|
|
|
+
|
|
|
|
|
+ if ((s = nvram_get("cardbus")))
|
|
|
|
|
+ iv->has_cardbus_slot = !!simple_strtoul(s, NULL, 10);
|
|
|
|
|
|
|
|
|
@ -229,11 +229,6 @@ |
|
|
|
|
void __init plat_mem_setup(void)
|
|
|
|
|
{
|
|
|
|
|
- int err;
|
|
|
|
|
-
|
|
|
|
|
- err = ssb_bus_ssbbus_register(&ssb_bcm47xx, SSB_ENUM_BASE,
|
|
|
|
|
- bcm47xx_get_invariants);
|
|
|
|
|
- if (err)
|
|
|
|
|
- panic("Failed to initialize SSB bus (err %d)\n", err);
|
|
|
|
|
+ int i, err;
|
|
|
|
|
+ char *s;
|
|
|
|
|
+ struct ssb_mipscore *mcore;
|
|
|
|
@ -245,7 +240,11 @@ |
|
|
|
|
+ panic(msg, err);
|
|
|
|
|
+ }
|
|
|
|
|
+ mcore = &ssb_bcm47xx.mipscore;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
- err = ssb_bus_ssbbus_register(&ssb_bcm47xx, SSB_ENUM_BASE,
|
|
|
|
|
- bcm47xx_get_invariants);
|
|
|
|
|
- if (err)
|
|
|
|
|
- panic("Failed to initialize SSB bus (err %d)\n", err);
|
|
|
|
|
+ s = nvram_get("kernel_args");
|
|
|
|
|
+ if (s && !strncmp(s, "console=ttyS1", 13)) {
|
|
|
|
|
+ struct ssb_serial_port port;
|
|
|
|
|