blob: d1ba701c9dd195fdcfaf9a2bea47f81703450260 [file] [log] [blame]
Peter Hortone87ddde2006-02-12 17:10:25 +00001/*
2 * (C) P. Horton 2006
3 */
Yoichi Yuasa5a860422007-10-02 23:13:17 +09004#include <linux/io.h>
Peter Hortone87ddde2006-02-12 17:10:25 +00005#include <linux/serial_reg.h>
Yoichi Yuasacc50b672007-03-06 21:34:44 +09006
Thomas Bogendoerferc43756d2008-01-12 00:25:17 +01007#include <cobalt.h>
8
Yoichi Yuasa5a860422007-10-02 23:13:17 +09009#define UART_BASE ((void __iomem *)CKSEG1ADDR(0x1c800000))
Peter Hortone87ddde2006-02-12 17:10:25 +000010
Yoichi Yuasa0a22e0d2007-03-02 12:42:33 +090011void prom_putchar(char c)
Peter Hortone87ddde2006-02-12 17:10:25 +000012{
Thomas Bogendoerferc43756d2008-01-12 00:25:17 +010013 if (cobalt_board_id <= COBALT_BRD_ID_QUBE1)
14 return;
15
Yoichi Yuasa5a860422007-10-02 23:13:17 +090016 while (!(readb(UART_BASE + UART_LSR) & UART_LSR_THRE))
Peter Hortone87ddde2006-02-12 17:10:25 +000017 ;
18
Yoichi Yuasa5a860422007-10-02 23:13:17 +090019 writeb(c, UART_BASE + UART_TX);
Peter Hortone87ddde2006-02-12 17:10:25 +000020}