summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0088-USB-cp210x-allow-more-baud-rates-above-1Mbaud.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2012-02-10 15:32:32 +0100
committerDenys Dmytriyenko <denys@ti.com>2012-02-27 09:04:13 -0500
commitc4eefd753012467261cf221babd2e8639b81d3ca (patch)
tree0f6e09a6b51f410455330f046a8e03787d5a126e /recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0088-USB-cp210x-allow-more-baud-rates-above-1Mbaud.patch
parent14f31c3c5a19dde049355ced3edd121c31842460 (diff)
downloadmeta-ti-c4eefd753012467261cf221babd2e8639b81d3ca.tar.gz
linux-ti33x-psp 3.2: update to 3.2.5
Runtime tested on a beaglebone A3 Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0088-USB-cp210x-allow-more-baud-rates-above-1Mbaud.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0088-USB-cp210x-allow-more-baud-rates-above-1Mbaud.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0088-USB-cp210x-allow-more-baud-rates-above-1Mbaud.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0088-USB-cp210x-allow-more-baud-rates-above-1Mbaud.patch
new file mode 100644
index 00000000..1c71c50c
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.3/0088-USB-cp210x-allow-more-baud-rates-above-1Mbaud.patch
@@ -0,0 +1,48 @@
1From 2f180035f2cedd14428f7f81f1ab2826e4a56faf Mon Sep 17 00:00:00 2001
2From: Johan Hovold <jhovold@gmail.com>
3Date: Mon, 16 Jan 2012 00:36:53 +0100
4Subject: [PATCH 88/90] USB: cp210x: allow more baud rates above 1Mbaud
5
6commit d1620ca9e7bb0030068c3b45b653defde8839dac upstream.
7
8Allow more baud rates to be set in [1M,2M] baud.
9
10Signed-off-by: Johan Hovold <jhovold@gmail.com>
11Cc: Preston Fick <preston.fick@silabs.com>
12Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13---
14 drivers/usb/serial/cp210x.c | 11 ++++++-----
15 1 files changed, 6 insertions(+), 5 deletions(-)
16
17diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
18index 07d297f..a515237 100644
19--- a/drivers/usb/serial/cp210x.c
20+++ b/drivers/usb/serial/cp210x.c
21@@ -388,10 +388,10 @@ static unsigned int cp210x_quantise_baudrate(unsigned int baud) {
22 else if (baud <= 491520) baud = 460800;
23 else if (baud <= 567138) baud = 500000;
24 else if (baud <= 670254) baud = 576000;
25- else if (baud <= 1053257) baud = 921600;
26- else if (baud <= 1474560) baud = 1228800;
27- else if (baud <= 2457600) baud = 1843200;
28- else baud = 3686400;
29+ else if (baud < 1000000)
30+ baud = 921600;
31+ else if (baud > 2000000)
32+ baud = 2000000;
33 return baud;
34 }
35
36@@ -611,7 +611,8 @@ static void cp210x_change_speed(struct tty_struct *tty,
37
38 baud = tty->termios->c_ospeed;
39
40- /* This maps the requested rate to a rate valid on cp2102 or cp2103.
41+ /* This maps the requested rate to a rate valid on cp2102 or cp2103,
42+ * or to an arbitrary rate in [1M,2M].
43 *
44 * NOTE: B0 is not implemented.
45 */
46--
471.7.7.4
48