mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 12:57:06 +09:00
rk29: serial is based on the 16550 industry standard
This commit is contained in:
@@ -30,16 +30,5 @@
|
||||
ldrne \rx, = RK29_UART1_BASE
|
||||
.endm
|
||||
|
||||
.macro senduart,rd,rx
|
||||
str \rd, [\rx, #0x00]
|
||||
.endm
|
||||
|
||||
.macro waituart,rd,rx
|
||||
@ wait for TX_READY
|
||||
1: ldr \rd, [\rx, #0x7C]
|
||||
tst \rd, #0x02
|
||||
beq 1b
|
||||
.endm
|
||||
|
||||
.macro busyuart,rd,rx
|
||||
.endm
|
||||
#define UART_SHIFT 2
|
||||
#include <asm/hardware/debug-8250.S>
|
||||
|
||||
@@ -15,13 +15,16 @@
|
||||
|
||||
#ifndef __ASM_ARCH_RK29_UNCOMPRESS_H
|
||||
|
||||
#include <linux/serial_reg.h>
|
||||
#include <mach/rk29_iomap.h>
|
||||
|
||||
static volatile u32 *UART = (u32 *)RK29_UART1_PHYS;
|
||||
|
||||
static void putc(int c)
|
||||
{
|
||||
while (!(*(volatile u32 *) (RK29_UART1_PHYS + 0x14) & (1 << 5)))
|
||||
while (!(UART[UART_LSR] & UART_LSR_THRE))
|
||||
barrier();
|
||||
*(volatile u32 *) (RK29_UART1_PHYS) = c;
|
||||
UART[UART_TX] = c;
|
||||
}
|
||||
|
||||
static inline void flush(void)
|
||||
|
||||
Reference in New Issue
Block a user