Lines Matching refs:baud
891 unsigned int baud; in cp210x_get_termios() local
895 &tty->termios.c_cflag, &baud); in cp210x_get_termios()
896 tty_encode_baud_rate(tty, baud, baud); in cp210x_get_termios()
900 cp210x_get_termios_port(port, &cflag, &baud); in cp210x_get_termios()
914 u32 baud; in cp210x_get_termios_port() local
918 cp210x_read_u32_reg(port, CP210X_GET_BAUDRATE, &baud); in cp210x_get_termios_port()
920 dev_dbg(dev, "%s - baud rate = %d\n", __func__, baud); in cp210x_get_termios_port()
921 *baudp = baud; in cp210x_get_termios_port()
1066 static speed_t cp210x_get_an205_rate(speed_t baud) in cp210x_get_an205_rate() argument
1071 if (baud <= cp210x_an205_table1[i].high) in cp210x_get_an205_rate()
1078 static speed_t cp210x_get_actual_rate(speed_t baud) in cp210x_get_actual_rate() argument
1083 if (baud <= 365) in cp210x_get_actual_rate()
1086 div = DIV_ROUND_CLOSEST(48000000, 2 * prescale * baud); in cp210x_get_actual_rate()
1087 baud = 48000000 / (2 * prescale * div); in cp210x_get_actual_rate()
1089 return baud; in cp210x_get_actual_rate()
1123 u32 baud; in cp210x_change_speed() local
1131 baud = clamp(tty->termios.c_ospeed, priv->min_speed, priv->max_speed); in cp210x_change_speed()
1134 baud = cp210x_get_actual_rate(baud); in cp210x_change_speed()
1135 else if (baud < 1000000) in cp210x_change_speed()
1136 baud = cp210x_get_an205_rate(baud); in cp210x_change_speed()
1138 dev_dbg(&port->dev, "%s - setting baud rate to %u\n", __func__, baud); in cp210x_change_speed()
1139 if (cp210x_write_u32_reg(port, CP210X_SET_BAUDRATE, baud)) { in cp210x_change_speed()
1140 dev_warn(&port->dev, "failed to set baud rate to %u\n", baud); in cp210x_change_speed()
1142 baud = old_termios->c_ospeed; in cp210x_change_speed()
1144 baud = 9600; in cp210x_change_speed()
1147 tty_encode_baud_rate(tty, baud, baud); in cp210x_change_speed()