Lines Matching full:baud
54 int baud_base; /* baud base clock for divisor setting */
68 speed_t force_baud; /* if non-zero, force the baud rate to
1098 static unsigned short int ftdi_232am_baud_base_to_divisor(int baud, int base);
1099 static unsigned short int ftdi_232am_baud_to_divisor(int baud);
1100 static u32 ftdi_232bm_baud_base_to_divisor(int baud, int base);
1101 static u32 ftdi_232bm_baud_to_divisor(int baud);
1102 static u32 ftdi_2232h_baud_base_to_divisor(int baud, int base);
1103 static u32 ftdi_2232h_baud_to_divisor(int baud);
1150 static unsigned short int ftdi_232am_baud_base_to_divisor(int baud, int base) in ftdi_232am_baud_base_to_divisor() argument
1154 int divisor3 = DIV_ROUND_CLOSEST(base, 2 * baud); in ftdi_232am_baud_base_to_divisor()
1166 divisor = 0; /* special case for maximum baud rate */ in ftdi_232am_baud_base_to_divisor()
1170 static unsigned short int ftdi_232am_baud_to_divisor(int baud) in ftdi_232am_baud_to_divisor() argument
1172 return ftdi_232am_baud_base_to_divisor(baud, 48000000); in ftdi_232am_baud_to_divisor()
1175 static u32 ftdi_232bm_baud_base_to_divisor(int baud, int base) in ftdi_232bm_baud_base_to_divisor() argument
1180 int divisor3 = DIV_ROUND_CLOSEST(base, 2 * baud); in ftdi_232bm_baud_base_to_divisor()
1183 /* Deal with special cases for highest baud rates. */ in ftdi_232bm_baud_base_to_divisor()
1191 static u32 ftdi_232bm_baud_to_divisor(int baud) in ftdi_232bm_baud_to_divisor() argument
1193 return ftdi_232bm_baud_base_to_divisor(baud, 48000000); in ftdi_232bm_baud_to_divisor()
1196 static u32 ftdi_2232h_baud_base_to_divisor(int baud, int base) in ftdi_2232h_baud_base_to_divisor() argument
1202 /* hi-speed baud rate is 10-bit sampling instead of 16-bit */ in ftdi_2232h_baud_base_to_divisor()
1203 divisor3 = DIV_ROUND_CLOSEST(8 * base, 10 * baud); in ftdi_2232h_baud_base_to_divisor()
1207 /* Deal with special cases for highest baud rates. */ in ftdi_2232h_baud_base_to_divisor()
1213 * Set this bit to turn off a divide by 2.5 on baud rate generator in ftdi_2232h_baud_base_to_divisor()
1214 * This enables baud rates up to 12Mbaud but cannot reach below 1200 in ftdi_2232h_baud_base_to_divisor()
1215 * baud with this bit set in ftdi_2232h_baud_base_to_divisor()
1221 static u32 ftdi_2232h_baud_to_divisor(int baud) in ftdi_2232h_baud_to_divisor() argument
1223 return ftdi_2232h_baud_base_to_divisor(baud, 120000000); in ftdi_2232h_baud_to_divisor()
1282 int baud; in get_ftdi_divisor() local
1284 baud = tty_get_baud_rate(tty); in get_ftdi_divisor()
1285 dev_dbg(dev, "%s - tty_get_baud_rate reports speed %d\n", __func__, baud); in get_ftdi_divisor()
1291 if (baud == 38400 && in get_ftdi_divisor()
1294 baud = priv->baud_base / priv->custom_divisor; in get_ftdi_divisor()
1295 dev_dbg(dev, "%s - custom divisor %d sets baud rate to %d\n", in get_ftdi_divisor()
1296 __func__, priv->custom_divisor, baud); in get_ftdi_divisor()
1299 if (!baud) in get_ftdi_divisor()
1300 baud = 9600; in get_ftdi_divisor()
1303 switch (baud) { in get_ftdi_divisor()
1314 } /* baud */ in get_ftdi_divisor()
1317 __func__, baud); in get_ftdi_divisor()
1319 baud = 9600; in get_ftdi_divisor()
1324 if (baud <= 3000000) { in get_ftdi_divisor()
1325 div_value = ftdi_232am_baud_to_divisor(baud); in get_ftdi_divisor()
1327 dev_dbg(dev, "%s - Baud rate too high!\n", __func__); in get_ftdi_divisor()
1328 baud = 9600; in get_ftdi_divisor()
1337 if (baud <= 3000000) { in get_ftdi_divisor()
1345 (baud == 19200)) { in get_ftdi_divisor()
1346 baud = 1200000; in get_ftdi_divisor()
1348 div_value = ftdi_232bm_baud_to_divisor(baud); in get_ftdi_divisor()
1350 dev_dbg(dev, "%s - Baud rate too high!\n", __func__); in get_ftdi_divisor()
1353 baud = 9600; in get_ftdi_divisor()
1359 if ((baud <= 12000000) && (baud >= 1200)) { in get_ftdi_divisor()
1360 div_value = ftdi_2232h_baud_to_divisor(baud); in get_ftdi_divisor()
1361 } else if (baud < 1200) { in get_ftdi_divisor()
1362 div_value = ftdi_232bm_baud_to_divisor(baud); in get_ftdi_divisor()
1364 dev_dbg(dev, "%s - Baud rate too high!\n", __func__); in get_ftdi_divisor()
1367 baud = 9600; in get_ftdi_divisor()
1373 dev_dbg(dev, "%s - Baud rate set to %d (divisor 0x%lX) on chip %s\n", in get_ftdi_divisor()
1374 __func__, baud, (unsigned long)div_value, in get_ftdi_divisor()
1378 tty_encode_baud_rate(tty, baud, baud); in get_ftdi_divisor()
1569 /* Hi-speed - baud clock runs at 120MHz */ in ftdi_determine_type()
1573 /* Hi-speed - baud clock runs at 120MHz */ in ftdi_determine_type()
2668 /* Force baud rate if this device requires it, unless it is set to in ftdi_set_termios()
2671 dev_dbg(ddev, "%s: forcing baud rate for this device\n", __func__); in ftdi_set_termios()