diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2010-12-05 19:19:50 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2010-12-05 19:19:50 +0000 |
commit | 852f7b37ed345e32db50a7fc82e72929a0e13fdc (patch) | |
tree | 37b86bee93b62b1ec74b3a93860185a7908cb32c /target/linux/brcm47xx/patches-2.6.36/014-MIPS-BCM47xx-Setup-and-register-serial-early.patch | |
parent | 7b1ae48645f9b2762137448d76e10fb0d00bdeab (diff) | |
download | upstream-852f7b37ed345e32db50a7fc82e72929a0e13fdc.tar.gz upstream-852f7b37ed345e32db50a7fc82e72929a0e13fdc.tar.bz2 upstream-852f7b37ed345e32db50a7fc82e72929a0e13fdc.zip |
brcm47xx: backport patch from kernel 2.6.37
Backport patches from r24162
brcm47xx: reorder patches like they were commitet upstream
SVN-Revision: 24266
Diffstat (limited to 'target/linux/brcm47xx/patches-2.6.36/014-MIPS-BCM47xx-Setup-and-register-serial-early.patch')
-rw-r--r-- | target/linux/brcm47xx/patches-2.6.36/014-MIPS-BCM47xx-Setup-and-register-serial-early.patch | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/target/linux/brcm47xx/patches-2.6.36/014-MIPS-BCM47xx-Setup-and-register-serial-early.patch b/target/linux/brcm47xx/patches-2.6.36/014-MIPS-BCM47xx-Setup-and-register-serial-early.patch index 0d241e656b..de1e8d12de 100644 --- a/target/linux/brcm47xx/patches-2.6.36/014-MIPS-BCM47xx-Setup-and-register-serial-early.patch +++ b/target/linux/brcm47xx/patches-2.6.36/014-MIPS-BCM47xx-Setup-and-register-serial-early.patch @@ -24,35 +24,19 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> #include <asm/bootinfo.h> #include <asm/reboot.h> #include <asm/time.h> -@@ -190,12 +192,47 @@ static int bcm47xx_get_invariants(struct +@@ -168,7 +170,7 @@ static int bcm47xx_get_invariants(struct void __init plat_mem_setup(void) { - int err; + int i, err; -+ char buf[100]; -+ struct ssb_mipscore *mcore; + char buf[100]; + struct ssb_mipscore *mcore; + +@@ -191,6 +193,24 @@ void __init plat_mem_setup(void) + } + } - 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); -+ mcore = &ssb_bcm47xx.mipscore; -+ -+ if (nvram_getenv("kernel_args", buf, sizeof(buf)) >= 0 || -+ cfe_getenv("kernel_args", buf, sizeof(buf)) >= 0) { -+ if (strstr(buf, "console=ttyS1")) { -+ struct ssb_serial_port port; -+ -+ printk(KERN_DEBUG "Swapping serial ports!\n"); -+ /* swap serial ports */ -+ memcpy(&port, &mcore->serial_ports[0], sizeof(port)); -+ memcpy(&mcore->serial_ports[0], &mcore->serial_ports[1], -+ sizeof(port)); -+ memcpy(&mcore->serial_ports[1], &port, sizeof(port)); -+ } -+ } -+ + for (i = 0; i < mcore->nr_serial_ports; i++) { + struct ssb_serial_port *port = &(mcore->serial_ports[i]); + struct uart_port s; @@ -70,6 +54,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> + early_serial_setup(&s); + } + printk(KERN_DEBUG "Serial init done.\n"); - ++ _machine_restart = bcm47xx_machine_restart; _machine_halt = bcm47xx_machine_halt; + pm_power_off = bcm47xx_machine_halt; |