2006-02-12 18:10:25 +01:00
|
|
|
/*
|
|
|
|
* (C) P. Horton 2006
|
|
|
|
*/
|
2007-10-02 16:13:17 +02:00
|
|
|
#include <linux/io.h>
|
2006-02-12 18:10:25 +01:00
|
|
|
#include <linux/serial_reg.h>
|
2007-03-06 13:34:44 +01:00
|
|
|
|
2008-01-12 00:25:17 +01:00
|
|
|
#include <cobalt.h>
|
|
|
|
|
2007-10-02 16:13:17 +02:00
|
|
|
#define UART_BASE ((void __iomem *)CKSEG1ADDR(0x1c800000))
|
2006-02-12 18:10:25 +01:00
|
|
|
|
2007-03-02 04:42:33 +01:00
|
|
|
void prom_putchar(char c)
|
2006-02-12 18:10:25 +01:00
|
|
|
{
|
2008-01-12 00:25:17 +01:00
|
|
|
if (cobalt_board_id <= COBALT_BRD_ID_QUBE1)
|
|
|
|
return;
|
|
|
|
|
2007-10-02 16:13:17 +02:00
|
|
|
while (!(readb(UART_BASE + UART_LSR) & UART_LSR_THRE))
|
2006-02-12 18:10:25 +01:00
|
|
|
;
|
|
|
|
|
2007-10-02 16:13:17 +02:00
|
|
|
writeb(c, UART_BASE + UART_TX);
|
2006-02-12 18:10:25 +01:00
|
|
|
}
|