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, 2004 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>
16 #include <linux/serial.h>
17 #include <linux/serial_core.h>
18 #include <asm/serial.h>
20 /* SUPERIO uart register map */
24 volatile u8 rbr
; /* read only, DLAB == 0 */
26 volatile u8 thr
; /* write only, DLAB == 0 */
28 volatile u8 dll
; /* DLAB == 1 */
32 volatile u8 ier
; /* DLAB == 0 */
34 volatile u8 dlm
; /* DLAB == 1 */
38 volatile u8 iir
; /* read only */
40 volatile u8 fcr
; /* write only */
62 extern unsigned long uart_base
;
64 static inline struct ja_uartregs
*console_uart(void)
66 return (struct ja_uartregs
*) (uart_base
+ 0x23UL
);
69 void prom_putchar(char c
)
71 struct ja_uartregs
*uart
= console_uart();
73 while ((uart
->iu_lsr
& 0x20) == 0);
77 char __init
prom_getchar(void)
82 static void inline ja_console_probe(void)
87 * Register to interrupt zero because we share the interrupt with
88 * the serial driver which we don't properly support yet.
90 memset(&up
, 0, sizeof(up
));
91 up
.membase
= (unsigned char *) uart_base
+ 0x23UL
;
92 up
.irq
= JAGUAR_ATX_SERIAL1_IRQ
;
93 up
.uartclk
= JAGUAR_ATX_UART_CLK
;
96 up
.flags
= ASYNC_BOOT_AUTOCONF
| ASYNC_SKIP_TEST
;
99 if (early_serial_setup(&up
))
100 printk(KERN_ERR
"Early serial init of port 0 failed\n");
103 __init
void ja_setup_console(void)