summaryrefslogtreecommitdiffstats
path: root/arch/mips/netlogic/common/earlycons.c
diff options
context:
space:
mode:
authorJayachandran C <jayachandranc@netlogicmicro.com>2011-11-16 01:21:28 +0100
committerRalf Baechle <ralf@linux-mips.org>2011-12-07 23:04:56 +0100
commit65040e224e5b214a93fa0c790add5d69b054ecae (patch)
tree3d6b02575e61c04ad48535662398eae195f26ee1 /arch/mips/netlogic/common/earlycons.c
parentMIPS: Netlogic: XLP CPU support. (diff)
downloadlinux-65040e224e5b214a93fa0c790add5d69b054ecae.tar.xz
linux-65040e224e5b214a93fa0c790add5d69b054ecae.zip
MIPS: Netlogic: Add XLP platform files for XLP SoC
- Update common files to support XLP. - Add arch/mips/include/asm/netlogic/xlp-hal for register definitions and access macros - Add arch/mips/netlogic/xlp/ for XLP specific files. Signed-off-by: Jayachandran C <jayachandranc@netlogicmicro.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/2967/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/netlogic/common/earlycons.c')
-rw-r--r--arch/mips/netlogic/common/earlycons.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/mips/netlogic/common/earlycons.c b/arch/mips/netlogic/common/earlycons.c
index 28c8fa7a8503..f193f7b3bd81 100644
--- a/arch/mips/netlogic/common/earlycons.c
+++ b/arch/mips/netlogic/common/earlycons.c
@@ -38,13 +38,22 @@
#include <asm/mipsregs.h>
#include <asm/netlogic/haldefs.h>
+#if defined(CONFIG_CPU_XLP)
+#include <asm/netlogic/xlp-hal/iomap.h>
+#include <asm/netlogic/xlp-hal/uart.h>
+#elif defined(CONFIG_CPU_XLR)
#include <asm/netlogic/xlr/iomap.h>
+#endif
void prom_putchar(char c)
{
uint64_t uartbase;
+#if defined(CONFIG_CPU_XLP)
+ uartbase = nlm_get_uart_regbase(0, 0);
+#elif defined(CONFIG_CPU_XLR)
uartbase = nlm_mmio_base(NETLOGIC_IO_UART_0_OFFSET);
+#endif
while (nlm_read_reg(uartbase, UART_LSR) == 0)
;
nlm_write_reg(uartbase, UART_TX, c);