| .. | .. |
|---|
| 8 | 8 | #include <linux/termios.h> |
|---|
| 9 | 9 | #include <linux/tty.h> |
|---|
| 10 | 10 | #include <linux/export.h> |
|---|
| 11 | +#include "tty.h" |
|---|
| 11 | 12 | |
|---|
| 12 | 13 | |
|---|
| 13 | 14 | /* |
|---|
| .. | .. |
|---|
| 17 | 18 | * include/asm/termbits.h file. |
|---|
| 18 | 19 | */ |
|---|
| 19 | 20 | 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, |
|---|
| 21 | + 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, |
|---|
| 22 | + 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, |
|---|
| 22 | 23 | #ifdef __sparc__ |
|---|
| 23 | | - 76800, 153600, 307200, 614400, 921600 |
|---|
| 24 | + 76800, 153600, 307200, 614400, 921600, 500000, 576000, |
|---|
| 25 | + 1000000, 1152000, 1500000, 2000000 |
|---|
| 24 | 26 | #else |
|---|
| 25 | 27 | 500000, 576000, 921600, 1000000, 1152000, 1500000, 2000000, |
|---|
| 26 | 28 | 2500000, 3000000, 3500000, 4000000 |
|---|
| 27 | 29 | #endif |
|---|
| 28 | 30 | }; |
|---|
| 29 | 31 | |
|---|
| 30 | | -#ifndef __sparc__ |
|---|
| 31 | 32 | 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 | | -}; |
|---|
| 33 | + B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800, B2400, |
|---|
| 34 | + B4800, B9600, B19200, B38400, B57600, B115200, B230400, B460800, |
|---|
| 35 | +#ifdef __sparc__ |
|---|
| 36 | + B76800, B153600, B307200, B614400, B921600, B500000, B576000, |
|---|
| 37 | + B1000000, B1152000, B1500000, B2000000 |
|---|
| 38 | 38 | #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 | | -}; |
|---|
| 39 | + B500000, B576000, B921600, B1000000, B1152000, B1500000, B2000000, |
|---|
| 40 | + B2500000, B3000000, B3500000, B4000000 |
|---|
| 45 | 41 | #endif |
|---|
| 42 | +}; |
|---|
| 46 | 43 | |
|---|
| 47 | 44 | static int n_baud_table = ARRAY_SIZE(baud_table); |
|---|
| 48 | 45 | |
|---|
| .. | .. |
|---|
| 123 | 120 | /** |
|---|
| 124 | 121 | * tty_termios_encode_baud_rate |
|---|
| 125 | 122 | * @termios: ktermios structure holding user requested state |
|---|
| 126 | | - * @ispeed: input speed |
|---|
| 127 | | - * @ospeed: output speed |
|---|
| 123 | + * @ibaud: input speed |
|---|
| 124 | + * @obaud: output speed |
|---|
| 128 | 125 | * |
|---|
| 129 | 126 | * Encode the speeds set into the passed termios structure. This is |
|---|
| 130 | 127 | * used as a library helper for drivers so that they can report back |
|---|
| .. | .. |
|---|
| 227 | 224 | /** |
|---|
| 228 | 225 | * tty_encode_baud_rate - set baud rate of the tty |
|---|
| 229 | 226 | * @ibaud: input baud rate |
|---|
| 230 | | - * @obad: output baud rate |
|---|
| 227 | + * @obaud: output baud rate |
|---|
| 231 | 228 | * |
|---|
| 232 | 229 | * Update the current termios data for the tty with the new speed |
|---|
| 233 | 230 | * settings. The caller must hold the termios_rwsem for the tty in |
|---|