2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 #include <linux/init.h>
7 #include <linux/console.h>
8 #include <linux/kdev_t.h>
9 #include <linux/major.h>
10 #include <asm/sn/addrs.h>
11 #include <asm/sn/sn0/hub.h>
12 #include <asm/sn/klconfig.h>
13 #include <asm/sn/ioc3.h>
14 #include <asm/sgialib.h>
15 #include <asm/sn/sn_private.h>
17 void prom_putchar(char c
)
20 struct ioc3_uartregs
*uart
;
22 ioc3
= (struct ioc3
*)KL_CONFIG_CH_CONS_INFO(master_nasid
)->memory_base
;
23 uart
= &ioc3
->sregs
.uarta
;
25 while ((uart
->iu_lsr
& 0x20) == 0);
29 char __init
prom_getchar(void)
35 ip27prom_console_write(struct console
*con
, const char *s
, unsigned n
)
41 ip27prom_console_dev(struct console
*c
)
43 return MKDEV(TTY_MAJOR
, 64 + c
->index
);
46 static struct console ip27_prom_console
= {
48 write
: ip27prom_console_write
,
49 device
: ip27prom_console_dev
,
50 flags
: CON_PRINTBUFFER
,
54 __init
void ip27_setup_console(void)
56 register_console(&ip27_prom_console
);