Peter Horton | e87ddde | 2006-02-12 17:10:25 +0000 | [diff] [blame] | 1 | /* |
2 | * (C) P. Horton 2006 | ||||
3 | */ | ||||
Yoichi Yuasa | 5a86042 | 2007-10-02 23:13:17 +0900 | [diff] [blame^] | 4 | #include <linux/io.h> |
Peter Horton | e87ddde | 2006-02-12 17:10:25 +0000 | [diff] [blame] | 5 | #include <linux/serial_reg.h> |
Yoichi Yuasa | cc50b67 | 2007-03-06 21:34:44 +0900 | [diff] [blame] | 6 | |
Yoichi Yuasa | 5a86042 | 2007-10-02 23:13:17 +0900 | [diff] [blame^] | 7 | #define UART_BASE ((void __iomem *)CKSEG1ADDR(0x1c800000)) |
Peter Horton | e87ddde | 2006-02-12 17:10:25 +0000 | [diff] [blame] | 8 | |
Yoichi Yuasa | 0a22e0d | 2007-03-02 12:42:33 +0900 | [diff] [blame] | 9 | void prom_putchar(char c) |
Peter Horton | e87ddde | 2006-02-12 17:10:25 +0000 | [diff] [blame] | 10 | { |
Yoichi Yuasa | 5a86042 | 2007-10-02 23:13:17 +0900 | [diff] [blame^] | 11 | while (!(readb(UART_BASE + UART_LSR) & UART_LSR_THRE)) |
Peter Horton | e87ddde | 2006-02-12 17:10:25 +0000 | [diff] [blame] | 12 | ; |
13 | |||||
Yoichi Yuasa | 5a86042 | 2007-10-02 23:13:17 +0900 | [diff] [blame^] | 14 | writeb(c, UART_BASE + UART_TX); |
Peter Horton | e87ddde | 2006-02-12 17:10:25 +0000 | [diff] [blame] | 15 | } |