aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-09-24 18:36:56 -0400
committerRalf Baechle <ralf@linux-mips.org>2014-01-22 14:18:54 -0500
commite1ccbb65499b8ba1d90ae2134d56888c95e504bd (patch)
tree66ee8a2f90c96d7ef5008d3d4108bbf0fc2cb8d6
parentcb881f5e154c5bdeb4a440adc0b475e117c5dfc1 (diff)
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> Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: John Crispin <blogic@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/5889/
-rw-r--r--arch/mips/Kconfig2
-rw-r--r--arch/mips/bcm47xx/prom.c9
2 files changed, 11 insertions, 0 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 27b62f405908..8f519a51585b 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -120,6 +120,8 @@ config BCM47XX
120 select NO_EXCEPT_FILL 120 select NO_EXCEPT_FILL
121 select SYS_SUPPORTS_32BIT_KERNEL 121 select SYS_SUPPORTS_32BIT_KERNEL
122 select SYS_SUPPORTS_LITTLE_ENDIAN 122 select SYS_SUPPORTS_LITTLE_ENDIAN
123 select SYS_HAS_EARLY_PRINTK
124 select EARLY_PRINTK_8250 if EARLY_PRINTK
123 help 125 help
124 Support for BCM47XX based boards 126 Support for BCM47XX based boards
125 127
diff --git a/arch/mips/bcm47xx/prom.c b/arch/mips/bcm47xx/prom.c
index 99c3ce2d5b98..0af808dfd1ca 100644
--- a/arch/mips/bcm47xx/prom.c
+++ b/arch/mips/bcm47xx/prom.c
@@ -28,6 +28,8 @@
28#include <linux/types.h> 28#include <linux/types.h>
29#include <linux/kernel.h> 29#include <linux/kernel.h>
30#include <linux/spinlock.h> 30#include <linux/spinlock.h>
31#include <linux/ssb/ssb_driver_chipcommon.h>
32#include <linux/ssb/ssb_regs.h>
31#include <linux/smp.h> 33#include <linux/smp.h>
32#include <asm/bootinfo.h> 34#include <asm/bootinfo.h>
33#include <bcm47xx.h> 35#include <bcm47xx.h>
@@ -94,9 +96,16 @@ static __init void prom_init_mem(void)
94 add_memory_region(0, mem, BOOT_MEM_RAM); 96 add_memory_region(0, mem, BOOT_MEM_RAM);
95} 97}
96 98
99/*
100 * This is the first serial on the chip common core, it is at this position
101 * for sb (ssb) and ai (bcma) bus.
102 */
103#define BCM47XX_SERIAL_ADDR (SSB_ENUM_BASE + SSB_CHIPCO_UART0_DATA)
104
97void __init prom_init(void) 105void __init prom_init(void)
98{ 106{
99 prom_init_mem(); 107 prom_init_mem();
108 setup_8250_early_printk_port(CKSEG1ADDR(BCM47XX_SERIAL_ADDR), 0, 0);
100} 109}
101 110
102void __init prom_free_prom_memory(void) 111void __init prom_free_prom_memory(void)