forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 95099d4622f8cb224d94e314c7a8e0df60b13f87
kernel/drivers/tty/tty_baudrate.c
....@@ -17,32 +17,28 @@
1717 * include/asm/termbits.h file.
1818 */
1919 static const speed_t baud_table[] = {
20
- 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800,
21
- 9600, 19200, 38400, 57600, 115200, 230400, 460800,
20
+ 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400,
21
+ 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800,
2222 #ifdef __sparc__
23
- 76800, 153600, 307200, 614400, 921600
23
+ 76800, 153600, 307200, 614400, 921600, 500000, 576000,
24
+ 1000000, 1152000, 1500000, 2000000
2425 #else
2526 500000, 576000, 921600, 1000000, 1152000, 1500000, 2000000,
2627 2500000, 3000000, 3500000, 4000000
2728 #endif
2829 };
2930
30
-#ifndef __sparc__
3131 static const tcflag_t baud_bits[] = {
32
- B0, B50, B75, B110, B134, B150, B200, B300, B600,
33
- B1200, B1800, B2400, B4800, B9600, B19200, B38400,
34
- B57600, B115200, B230400, B460800, B500000, B576000,
35
- B921600, B1000000, B1152000, B1500000, B2000000, B2500000,
36
- B3000000, B3500000, B4000000
37
-};
32
+ B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800, B2400,
33
+ B4800, B9600, B19200, B38400, B57600, B115200, B230400, B460800,
34
+#ifdef __sparc__
35
+ B76800, B153600, B307200, B614400, B921600, B500000, B576000,
36
+ B1000000, B1152000, B1500000, B2000000
3837 #else
39
-static const tcflag_t baud_bits[] = {
40
- B0, B50, B75, B110, B134, B150, B200, B300, B600,
41
- B1200, B1800, B2400, B4800, B9600, B19200, B38400,
42
- B57600, B115200, B230400, B460800, B76800, B153600,
43
- B307200, B614400, B921600
44
-};
38
+ B500000, B576000, B921600, B1000000, B1152000, B1500000, B2000000,
39
+ B2500000, B3000000, B3500000, B4000000
4540 #endif
41
+};
4642
4743 static int n_baud_table = ARRAY_SIZE(baud_table);
4844
....@@ -123,8 +119,8 @@
123119 /**
124120 * tty_termios_encode_baud_rate
125121 * @termios: ktermios structure holding user requested state
126
- * @ispeed: input speed
127
- * @ospeed: output speed
122
+ * @ibaud: input speed
123
+ * @obaud: output speed
128124 *
129125 * Encode the speeds set into the passed termios structure. This is
130126 * used as a library helper for drivers so that they can report back
....@@ -227,7 +223,7 @@
227223 /**
228224 * tty_encode_baud_rate - set baud rate of the tty
229225 * @ibaud: input baud rate
230
- * @obad: output baud rate
226
+ * @obaud: output baud rate
231227 *
232228 * Update the current termios data for the tty with the new speed
233229 * settings. The caller must hold the termios_rwsem for the tty in