mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
rk: uncompress.h: add debug_uart.h and support timeout on putc
This commit is contained in:
@@ -3,13 +3,15 @@
|
||||
|
||||
#include <linux/serial_reg.h>
|
||||
#include <mach/io.h>
|
||||
#include <mach/debug_uart.h>
|
||||
|
||||
#ifdef DEBUG_UART_PHYS
|
||||
static volatile u32 *UART = (u32 *)DEBUG_UART_PHYS;
|
||||
|
||||
static void putc(int c)
|
||||
{
|
||||
while (!(UART[UART_LSR] & UART_LSR_THRE))
|
||||
int i = 1000;
|
||||
while (i-- && !(UART[UART_LSR] & UART_LSR_THRE))
|
||||
barrier();
|
||||
UART[UART_TX] = c;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user