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 | |
Thomas Bogendoerfer | c43756d | 2008-01-12 00:25:17 +0100 | [diff] [blame] | 7 | #include <cobalt.h> |
8 | |||||
Yoichi Yuasa | 5a86042 | 2007-10-02 23:13:17 +0900 | [diff] [blame] | 9 | #define UART_BASE ((void __iomem *)CKSEG1ADDR(0x1c800000)) |
Peter Horton | e87ddde | 2006-02-12 17:10:25 +0000 | [diff] [blame] | 10 | |
Yoichi Yuasa | 0a22e0d | 2007-03-02 12:42:33 +0900 | [diff] [blame] | 11 | void prom_putchar(char c) |
Peter Horton | e87ddde | 2006-02-12 17:10:25 +0000 | [diff] [blame] | 12 | { |
Thomas Bogendoerfer | c43756d | 2008-01-12 00:25:17 +0100 | [diff] [blame] | 13 | if (cobalt_board_id <= COBALT_BRD_ID_QUBE1) |
14 | return; | ||||
15 | |||||
Yoichi Yuasa | 5a86042 | 2007-10-02 23:13:17 +0900 | [diff] [blame] | 16 | while (!(readb(UART_BASE + UART_LSR) & UART_LSR_THRE)) |
Peter Horton | e87ddde | 2006-02-12 17:10:25 +0000 | [diff] [blame] | 17 | ; |
18 | |||||
Yoichi Yuasa | 5a86042 | 2007-10-02 23:13:17 +0900 | [diff] [blame] | 19 | writeb(c, UART_BASE + UART_TX); |
Peter Horton | e87ddde | 2006-02-12 17:10:25 +0000 | [diff] [blame] | 20 | } |