This source file includes following definitions.
- console_uart
- prom_putchar
1
2
3
4
5
6
7
8
9 #include <asm/page.h>
10 #include <asm/setup.h>
11 #include <asm/sn/addrs.h>
12 #include <asm/sn/sn0/hub.h>
13 #include <asm/sn/klconfig.h>
14 #include <asm/sn/ioc3.h>
15 #include <asm/sn/sn_private.h>
16
17 #include <linux/serial.h>
18 #include <linux/serial_core.h>
19
20 #define IOC3_CLK (22000000 / 3)
21 #define IOC3_FLAGS (0)
22
23 static inline struct ioc3_uartregs *console_uart(void)
24 {
25 struct ioc3 *ioc3;
26 nasid_t nasid;
27
28 nasid = (master_nasid == INVALID_NASID) ? get_nasid() : master_nasid;
29 ioc3 = (struct ioc3 *)KL_CONFIG_CH_CONS_INFO(nasid)->memory_base;
30
31 return &ioc3->sregs.uarta;
32 }
33
34 void prom_putchar(char c)
35 {
36 struct ioc3_uartregs *uart = console_uart();
37
38 while ((readb(&uart->iu_lsr) & 0x20) == 0)
39 ;
40 writeb(c, &uart->iu_thr);
41 }