From: Kees Jongenburger Date: Wed, 22 May 2013 14:40:45 +0000 (+0200) Subject: arm:kernel simplify the in kernel serial. X-Git-Tag: v3.3.0~970 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=refs%2Fchanges%2F81%2F581%2F3;p=minix.git 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 --- diff --git a/kernel/arch/earm/omap_serial.c b/kernel/arch/earm/omap_serial.c index 5a598c796..4f82ac9c6 100644 --- a/kernel/arch/earm/omap_serial.c +++ b/kernel/arch/earm/omap_serial.c @@ -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; } diff --git a/kernel/arch/earm/omap_serial.h b/kernel/arch/earm/omap_serial.h index f3b0626ef..3cb8a344e 100644 --- a/kernel/arch/earm/omap_serial.h +++ b/kernel/arch/earm/omap_serial.h @@ -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__