blob: db330e811025d36cf9a33a1b2a2c6d169d1a9e23 [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
Yoichi Yuasa5a860422007-10-02 23:13:17 +09007#define UART_BASE ((void __iomem *)CKSEG1ADDR(0x1c800000))
Peter Hortone87ddde2006-02-12 17:10:25 +00008
Yoichi Yuasa0a22e0d2007-03-02 12:42:33 +09009void prom_putchar(char c)
Peter Hortone87ddde2006-02-12 17:10:25 +000010{
Yoichi Yuasa5a860422007-10-02 23:13:17 +090011 while (!(readb(UART_BASE + UART_LSR) & UART_LSR_THRE))
Peter Hortone87ddde2006-02-12 17:10:25 +000012 ;
13
Yoichi Yuasa5a860422007-10-02 23:13:17 +090014 writeb(c, UART_BASE + UART_TX);
Peter Hortone87ddde2006-02-12 17:10:25 +000015}