1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

Add support to the uftdi driver for Intrepid Control Systems' vehicle

bus interfaces.  These interfaces use the FTDI chipset with different
Vendor and Product IDs.

Add two additional baud rate enumerations.  The vehicle bus interfaces
use a baud rate of 2000000.  Also add 3000000 as it is the other FTDI
baud divisor special case.

I've commited a slightly different patch from that provided in the PR as
I changed the matching code a bit yesterday.

Submitted by:	Mike Durian <durian at shadetreesoftware.com>
PR:		kern/67357
This commit is contained in:
Brooks Davis 2004-07-01 17:16:20 +00:00
parent 86ab142d10
commit c9e7c6f4fb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=131416
3 changed files with 27 additions and 1 deletions

View File

@ -168,6 +168,10 @@ USB_MATCH(uftdi)
if (uaa->vendor == USB_VENDOR_SIIG2 &&
(uaa->product == USB_PRODUCT_SIIG2_US2308))
return (UMATCH_VENDOR_PRODUCT);
if (uaa->vendor == USB_VENDOR_INTREPIDCS &&
(uaa->product == USB_PRODUCT_INTREPIDCS_VALUECAN ||
uaa->product == USB_PRODUCT_INTREPIDCS_NEOVI))
return (UMATCH_VENDOR_PRODUCT);
return (UMATCH_NONE);
}
@ -240,6 +244,19 @@ USB_ATTACH(uftdi)
}
break;
case USB_VENDOR_INTREPIDCS:
switch( uaa->product ){
case USB_PRODUCT_INTREPIDCS_VALUECAN:
case USB_PRODUCT_INTREPIDCS_NEOVI:
sc->sc_type = UFTDI_TYPE_8U232AM;
sc->sc_hdrlen = 0;
break;
default: /* Can't happen */
goto bad;
}
break;
case USB_VENDOR_SIIG2:
switch( uaa->product ){
case USB_PRODUCT_SIIG2_US2308:
@ -524,6 +541,8 @@ uftdi_param(void *vsc, int portno, struct termios *t)
case 230400: rate = ftdi_8u232am_b230400; break;
case 460800: rate = ftdi_8u232am_b460800; break;
case 921600: rate = ftdi_8u232am_b921600; break;
case 2000000: rate = ftdi_8u232am_b2000000; break;
case 3000000: rate = ftdi_8u232am_b3000000; break;
default:
return (EINVAL);
}

View File

@ -104,7 +104,9 @@ enum {
ftdi_8u232am_b115200 = 0x001a,
ftdi_8u232am_b230400 = 0x000d,
ftdi_8u232am_b460800 = 0x4006,
ftdi_8u232am_b921600 = 0x8003
ftdi_8u232am_b921600 = 0x8003,
ftdi_8u232am_b2000000 = 0x0001, /* special case for 2M baud */
ftdi_8u232am_b3000000 = 0x0000, /* special case for 3M baud */
};
/*

View File

@ -316,6 +316,7 @@ vendor GOHUBS 0x0921 GoHubs
vendor BIOMETRIC 0x0929 American Biometric Company
vendor TOSHIBA 0x0930 Toshiba Corporation
vendor PLEXTOR 0x093b Plextor Corp.
vendor INTREPIDCS 0x093c Intrepid Control Systems
vendor YANO 0x094f Yano
vendor KINGSTON 0x0951 Kingston Technology
vendor BLUEWATER 0x0956 BlueWater Systems
@ -803,6 +804,10 @@ product INTEL TESTBOARD 0x9890 82930 test board
/* Intersil products */
product INTERSIL PRISM_2X 0x3642 Prism2.x or Atmel WLAN
/* Interpid Control Systems products */
product INTREPIDCS VALUECAN 0x0601 ValueCAN CAN bus interface
product INTREPIDCS NEOVI 0x0701 NeoVI Blue vehicle bus interface
/* I/O DATA products */
product IODATA USBETT 0x0901 USB ETT
product IODATA USBETTX 0x0904 USB ETTX