aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/patches-3.10/082-MIPS-BCM47XX-add-EARLY_PRINTK_8250-support.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2013-10-06 23:55:35 +0000
committerHauke Mehrtens <hauke@openwrt.org>2013-10-06 23:55:35 +0000
commite4c5404c56a497c113c0bb4344a34349055db1bd (patch)
tree1ea4d49631253f3a332f7e09a4031d45c1c14fee /target/linux/brcm47xx/patches-3.10/082-MIPS-BCM47XX-add-EARLY_PRINTK_8250-support.patch
parentcd2b261f51e3181ccd63899e26cdb0a91002fc75 (diff)
downloadmaster-187ad058-e4c5404c56a497c113c0bb4344a34349055db1bd.tar.gz
master-187ad058-e4c5404c56a497c113c0bb4344a34349055db1bd.tar.bz2
master-187ad058-e4c5404c56a497c113c0bb4344a34349055db1bd.zip
brcm47xx: update early printk patches
Early printk was disabled because it caused hangs on some devices, the old patches were using the CFE console now we use the normal serial console, it is at a constant address. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38309 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx/patches-3.10/082-MIPS-BCM47XX-add-EARLY_PRINTK_8250-support.patch')
-rw-r--r--target/linux/brcm47xx/patches-3.10/082-MIPS-BCM47XX-add-EARLY_PRINTK_8250-support.patch53
1 files changed, 53 insertions, 0 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
new file mode 100644
index 0000000000..744e35985e
--- /dev/null
+++ b/target/linux/brcm47xx/patches-3.10/082-MIPS-BCM47XX-add-EARLY_PRINTK_8250-support.patch
@@ -0,0 +1,53 @@
+commit 22250a38f970c173acb1b3fb30e6dce1430f697b
+Author: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Thu Sep 19 22:48:35 2013 +0200
+
+ MIPS: BCM47XX: add EARLY_PRINTK_8250 support
+
+ The BCM47xx SoCs have a 8250 serial compatible console at address
+ 0x18000300 and an other at 0x18000400. On most devices 0x18000300 is
+ wired to some pins on the board, we should use that.
+ This is the smae for the AI (bcma) and the SB (ssb) bus, this is some
+ offset on the chip common core.
+
+ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+
+--- a/arch/mips/Kconfig
++++ b/arch/mips/Kconfig
+@@ -117,6 +117,8 @@ config BCM47XX
+ select NO_EXCEPT_FILL
+ select SYS_SUPPORTS_32BIT_KERNEL
+ select SYS_SUPPORTS_LITTLE_ENDIAN
++ select SYS_HAS_EARLY_PRINTK
++ select EARLY_PRINTK_8250 if EARLY_PRINTK
+ help
+ Support for BCM47XX based boards
+
+--- a/arch/mips/bcm47xx/prom.c
++++ b/arch/mips/bcm47xx/prom.c
+@@ -28,6 +28,8 @@
+ #include <linux/types.h>
+ #include <linux/kernel.h>
+ #include <linux/spinlock.h>
++#include <linux/ssb/ssb_driver_chipcommon.h>
++#include <linux/ssb/ssb_regs.h>
+ #include <linux/smp.h>
+ #include <asm/bootinfo.h>
+ #include <bcm47xx.h>
+@@ -94,9 +96,16 @@ static __init void prom_init_mem(void)
+ add_memory_region(0, mem, BOOT_MEM_RAM);
+ }
+
++/*
++ * This is the first serial on the chip common core, it is at this position
++ * for sb (ssb) and ai (bcma) bus.
++ */
++#define BCM47XX_SERIAL_ADDR (SSB_ENUM_BASE + SSB_CHIPCO_UART0_DATA)
++
+ void __init prom_init(void)
+ {
+ prom_init_mem();
++ setup_8250_early_printk_port(CKSEG1ADDR(BCM47XX_SERIAL_ADDR), 0, 0);
+ }
+
+ void __init prom_free_prom_memory(void)