blob: f12176ba9e03e7674342506e08368d66faed5e32 [file] [log] [blame]
#ifndef __MACH_DEBUG_LL_H__
#define __MACH_DEBUG_LL_H__
#include <mach/serial.h>
#include <mach/comcerto-2000.h>
#include <asm/io.h>
static inline void __putc(char c)
{
/* Wait until there is space in the FIFO */
while ((readl(UART_BASEADDR + UART_LSR) & LSR_THRE) == 0);
/* Send the character */
writel(c, UART_BASEADDR + UART_THR);
/* Wait to make sure it hits the line, in case we die too soon. */
while ((readl(UART_BASEADDR + UART_LSR) & LSR_THRE) == 0);
}
static inline void putc(char c) {
if (c == '\n') {
__putc('\r');
}
__putc(c);
}
#endif