dect
/
linux-2.6
Archived
13
0
Fork 0

[ARM] pxa: remove machine class specific stuffs from serial driver

The only things prevent drivers/serial/pxa.c from being generic enough
are:

  1. IER_UUE which can be safely replaced by UART_IER_UUE as defined in
     serial_reg.h for PXA

  2. __PREG() and FFUART/BTUART/STUART definitions to decide the UART
     port name

And removed the un-necessary #include of <mach/...> and <asm/...> headers.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
This commit is contained in:
Eric Miao 2009-01-14 19:12:42 +08:00
parent 0807da5938
commit 290a5589ce
1 changed files with 10 additions and 20 deletions

View File

@ -43,13 +43,7 @@
#include <linux/tty_flip.h> #include <linux/tty_flip.h>
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/io.h>
#include <asm/io.h>
#include <mach/hardware.h>
#include <asm/irq.h>
#include <mach/pxa-regs.h>
#include <mach/regs-uart.h>
struct uart_pxa_port { struct uart_pxa_port {
struct uart_port port; struct uart_port port;
@ -491,7 +485,7 @@ serial_pxa_set_termios(struct uart_port *port, struct ktermios *termios,
* Ensure the port will be enabled. * Ensure the port will be enabled.
* This is required especially for serial console. * This is required especially for serial console.
*/ */
up->ier |= IER_UUE; up->ier |= UART_IER_UUE;
/* /*
* Update the per-port timeout. * Update the per-port timeout.
@ -784,19 +778,15 @@ static int serial_pxa_probe(struct platform_device *dev)
sport->port.flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF; sport->port.flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF;
sport->port.uartclk = clk_get_rate(sport->clk); sport->port.uartclk = clk_get_rate(sport->clk);
/* switch (dev->id) {
* Is it worth keeping this? case 0: sport->name = "FFUART"; break;
*/ case 1: sport->name = "BTUART"; break;
if (mmres->start == __PREG(FFUART)) case 2: sport->name = "STUART"; break;
sport->name = "FFUART"; case 3: sport->name = "HWUART"; break;
else if (mmres->start == __PREG(BTUART)) default:
sport->name = "BTUART";
else if (mmres->start == __PREG(STUART))
sport->name = "STUART";
else if (mmres->start == __PREG(HWUART))
sport->name = "HWUART";
else
sport->name = "???"; sport->name = "???";
break;
}
sport->port.membase = ioremap(mmres->start, mmres->end - mmres->start + 1); sport->port.membase = ioremap(mmres->start, mmres->end - mmres->start + 1);
if (!sport->port.membase) { if (!sport->port.membase) {