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