diff options
author | Imre Kaloz <kaloz@openwrt.org> | 2008-04-27 16:56:19 +0000 |
---|---|---|
committer | Imre Kaloz <kaloz@openwrt.org> | 2008-04-27 16:56:19 +0000 |
commit | 261802269dd138d350a124aacc0900d60c800671 (patch) | |
tree | 4181fc24052b74a9151d645b3deb97072b2f6fbd /target/linux/pxa/patches-2.6.21/030-serial-divisor.patch | |
parent | 0427918e4c1aea5b33856ed598ad1d6baf62d862 (diff) | |
download | mtk-20170518-261802269dd138d350a124aacc0900d60c800671.zip mtk-20170518-261802269dd138d350a124aacc0900d60c800671.tar.gz mtk-20170518-261802269dd138d350a124aacc0900d60c800671.tar.bz2 |
incomplete Gumstix support
SVN-Revision: 10955
Diffstat (limited to 'target/linux/pxa/patches-2.6.21/030-serial-divisor.patch')
-rw-r--r-- | target/linux/pxa/patches-2.6.21/030-serial-divisor.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/target/linux/pxa/patches-2.6.21/030-serial-divisor.patch b/target/linux/pxa/patches-2.6.21/030-serial-divisor.patch new file mode 100644 index 0000000..efce5a5 --- /dev/null +++ b/target/linux/pxa/patches-2.6.21/030-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 * |