#include <linux/sysrq.h>
#include <linux/serial_reg.h>
#include <linux/circ_buf.h>
-#include <linux/serial.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
if (retval)
return retval;
- CKEN |= up->cken;
- udelay(1);
-
/*
* Clear the FIFO buffers and disable them.
* (they will be reenabled in set_termios())
UART_FCR_CLEAR_RCVR |
UART_FCR_CLEAR_XMIT);
serial_out(up, UART_FCR, 0);
-
- CKEN &= ~up->cken;
}
static void
serial_pxa_pm(struct uart_port *port, unsigned int state,
unsigned int oldstate)
{
+ struct uart_pxa_port *up = (struct uart_pxa_port *)port;
if (state) {
/* sleep */
+ CKEN &= ~up->cken;
} else {
/* wake */
+ CKEN |= up->cken;
+ udelay(1);
}
}
.cken = CKEN6_FFUART,
.port = {
.type = PORT_PXA,
- .iotype = SERIAL_IO_MEM,
+ .iotype = UPIO_MEM,
.membase = (void *)&FFUART,
.mapbase = __PREG(FFUART),
.irq = IRQ_FFUART,
.uartclk = 921600 * 16,
.fifosize = 64,
- .flags = ASYNC_SKIP_TEST,
.ops = &serial_pxa_pops,
.line = 0,
},
.cken = CKEN7_BTUART,
.port = {
.type = PORT_PXA,
- .iotype = SERIAL_IO_MEM,
+ .iotype = UPIO_MEM,
.membase = (void *)&BTUART,
.mapbase = __PREG(BTUART),
.irq = IRQ_BTUART,
.uartclk = 921600 * 16,
.fifosize = 64,
- .flags = ASYNC_SKIP_TEST,
.ops = &serial_pxa_pops,
.line = 1,
},
.cken = CKEN5_STUART,
.port = {
.type = PORT_PXA,
- .iotype = SERIAL_IO_MEM,
+ .iotype = UPIO_MEM,
.membase = (void *)&STUART,
.mapbase = __PREG(STUART),
.irq = IRQ_STUART,
.uartclk = 921600 * 16,
.fifosize = 64,
- .flags = ASYNC_SKIP_TEST,
.ops = &serial_pxa_pops,
.line = 2,
},
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);
}