• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/usb/serial/

Lines Matching defs:baud

66 	int baud_base;		/* baud base clock for divisor setting */
82 speed_t force_baud; /* if non-zero, force the baud rate to
858 static unsigned short int ftdi_232am_baud_base_to_divisor(int baud, int base);
859 static unsigned short int ftdi_232am_baud_to_divisor(int baud);
860 static __u32 ftdi_232bm_baud_base_to_divisor(int baud, int base);
861 static __u32 ftdi_232bm_baud_to_divisor(int baud);
862 static __u32 ftdi_2232h_baud_base_to_divisor(int baud, int base);
863 static __u32 ftdi_2232h_baud_to_divisor(int baud);
907 static unsigned short int ftdi_232am_baud_base_to_divisor(int baud, int base)
911 int divisor3 = base / 2 / baud;
923 divisor = 0; /* special case for maximum baud rate */
927 static unsigned short int ftdi_232am_baud_to_divisor(int baud)
929 return ftdi_232am_baud_base_to_divisor(baud, 48000000);
932 static __u32 ftdi_232bm_baud_base_to_divisor(int baud, int base)
937 int divisor3 = base / 2 / baud;
940 /* Deal with special cases for highest baud rates. */
948 static __u32 ftdi_232bm_baud_to_divisor(int baud)
950 return ftdi_232bm_baud_base_to_divisor(baud, 48000000);
953 static __u32 ftdi_2232h_baud_base_to_divisor(int baud, int base)
959 /* hi-speed baud rate is 10-bit sampling instead of 16-bit */
960 divisor3 = (base / 10 / baud) * 8;
964 /* Deal with special cases for highest baud rates. */
970 * Set this bit to turn off a divide by 2.5 on baud rate generator
971 * This enables baud rates up to 12Mbaud but cannot reach below 1200
972 * baud with this bit set
978 static __u32 ftdi_2232h_baud_to_divisor(int baud)
980 return ftdi_2232h_baud_base_to_divisor(baud, 120000000);
1039 int baud;
1044 * 1. Standard baud rates are set in tty->termios->c_cflag
1056 * 3. You can also set baud rate by setting custom divisor as follows
1068 /* 1. Get the baud rate from the tty settings, this observes
1071 baud = tty_get_baud_rate(tty);
1072 dbg("%s - tty_get_baud_rate reports speed %d", __func__, baud);
1077 if (baud == 38400 &&
1080 baud = priv->baud_base / priv->custom_divisor;
1081 dbg("%s - custom divisor %d sets baud rate to %d",
1082 __func__, priv->custom_divisor, baud);
1087 if (!baud)
1088 baud = 9600;
1091 switch (baud) {
1102 } /* baud */
1105 __func__, baud);
1107 baud = 9600;
1112 if (baud <= 3000000) {
1113 div_value = ftdi_232am_baud_to_divisor(baud);
1116 baud = 9600;
1124 if (baud <= 3000000) {
1132 (baud == 19200)) {
1133 baud = 1200000;
1135 div_value = ftdi_232bm_baud_to_divisor(baud);
1140 baud = 9600;
1145 if ((baud <= 12000000) & (baud >= 1200)) {
1146 div_value = ftdi_2232h_baud_to_divisor(baud);
1147 } else if (baud < 1200) {
1148 div_value = ftdi_232bm_baud_to_divisor(baud);
1153 baud = 9600;
1160 __func__, baud, (unsigned long)div_value,
1164 tty_encode_baud_rate(tty, baud, baud);
1351 /* Hi-speed - baud clock runs at 120MHz */
1355 /* Hi-speed - baud clock runs at 120MHz */
1984 /* Force baud rate if this device requires it, unless it is set to
1987 dbg("%s: forcing baud rate for this device", __func__);