brcm47xx: use tab instead of space
SVN-Revision: 21430
This commit is contained in:
parent
51f6c2ccf4
commit
c96049615c
4 changed files with 144 additions and 144 deletions
|
@ -41,18 +41,19 @@ Signed-off-by: Steve Brown <sbrown@cortland.com>
|
||||||
- ssb_write32(dev, 0x400, tmp);
|
- ssb_write32(dev, 0x400, tmp);
|
||||||
- tmp = ssb_read32(dev, 0x400);
|
- tmp = ssb_read32(dev, 0x400);
|
||||||
- printk("USB20H fcr: 0x%0x\n", tmp);
|
- printk("USB20H fcr: 0x%0x\n", tmp);
|
||||||
+ /* Work around for 5354 failures */
|
-
|
||||||
+ if ((dev->id.revision == 2) && (dev->bus->chip_id == 0x5354)) {
|
|
||||||
+ /* Change syn01 reg */
|
|
||||||
+ tmp = 0x00fe00fe;
|
|
||||||
+ ssb_write32(dev, 0x894, tmp);
|
|
||||||
|
|
||||||
- /* Change Shim control reg */
|
- /* Change Shim control reg */
|
||||||
- tmp = ssb_read32(dev, 0x304);
|
- tmp = ssb_read32(dev, 0x304);
|
||||||
- tmp &= ~0x100;
|
- tmp &= ~0x100;
|
||||||
- ssb_write32(dev, 0x304, tmp);
|
- ssb_write32(dev, 0x304, tmp);
|
||||||
- tmp = ssb_read32(dev, 0x304);
|
- tmp = ssb_read32(dev, 0x304);
|
||||||
- printk("USB20H shim: 0x%0x\n", tmp);
|
- printk("USB20H shim: 0x%0x\n", tmp);
|
||||||
|
+ /* Work around for 5354 failures */
|
||||||
|
+ if ((dev->id.revision == 2) && (dev->bus->chip_id == 0x5354)) {
|
||||||
|
+ /* Change syn01 reg */
|
||||||
|
+ tmp = 0x00fe00fe;
|
||||||
|
+ ssb_write32(dev, 0x894, tmp);
|
||||||
|
+
|
||||||
+ /* Change syn03 reg */
|
+ /* Change syn03 reg */
|
||||||
+ tmp = ssb_read32(dev, 0x89c);
|
+ tmp = ssb_read32(dev, 0x89c);
|
||||||
+ tmp |= 0x1;
|
+ tmp |= 0x1;
|
||||||
|
|
|
@ -119,15 +119,14 @@
|
||||||
{
|
{
|
||||||
int i = 0;
|
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,
|
-static int bcm47xx_get_invariants(struct ssb_bus *bus,
|
||||||
- struct ssb_init_invariants *iv)
|
- struct ssb_init_invariants *iv)
|
||||||
+static void bcm47xx_fill_sprom(struct ssb_sprom *sprom)
|
+static void bcm47xx_fill_sprom(struct ssb_sprom *sprom)
|
||||||
{
|
+{
|
||||||
char buf[100];
|
|
||||||
+ char *s;
|
+ char *s;
|
||||||
+
|
+
|
||||||
+ memset(sprom, 0xFF, sizeof(struct ssb_sprom));
|
+ 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)
|
+static int bcm47xx_get_invariants(struct ssb_bus *bus, struct ssb_init_invariants *iv)
|
||||||
+{
|
{
|
||||||
|
- char buf[100];
|
||||||
+ char *s;
|
+ char *s;
|
||||||
|
+
|
||||||
- /* Fill boardinfo structure */
|
|
||||||
- memset(&(iv->boardinfo), 0 , sizeof(struct ssb_boardinfo));
|
|
||||||
+ iv->boardinfo.vendor = SSB_BOARDVENDOR_BCM;
|
+ iv->boardinfo.vendor = SSB_BOARDVENDOR_BCM;
|
||||||
+ if ((s = nvram_get("boardtype")))
|
+ if ((s = nvram_get("boardtype")))
|
||||||
+ iv->boardinfo.type = (u16)simple_strtoul(s, NULL, 0);
|
+ iv->boardinfo.type = (u16)simple_strtoul(s, NULL, 0);
|
||||||
+ if ((s = nvram_get("boardrev")))
|
+ if ((s = nvram_get("boardrev")))
|
||||||
+ iv->boardinfo.rev = (u16)simple_strtoul(s, NULL, 0);
|
+ 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)
|
- if (cfe_getenv("boardvendor", buf, sizeof(buf)) >= 0)
|
||||||
- iv->boardinfo.type = (u16)simple_strtoul(buf, NULL, 0);
|
- iv->boardinfo.type = (u16)simple_strtoul(buf, NULL, 0);
|
||||||
- if (cfe_getenv("boardtype", buf, sizeof(buf)) >= 0)
|
- if (cfe_getenv("boardtype", buf, sizeof(buf)) >= 0)
|
||||||
|
@ -218,8 +220,6 @@
|
||||||
- iv->sprom.et0mdcport = simple_strtoul(buf, NULL, 10);
|
- iv->sprom.et0mdcport = simple_strtoul(buf, NULL, 10);
|
||||||
- if (cfe_getenv("et1mdcport", buf, sizeof(buf)) >= 0)
|
- if (cfe_getenv("et1mdcport", buf, sizeof(buf)) >= 0)
|
||||||
- iv->sprom.et1mdcport = simple_strtoul(buf, NULL, 10);
|
- iv->sprom.et1mdcport = simple_strtoul(buf, NULL, 10);
|
||||||
+ bcm47xx_fill_sprom(&iv->sprom);
|
|
||||||
+
|
|
||||||
+ if ((s = nvram_get("cardbus")))
|
+ if ((s = nvram_get("cardbus")))
|
||||||
+ iv->has_cardbus_slot = !!simple_strtoul(s, NULL, 10);
|
+ iv->has_cardbus_slot = !!simple_strtoul(s, NULL, 10);
|
||||||
|
|
||||||
|
@ -229,11 +229,6 @@
|
||||||
void __init plat_mem_setup(void)
|
void __init plat_mem_setup(void)
|
||||||
{
|
{
|
||||||
- int err;
|
- 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;
|
+ int i, err;
|
||||||
+ char *s;
|
+ char *s;
|
||||||
+ struct ssb_mipscore *mcore;
|
+ struct ssb_mipscore *mcore;
|
||||||
|
@ -245,7 +240,11 @@
|
||||||
+ panic(msg, err);
|
+ panic(msg, err);
|
||||||
+ }
|
+ }
|
||||||
+ mcore = &ssb_bcm47xx.mipscore;
|
+ 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");
|
+ s = nvram_get("kernel_args");
|
||||||
+ if (s && !strncmp(s, "console=ttyS1", 13)) {
|
+ if (s && !strncmp(s, "console=ttyS1", 13)) {
|
||||||
+ struct ssb_serial_port port;
|
+ struct ssb_serial_port port;
|
||||||
|
|
Loading…
Reference in a new issue