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
1094 static unsigned short int ftdi_232am_baud_base_to_divisor(int baud, int base);
1095 static unsigned short int ftdi_232am_baud_to_divisor(int baud);
1096 static u32 ftdi_232bm_baud_base_to_divisor(int baud, int base);
1097 static u32 ftdi_232bm_baud_to_divisor(int baud);
1098 static u32 ftdi_2232h_baud_base_to_divisor(int baud, int base);
1099 static u32 ftdi_2232h_baud_to_divisor(int baud);
1146 static unsigned short int ftdi_232am_baud_base_to_divisor(int baud, int base) in ftdi_232am_baud_base_to_divisor() argument
1150 int divisor3 = DIV_ROUND_CLOSEST(base, 2 * baud); in ftdi_232am_baud_base_to_divisor()
1162 divisor = 0; /* special case for maximum baud rate */ in ftdi_232am_baud_base_to_divisor()
1166 static unsigned short int ftdi_232am_baud_to_divisor(int baud) in ftdi_232am_baud_to_divisor() argument
1168 return ftdi_232am_baud_base_to_divisor(baud, 48000000); in ftdi_232am_baud_to_divisor()
1171 static u32 ftdi_232bm_baud_base_to_divisor(int baud, int base) in ftdi_232bm_baud_base_to_divisor() argument
1176 int divisor3 = DIV_ROUND_CLOSEST(base, 2 * baud); in ftdi_232bm_baud_base_to_divisor()
1179 /* Deal with special cases for highest baud rates. */ in ftdi_232bm_baud_base_to_divisor()
1187 static u32 ftdi_232bm_baud_to_divisor(int baud) in ftdi_232bm_baud_to_divisor() argument
1189 return ftdi_232bm_baud_base_to_divisor(baud, 48000000); in ftdi_232bm_baud_to_divisor()
1192 static u32 ftdi_2232h_baud_base_to_divisor(int baud, int base) in ftdi_2232h_baud_base_to_divisor() argument
1198 /* hi-speed baud rate is 10-bit sampling instead of 16-bit */ in ftdi_2232h_baud_base_to_divisor()
1199 divisor3 = DIV_ROUND_CLOSEST(8 * base, 10 * baud); in ftdi_2232h_baud_base_to_divisor()
1203 /* Deal with special cases for highest baud rates. */ in ftdi_2232h_baud_base_to_divisor()
1209 * Set this bit to turn off a divide by 2.5 on baud rate generator in ftdi_2232h_baud_base_to_divisor()
1210 * This enables baud rates up to 12Mbaud but cannot reach below 1200 in ftdi_2232h_baud_base_to_divisor()
1211 * baud with this bit set in ftdi_2232h_baud_base_to_divisor()
1217 static u32 ftdi_2232h_baud_to_divisor(int baud) in ftdi_2232h_baud_to_divisor() argument
1219 return ftdi_2232h_baud_base_to_divisor(baud, 120000000); in ftdi_2232h_baud_to_divisor()
1278 int baud; in get_ftdi_divisor() local
1280 baud = tty_get_baud_rate(tty); in get_ftdi_divisor()
1281 dev_dbg(dev, "%s - tty_get_baud_rate reports speed %d\n", __func__, baud); in get_ftdi_divisor()
1287 if (baud == 38400 && in get_ftdi_divisor()
1290 baud = priv->baud_base / priv->custom_divisor; in get_ftdi_divisor()
1291 dev_dbg(dev, "%s - custom divisor %d sets baud rate to %d\n", in get_ftdi_divisor()
1292 __func__, priv->custom_divisor, baud); in get_ftdi_divisor()
1295 if (!baud) in get_ftdi_divisor()
1296 baud = 9600; in get_ftdi_divisor()
1299 switch (baud) { in get_ftdi_divisor()
1310 } /* baud */ in get_ftdi_divisor()
1313 __func__, baud); in get_ftdi_divisor()
1315 baud = 9600; in get_ftdi_divisor()
1320 if (baud <= 3000000) { in get_ftdi_divisor()
1321 div_value = ftdi_232am_baud_to_divisor(baud); in get_ftdi_divisor()
1323 dev_dbg(dev, "%s - Baud rate too high!\n", __func__); in get_ftdi_divisor()
1324 baud = 9600; in get_ftdi_divisor()
1333 if (baud <= 3000000) { in get_ftdi_divisor()
1341 (baud == 19200)) { in get_ftdi_divisor()
1342 baud = 1200000; in get_ftdi_divisor()
1344 div_value = ftdi_232bm_baud_to_divisor(baud); in get_ftdi_divisor()
1346 dev_dbg(dev, "%s - Baud rate too high!\n", __func__); in get_ftdi_divisor()
1349 baud = 9600; in get_ftdi_divisor()
1355 if ((baud <= 12000000) && (baud >= 1200)) { in get_ftdi_divisor()
1356 div_value = ftdi_2232h_baud_to_divisor(baud); in get_ftdi_divisor()
1357 } else if (baud < 1200) { in get_ftdi_divisor()
1358 div_value = ftdi_232bm_baud_to_divisor(baud); in get_ftdi_divisor()
1360 dev_dbg(dev, "%s - Baud rate too high!\n", __func__); in get_ftdi_divisor()
1363 baud = 9600; in get_ftdi_divisor()
1369 dev_dbg(dev, "%s - Baud rate set to %d (divisor 0x%lX) on chip %s\n", in get_ftdi_divisor()
1370 __func__, baud, (unsigned long)div_value, in get_ftdi_divisor()
1374 tty_encode_baud_rate(tty, baud, baud); in get_ftdi_divisor()
1580 /* Hi-speed - baud clock runs at 120MHz */ in ftdi_determine_type()
1584 /* Hi-speed - baud clock runs at 120MHz */ in ftdi_determine_type()
2664 /* Force baud rate if this device requires it, unless it is set to in ftdi_set_termios()
2667 dev_dbg(ddev, "%s: forcing baud rate for this device\n", __func__); in ftdi_set_termios()