blk: rq_data_dir() should not return a boolean
[cris-mirror.git] / arch / mips / sgi-ip27 / ip27-console.c
blob45fdfbcbd4c612149353db396eb648860df0a5ef
1 /*
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
4 * for more details.
6 * Copyright (C) 2001, 2002 Ralf Baechle
7 */
9 #include <asm/page.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/sn/sn_private.h>
16 #include <linux/serial.h>
17 #include <linux/serial_core.h>
19 #define IOC3_CLK (22000000 / 3)
20 #define IOC3_FLAGS (0)
22 static inline struct ioc3_uartregs *console_uart(void)
24 struct ioc3 *ioc3;
25 nasid_t nasid;
27 nasid = (master_nasid == INVALID_NASID) ? get_nasid() : master_nasid;
28 ioc3 = (struct ioc3 *)KL_CONFIG_CH_CONS_INFO(nasid)->memory_base;
30 return &ioc3->sregs.uarta;
33 void prom_putchar(char c)
35 struct ioc3_uartregs *uart = console_uart();
37 while ((uart->iu_lsr & 0x20) == 0);
38 uart->iu_thr = c;