aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-11-13 18:38:18 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2013-11-13 18:38:18 +0000
commit4abd860ab2a37732778f06fdc56da45598005b14 (patch)
tree1879dd211959dadb01aae75835eaa12006eb2621 /target/linux/brcm47xx
parent0cdab0237da84284054f63897e8e094d47f13bf1 (diff)
downloadupstream-4abd860ab2a37732778f06fdc56da45598005b14.tar.gz
upstream-4abd860ab2a37732778f06fdc56da45598005b14.tar.bz2
upstream-4abd860ab2a37732778f06fdc56da45598005b14.zip
brcm47xx: swap also early boot console if necessary.
Some devices are using tty1 as the default console, also swap the early boot console in such case. This is needed for the WGT634U. Thank you Russell for reporting this. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 38794
Diffstat (limited to 'target/linux/brcm47xx')
-rw-r--r--target/linux/brcm47xx/patches-3.10/082-MIPS-BCM47XX-add-EARLY_PRINTK_8250-support.patch47
-rw-r--r--target/linux/brcm47xx/patches-3.10/830-huawei_e970_support.patch4
2 files changed, 49 insertions, 2 deletions
diff --git a/target/linux/brcm47xx/patches-3.10/082-MIPS-BCM47XX-add-EARLY_PRINTK_8250-support.patch b/target/linux/brcm47xx/patches-3.10/082-MIPS-BCM47XX-add-EARLY_PRINTK_8250-support.patch
index 744e35985e..42f5917ed3 100644
--- a/target/linux/brcm47xx/patches-3.10/082-MIPS-BCM47XX-add-EARLY_PRINTK_8250-support.patch
+++ b/target/linux/brcm47xx/patches-3.10/082-MIPS-BCM47XX-add-EARLY_PRINTK_8250-support.patch
@@ -51,3 +51,50 @@ Date: Thu Sep 19 22:48:35 2013 +0200
}
void __init prom_free_prom_memory(void)
+--- a/arch/mips/bcm47xx/setup.c
++++ b/arch/mips/bcm47xx/setup.c
+@@ -123,6 +123,28 @@ static int bcm47xx_get_invariants(struct
+ return 0;
+ }
+
++/*
++ * This is the second serial on the chip common core, it is at this position
++ * for sb (ssb) and ai (bcma) bus.
++ */
++#define BCM47XX_SERIAL1_ADDR (SSB_ENUM_BASE + SSB_CHIPCO_UART1_DATA)
++
++static void __init bcm47xx_swap_serial_ssb(struct ssb_mipscore *mcore)
++{
++ struct ssb_serial_port port;
++
++ printk(KERN_INFO "Swapping serial ports\n");
++
++ setup_8250_early_printk_port(CKSEG1ADDR(BCM47XX_SERIAL1_ADDR), 0, 0);
++
++ /* 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));
++
++ printk(KERN_INFO "Serial port were Swapped\n");
++}
++
+ static void __init bcm47xx_register_ssb(void)
+ {
+ int err;
+@@ -142,14 +164,7 @@ static void __init bcm47xx_register_ssb(
+ mcore = &bcm47xx_bus.ssb.mipscore;
+ if (bcm47xx_nvram_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));
++ bcm47xx_swap_serial_ssb(mcore);
+ }
+ }
+ }
diff --git a/target/linux/brcm47xx/patches-3.10/830-huawei_e970_support.patch b/target/linux/brcm47xx/patches-3.10/830-huawei_e970_support.patch
index 333b9e6c5b..2ff649dde5 100644
--- a/target/linux/brcm47xx/patches-3.10/830-huawei_e970_support.patch
+++ b/target/linux/brcm47xx/patches-3.10/830-huawei_e970_support.patch
@@ -8,7 +8,7 @@
#include <asm/bootinfo.h>
#include <asm/prom.h>
#include <asm/reboot.h>
-@@ -229,6 +230,33 @@ void __init plat_mem_setup(void)
+@@ -244,6 +245,33 @@ void __init plat_mem_setup(void)
mips_set_machine_name(bcm47xx_board_get_name());
}
@@ -42,7 +42,7 @@
static int __init bcm47xx_register_bus_complete(void)
{
switch (bcm47xx_bus_type) {
-@@ -243,6 +271,8 @@ static int __init bcm47xx_register_bus_c
+@@ -258,6 +286,8 @@ static int __init bcm47xx_register_bus_c
break;
#endif
}