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 * Copyright (C) 2001, 2002 Ralf Baechle
8 #include <linux/init.h>
9 #include <linux/console.h>
10 #include <linux/kdev_t.h>
11 #include <linux/major.h>
12 #include <linux/termios.h>
13 #include <linux/sched.h>
14 #include <linux/tty.h>
17 #include <asm/semaphore.h>
18 #include <asm/sn/addrs.h>
19 #include <asm/sn/sn0/hub.h>
20 #include <asm/sn/klconfig.h>
21 #include <asm/sn/ioc3.h>
22 #include <asm/sn/sn_private.h>
24 #include <linux/serial.h>
25 #include <linux/serial_core.h>
27 #define IOC3_CLK (22000000 / 3)
28 #define IOC3_FLAGS (0)
30 static inline struct ioc3_uartregs
*console_uart(void)
35 nasid
= (master_nasid
== INVALID_NASID
) ? get_nasid() : master_nasid
;
36 ioc3
= (struct ioc3
*)KL_CONFIG_CH_CONS_INFO(nasid
)->memory_base
;
38 return &ioc3
->sregs
.uarta
;
41 void prom_putchar(char c
)
43 struct ioc3_uartregs
*uart
= console_uart();
45 while ((uart
->iu_lsr
& 0x20) == 0);
49 char __init
prom_getchar(void)
54 static void inline ioc3_console_probe(void)
59 * Register to interrupt zero because we share the interrupt with
60 * the serial driver which we don't properly support yet.
62 memset(&up
, 0, sizeof(up
));
63 up
.membase
= (unsigned char *) console_uart();
65 up
.uartclk
= IOC3_CLK
;
68 up
.flags
= IOC3_FLAGS
;
71 if (early_serial_setup(&up
))
72 printk(KERN_ERR
"Early serial init of port 0 failed\n");
75 __init
void ip27_setup_console(void)
This page took 0.032207 seconds and 6 git commands to generate.