[brcm63xx] request gpio pins and set direction correctly for pcmcia
[openwrt.git] / target / linux / pxa / patches-2.6.21 / 030-serial-divisor.patch
1 --- a/drivers/serial/pxa.c
2 +++ b/drivers/serial/pxa.c
3 @@ -41,6 +41,7 @@
4 #include <linux/platform_device.h>
5 #include <linux/tty.h>
6 #include <linux/tty_flip.h>
7 +#include <linux/serial.h>
8 #include <linux/serial_core.h>
9
10 #include <asm/io.h>
11 @@ -577,8 +578,16 @@ static void serial_pxa_config_port(struc
12 static int
13 serial_pxa_verify_port(struct uart_port *port, struct serial_struct *ser)
14 {
15 - /* we don't want the core code to modify any port params */
16 - return -EINVAL;
17 + struct uart_pxa_port *up = (struct uart_pxa_port *)port;
18 + int ret = 0;
19 +
20 + if (up->port.uartclk / 16 != ser->baud_base)
21 + ret = -EINVAL;
22 + else if (((up->port.line & 1) == 0) && ser->baud_base > 230400) /* Max baud rate for STUART and FFUART */
23 + ret = -EINVAL;
24 + else if (((up->port.line & 1) != 0) && ser->baud_base > 921600) /* Max baud rate for HWUART and BTUART */
25 + ret = -EINVAL;
26 + return ret;
27 }
28
29 static const char *
This page took 0.037769 seconds and 5 git commands to generate.