diff options
author | Kanoj Sarcar <kanoj@engr.sgi.com> | 2000-08-23 17:23:40 +0000 |
---|---|---|
committer | Kanoj Sarcar <kanoj@engr.sgi.com> | 2000-08-23 17:23:40 +0000 |
commit | 5042d277f89869080b81ba1c0cc1a7944f981a8d (patch) | |
tree | 5bd1e1f710e6f118399d297195b3dd6a825b16d1 /arch/mips64 | |
parent | 5c47fbe66a3f22a661ed6ba337b1edad63057872 (diff) |
Make prom_printf() functional on IP27s. And prom_printf() is not an
init function, it needs to be around during regular system usage.
Diffstat (limited to 'arch/mips64')
-rw-r--r-- | arch/mips64/arc/console.c | 28 | ||||
-rw-r--r-- | arch/mips64/arc/printf.c | 2 |
2 files changed, 28 insertions, 2 deletions
diff --git a/arch/mips64/arc/console.c b/arch/mips64/arc/console.c index 0f087e912..a3cfb92d2 100644 --- a/arch/mips64/arc/console.c +++ b/arch/mips64/arc/console.c @@ -8,10 +8,34 @@ * * Copyright (C) 1996 David S. Miller (dm@sgi.com) */ +#include <linux/config.h> #include <linux/init.h> #include <asm/sgialib.h> -void __init prom_putchar(char c) +#ifdef CONFIG_SGI_IP27 + +#include <asm/sn/addrs.h> +#include <asm/sn/sn0/hub.h> +#include <asm/sn/klconfig.h> +#include <asm/ioc3.h> + +void prom_putchar(char c) +{ + struct ioc3 *ioc3; + struct ioc3_uartregs *uart; + nasid_t nid; + + nid = get_nasid(); + ioc3 = (struct ioc3 *) KL_CONFIG_CH_CONS_INFO(nid)->memory_base; + uart = &ioc3->sregs.uarta; + + while ((uart->iu_lsr & 0x20) == 0); + uart->iu_thr = c; +} + +#else /* CONFIG_SGI_IP27 */ + +void prom_putchar(char c) { ULONG cnt; CHAR it = c; @@ -19,6 +43,8 @@ void __init prom_putchar(char c) ArcWrite(1, &it, 1, &cnt); } +#endif /* CONFIG_SGI_IP27 */ + char __init prom_getchar(void) { ULONG cnt; diff --git a/arch/mips64/arc/printf.c b/arch/mips64/arc/printf.c index 2d175ebf8..664bb270b 100644 --- a/arch/mips64/arc/printf.c +++ b/arch/mips64/arc/printf.c @@ -15,7 +15,7 @@ static char ppbuf[1024]; -void __init prom_printf(char *fmt, ...) +void prom_printf(char *fmt, ...) { va_list args; char ch, *bptr; |