FreeCalypso > hg > freecalypso-sw
annotate doc/linux-2.6.37.6-ftdi_sio.c.patch @ 1006:6e1fcffd3266
gsm-fw/riviera/rvt channel addition: missed the bit in rvt_task.c
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Sun, 20 Mar 2016 18:58:07 +0000 |
parents | f4da3071dd61 |
children |
rev | line source |
---|---|
962
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 --- ftdi_sio.c.orig 2011-03-27 11:01:41.000000000 -0800 |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 +++ ftdi_sio.c 2015-10-30 13:18:40.879000032 -0800 |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 @@ -949,7 +949,7 @@ |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 static const unsigned char divfrac[8] = { 0, 3, 2, 4, 1, 5, 6, 7 }; |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 __u32 divisor; |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 /* divisor shifted 3 bits to the left */ |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 - int divisor3 = base / 2 / baud; |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 + int divisor3 = (base / 2 + baud / 2) / baud; |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 divisor = divisor3 >> 3; |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 divisor |= (__u32)divfrac[divisor3 & 0x7] << 14; |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 /* Deal with special cases for highest baud rates. */ |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 @@ -1087,6 +1087,17 @@ |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 baud = tty_get_baud_rate(tty); |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 dbg("%s - tty_get_baud_rate reports speed %d", __func__, baud); |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 + /* |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 + * FreeCalypso hack: translate non-std high |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 + * baud rates for GSM like CP2102 does. |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 + */ |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 + if (baud == 230400) |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 + baud = 203125; |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 + else if (baud == 460800) |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 + baud = 406250; |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 + else if (baud == 921600) |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 + baud = 812500; |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 + |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 /* 2. Observe async-compatible custom_divisor hack, update baudrate |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 if needed */ |
f4da3071dd61
doc/High-speed-serial write-up and Linux kernel patch added
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 |