arm:kernel simplify the in kernel serial.

Simplify the in kernel serial header to a minimum. The driver doing
the real handling is the tty driver.

Change-Id: I5d487d71a3d22906313aa8af5e9d84b0751a6868
This commit is contained in:
Kees Jongenburger 2013-05-22 16:40:45 +02:00
parent 6364989e36
commit 5d15ac7c20
2 changed files with 7 additions and 9 deletions

View file

@ -9,14 +9,14 @@ void omap3_ser_putc(char c)
/* Wait until FIFO's empty */
for (i = 0; i < 100000; i++)
if (mmio_read(OMAP3_UART3_LSR) & OMAP3_LSR_THRE)
if (mmio_read(OMAP3_DEBUG_UART_LSR) & OMAP3_LSR_THRE)
break;
/* Write character */
mmio_write(OMAP3_UART3_THR, c);
mmio_write(OMAP3_DEBUG_UART_THR, c);
/* And wait again until FIFO's empty to prevent TTY from overwriting */
for (i = 0; i < 100000; i++)
if (mmio_read(OMAP3_UART3_LSR) & (OMAP3_LSR_THRE | OMAP3_LSR_TEMT))
if (mmio_read(OMAP3_DEBUG_UART_LSR) & (OMAP3_LSR_THRE | OMAP3_LSR_TEMT))
break;
}

View file

@ -2,9 +2,7 @@
#define _OMAP_SERIAL_H
/* UART register map */
#define OMAP3_UART1_BASE 0x4806A000 /* UART1 physical address */
#define OMAP3_UART2_BASE 0x4806C000 /* UART2 physical address */
#define OMAP3_UART3_BASE 0x49020000 /* UART3 physical address */
#define OMAP3_DEBUG_UART_BASE 0x49020000 /* UART3 physical address */
/* UART registers */
#define OMAP3_THR 0x000 /* Transmit holding register */
@ -18,9 +16,9 @@
/* Supplementary status register fields */
#define OMAP3_SSR_TX_FIFO_FULL (1 << 0) /* Transmit FIFO full */
#define OMAP3_UART3_THR (OMAP3_UART3_BASE + OMAP3_THR)
#define OMAP3_UART3_LSR (OMAP3_UART3_BASE + OMAP3_LSR)
#define OMAP3_UART3_SSR (OMAP3_UART3_BASE + OMAP3_SSR)
#define OMAP3_DEBUG_UART_THR (OMAP3_DEBUG_UART_BASE + OMAP3_THR)
#define OMAP3_DEBUG_UART_LSR (OMAP3_DEBUG_UART_BASE + OMAP3_LSR)
#define OMAP3_DEBUG_UART_SSR (OMAP3_DEBUG_UART_BASE + OMAP3_SSR)
#ifndef __ASSEMBLY__