diff options
| author | Sergey Lapin <slapinid@gmail.com> | 2008-03-03 11:19:39 +0000 |
|---|---|---|
| committer | Sergey Lapin <slapinid@gmail.com> | 2008-03-03 11:19:39 +0000 |
| commit | 07c0de10dddece15b5a88e76ec94a9abc985b9cd (patch) | |
| tree | 340de59696786aaa35070e7615700bf0bb491833 /packages/linux/gumstix-kernel-2.6.21/serial-divisor.patch | |
| parent | fd03b5166557844135feef144c2d78470f71f7e6 (diff) | |
| parent | 34c6339ee471446c0231675f9fc83d4a419d53c3 (diff) | |
merge of '6bfc098b36170550230dc57120c75b31480dc6b3'
and 'abcca41fb7edac5318b0cb0266d5f0c167f87c2f'
Diffstat (limited to 'packages/linux/gumstix-kernel-2.6.21/serial-divisor.patch')
| -rw-r--r-- | packages/linux/gumstix-kernel-2.6.21/serial-divisor.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/packages/linux/gumstix-kernel-2.6.21/serial-divisor.patch b/packages/linux/gumstix-kernel-2.6.21/serial-divisor.patch new file mode 100644 index 0000000000..efce5a51ef --- /dev/null +++ b/packages/linux/gumstix-kernel-2.6.21/serial-divisor.patch @@ -0,0 +1,31 @@ +Index: linux-2.6.21gum/drivers/serial/pxa.c +=================================================================== +--- linux-2.6.21gum.orig/drivers/serial/pxa.c ++++ linux-2.6.21gum/drivers/serial/pxa.c +@@ -41,6 +41,7 @@ + #include <linux/platform_device.h> + #include <linux/tty.h> + #include <linux/tty_flip.h> ++#include <linux/serial.h> + #include <linux/serial_core.h> + + #include <asm/io.h> +@@ -577,8 +578,16 @@ static void serial_pxa_config_port(struc + static int + serial_pxa_verify_port(struct uart_port *port, struct serial_struct *ser) + { +- /* we don't want the core code to modify any port params */ +- return -EINVAL; ++ struct uart_pxa_port *up = (struct uart_pxa_port *)port; ++ int ret = 0; ++ ++ if (up->port.uartclk / 16 != ser->baud_base) ++ ret = -EINVAL; ++ else if (((up->port.line & 1) == 0) && ser->baud_base > 230400) /* Max baud rate for STUART and FFUART */ ++ ret = -EINVAL; ++ else if (((up->port.line & 1) != 0) && ser->baud_base > 921600) /* Max baud rate for HWUART and BTUART */ ++ ret = -EINVAL; ++ return ret; + } + + static const char * |
