aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorEric Miao <eric.miao@marvell.com>2009-01-14 06:12:42 -0500
committerEric Miao <eric.miao@marvell.com>2009-03-09 09:22:38 -0400
commit290a5589ce83540d0aba811c3d15af34aa373533 (patch)
tree74090c67fd47cab9ec444d25ed9e3b50f828d393 /drivers/serial
parent0807da5938b2d64fef7f1109fb4014de6392cbf7 (diff)
[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>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/pxa.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c
index f6e3b86bb0be..a48a8a13d87b 100644
--- a/drivers/serial/pxa.c
+++ b/drivers/serial/pxa.c
@@ -43,13 +43,7 @@
43#include <linux/tty_flip.h> 43#include <linux/tty_flip.h>
44#include <linux/serial_core.h> 44#include <linux/serial_core.h>
45#include <linux/clk.h> 45#include <linux/clk.h>
46 46#include <linux/io.h>
47#include <asm/io.h>
48#include <mach/hardware.h>
49#include <asm/irq.h>
50#include <mach/pxa-regs.h>
51#include <mach/regs-uart.h>
52
53 47
54struct uart_pxa_port { 48struct uart_pxa_port {
55 struct uart_port port; 49 struct uart_port port;
@@ -491,7 +485,7 @@ serial_pxa_set_termios(struct uart_port *port, struct ktermios *termios,
491 * Ensure the port will be enabled. 485 * Ensure the port will be enabled.
492 * This is required especially for serial console. 486 * This is required especially for serial console.
493 */ 487 */
494 up->ier |= IER_UUE; 488 up->ier |= UART_IER_UUE;
495 489
496 /* 490 /*
497 * Update the per-port timeout. 491 * Update the per-port timeout.
@@ -784,19 +778,15 @@ static int serial_pxa_probe(struct platform_device *dev)
784 sport->port.flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF; 778 sport->port.flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF;
785 sport->port.uartclk = clk_get_rate(sport->clk); 779 sport->port.uartclk = clk_get_rate(sport->clk);
786 780
787 /* 781 switch (dev->id) {
788 * Is it worth keeping this? 782 case 0: sport->name = "FFUART"; break;
789 */ 783 case 1: sport->name = "BTUART"; break;
790 if (mmres->start == __PREG(FFUART)) 784 case 2: sport->name = "STUART"; break;
791 sport->name = "FFUART"; 785 case 3: sport->name = "HWUART"; break;
792 else if (mmres->start == __PREG(BTUART)) 786 default:
793 sport->name = "BTUART";
794 else if (mmres->start == __PREG(STUART))
795 sport->name = "STUART";
796 else if (mmres->start == __PREG(HWUART))
797 sport->name = "HWUART";
798 else
799 sport->name = "???"; 787 sport->name = "???";
788 break;
789 }
800 790
801 sport->port.membase = ioremap(mmres->start, mmres->end - mmres->start + 1); 791 sport->port.membase = ioremap(mmres->start, mmres->end - mmres->start + 1);
802 if (!sport->port.membase) { 792 if (!sport->port.membase) {