aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/pxa.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/pxa.c')
-rw-r--r--drivers/serial/pxa.c29
1 files changed, 24 insertions, 5 deletions
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c
index 90c2a86c421b..8cc4cedadd99 100644
--- a/drivers/serial/pxa.c
+++ b/drivers/serial/pxa.c
@@ -358,6 +358,9 @@ static int serial_pxa_startup(struct uart_port *port)
358 unsigned long flags; 358 unsigned long flags;
359 int retval; 359 int retval;
360 360
361 if (port->line == 3) /* HWUART */
362 up->mcr |= UART_MCR_AFE;
363 else
361 up->mcr = 0; 364 up->mcr = 0;
362 365
363 /* 366 /*
@@ -481,8 +484,10 @@ serial_pxa_set_termios(struct uart_port *port, struct termios *termios,
481 484
482 if ((up->port.uartclk / quot) < (2400 * 16)) 485 if ((up->port.uartclk / quot) < (2400 * 16))
483 fcr = UART_FCR_ENABLE_FIFO | UART_FCR_PXAR1; 486 fcr = UART_FCR_ENABLE_FIFO | UART_FCR_PXAR1;
484 else 487 else if ((up->port.uartclk / quot) < (230400 * 16))
485 fcr = UART_FCR_ENABLE_FIFO | UART_FCR_PXAR8; 488 fcr = UART_FCR_ENABLE_FIFO | UART_FCR_PXAR8;
489 else
490 fcr = UART_FCR_ENABLE_FIFO | UART_FCR_PXAR32;
486 491
487 /* 492 /*
488 * Ok, we're now changing the port state. Do it with 493 * Ok, we're now changing the port state. Do it with
@@ -772,6 +777,20 @@ static struct uart_pxa_port serial_pxa_ports[] = {
772 .ops = &serial_pxa_pops, 777 .ops = &serial_pxa_pops,
773 .line = 2, 778 .line = 2,
774 }, 779 },
780 }, { /* HWUART */
781 .name = "HWUART",
782 .cken = CKEN4_HWUART,
783 .port = {
784 .type = PORT_PXA,
785 .iotype = UPIO_MEM,
786 .membase = (void *)&HWUART,
787 .mapbase = __PREG(HWUART),
788 .irq = IRQ_HWUART,
789 .uartclk = 921600 * 16,
790 .fifosize = 64,
791 .ops = &serial_pxa_pops,
792 .line = 3,
793 },
775 } 794 }
776}; 795};
777 796
@@ -786,21 +805,21 @@ static struct uart_driver serial_pxa_reg = {
786 .cons = PXA_CONSOLE, 805 .cons = PXA_CONSOLE,
787}; 806};
788 807
789static int serial_pxa_suspend(struct device *_dev, pm_message_t state, u32 level) 808static int serial_pxa_suspend(struct device *_dev, pm_message_t state)
790{ 809{
791 struct uart_pxa_port *sport = dev_get_drvdata(_dev); 810 struct uart_pxa_port *sport = dev_get_drvdata(_dev);
792 811
793 if (sport && level == SUSPEND_DISABLE) 812 if (sport)
794 uart_suspend_port(&serial_pxa_reg, &sport->port); 813 uart_suspend_port(&serial_pxa_reg, &sport->port);
795 814
796 return 0; 815 return 0;
797} 816}
798 817
799static int serial_pxa_resume(struct device *_dev, u32 level) 818static int serial_pxa_resume(struct device *_dev)
800{ 819{
801 struct uart_pxa_port *sport = dev_get_drvdata(_dev); 820 struct uart_pxa_port *sport = dev_get_drvdata(_dev);
802 821
803 if (sport && level == RESUME_ENABLE) 822 if (sport)
804 uart_resume_port(&serial_pxa_reg, &sport->port); 823 uart_resume_port(&serial_pxa_reg, &sport->port);
805 824
806 return 0; 825 return 0;