aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/netlogic/common/earlycons.c
diff options
context:
space:
mode:
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 @@
38#include <asm/mipsregs.h> 38#include <asm/mipsregs.h>
39#include <asm/netlogic/haldefs.h> 39#include <asm/netlogic/haldefs.h>
40 40
41#if defined(CONFIG_CPU_XLP)
42#include <asm/netlogic/xlp-hal/iomap.h>
43#include <asm/netlogic/xlp-hal/uart.h>
44#elif defined(CONFIG_CPU_XLR)
41#include <asm/netlogic/xlr/iomap.h> 45#include <asm/netlogic/xlr/iomap.h>
46#endif
42 47
43void prom_putchar(char c) 48void prom_putchar(char c)
44{ 49{
45 uint64_t uartbase; 50 uint64_t uartbase;
46 51
52#if defined(CONFIG_CPU_XLP)
53 uartbase = nlm_get_uart_regbase(0, 0);
54#elif defined(CONFIG_CPU_XLR)
47 uartbase = nlm_mmio_base(NETLOGIC_IO_UART_0_OFFSET); 55 uartbase = nlm_mmio_base(NETLOGIC_IO_UART_0_OFFSET);
56#endif
48 while (nlm_read_reg(uartbase, UART_LSR) == 0) 57 while (nlm_read_reg(uartbase, UART_LSR) == 0)
49 ; 58 ;
50 nlm_write_reg(uartbase, UART_TX, c); 59 nlm_write_reg(uartbase, UART_TX, c);