Commit 1bd553f9 authored by Russell King's avatar Russell King

[ARM] Update PXA serial driver.

- Move CKEN manipulation into power management handling (so we don't
  shut down the clock to the console port.)
- .iotype should be using UPIO_xxx not SERIAL_IO_xxx
- Remove each port when module is unloaded.
- Remove needless #include.
- Remove ASYNC_SKIP_TEST - we don't have any tests to skip.
parent 854ec722
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include <linux/sysrq.h> #include <linux/sysrq.h>
#include <linux/serial_reg.h> #include <linux/serial_reg.h>
#include <linux/circ_buf.h> #include <linux/circ_buf.h>
#include <linux/serial.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
...@@ -386,9 +385,6 @@ static int serial_pxa_startup(struct uart_port *port) ...@@ -386,9 +385,6 @@ static int serial_pxa_startup(struct uart_port *port)
if (retval) if (retval)
return retval; return retval;
CKEN |= up->cken;
udelay(1);
/* /*
* Clear the FIFO buffers and disable them. * Clear the FIFO buffers and disable them.
* (they will be reenabled in set_termios()) * (they will be reenabled in set_termios())
...@@ -461,8 +457,6 @@ static void serial_pxa_shutdown(struct uart_port *port) ...@@ -461,8 +457,6 @@ static void serial_pxa_shutdown(struct uart_port *port)
UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_RCVR |
UART_FCR_CLEAR_XMIT); UART_FCR_CLEAR_XMIT);
serial_out(up, UART_FCR, 0); serial_out(up, UART_FCR, 0);
CKEN &= ~up->cken;
} }
static void static void
...@@ -576,10 +570,14 @@ static void ...@@ -576,10 +570,14 @@ static void
serial_pxa_pm(struct uart_port *port, unsigned int state, serial_pxa_pm(struct uart_port *port, unsigned int state,
unsigned int oldstate) unsigned int oldstate)
{ {
struct uart_pxa_port *up = (struct uart_pxa_port *)port;
if (state) { if (state) {
/* sleep */ /* sleep */
CKEN &= ~up->cken;
} else { } else {
/* wake */ /* wake */
CKEN |= up->cken;
udelay(1);
} }
} }
...@@ -760,13 +758,12 @@ static struct uart_pxa_port serial_pxa_ports[] = { ...@@ -760,13 +758,12 @@ static struct uart_pxa_port serial_pxa_ports[] = {
.cken = CKEN6_FFUART, .cken = CKEN6_FFUART,
.port = { .port = {
.type = PORT_PXA, .type = PORT_PXA,
.iotype = SERIAL_IO_MEM, .iotype = UPIO_MEM,
.membase = (void *)&FFUART, .membase = (void *)&FFUART,
.mapbase = __PREG(FFUART), .mapbase = __PREG(FFUART),
.irq = IRQ_FFUART, .irq = IRQ_FFUART,
.uartclk = 921600 * 16, .uartclk = 921600 * 16,
.fifosize = 64, .fifosize = 64,
.flags = ASYNC_SKIP_TEST,
.ops = &serial_pxa_pops, .ops = &serial_pxa_pops,
.line = 0, .line = 0,
}, },
...@@ -775,13 +772,12 @@ static struct uart_pxa_port serial_pxa_ports[] = { ...@@ -775,13 +772,12 @@ static struct uart_pxa_port serial_pxa_ports[] = {
.cken = CKEN7_BTUART, .cken = CKEN7_BTUART,
.port = { .port = {
.type = PORT_PXA, .type = PORT_PXA,
.iotype = SERIAL_IO_MEM, .iotype = UPIO_MEM,
.membase = (void *)&BTUART, .membase = (void *)&BTUART,
.mapbase = __PREG(BTUART), .mapbase = __PREG(BTUART),
.irq = IRQ_BTUART, .irq = IRQ_BTUART,
.uartclk = 921600 * 16, .uartclk = 921600 * 16,
.fifosize = 64, .fifosize = 64,
.flags = ASYNC_SKIP_TEST,
.ops = &serial_pxa_pops, .ops = &serial_pxa_pops,
.line = 1, .line = 1,
}, },
...@@ -790,13 +786,12 @@ static struct uart_pxa_port serial_pxa_ports[] = { ...@@ -790,13 +786,12 @@ static struct uart_pxa_port serial_pxa_ports[] = {
.cken = CKEN5_STUART, .cken = CKEN5_STUART,
.port = { .port = {
.type = PORT_PXA, .type = PORT_PXA,
.iotype = SERIAL_IO_MEM, .iotype = UPIO_MEM,
.membase = (void *)&STUART, .membase = (void *)&STUART,
.mapbase = __PREG(STUART), .mapbase = __PREG(STUART),
.irq = IRQ_STUART, .irq = IRQ_STUART,
.uartclk = 921600 * 16, .uartclk = 921600 * 16,
.fifosize = 64, .fifosize = 64,
.flags = ASYNC_SKIP_TEST,
.ops = &serial_pxa_pops, .ops = &serial_pxa_pops,
.line = 2, .line = 2,
}, },
...@@ -830,6 +825,10 @@ static int __init serial_pxa_init(void) ...@@ -830,6 +825,10 @@ static int __init serial_pxa_init(void)
static void __exit serial_pxa_exit(void) static void __exit serial_pxa_exit(void)
{ {
int i;
for (i = 0; i < ARRAY_SIZE(serial_pxa_ports); i++)
uart_remove_one_port(&serial_pxa_reg, &serial_pxa_ports[i].port);
uart_unregister_driver(&serial_pxa_reg); uart_unregister_driver(&serial_pxa_reg);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment