1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Refine r237102 a bit:

- Anounce JTAG interfaces deliberately skipped.
- Bring back empty lines too eagerly removed.

MFC after:	3 days
This commit is contained in:
Marius Strobl 2012-06-18 19:18:31 +00:00
parent 78c3ff73c1
commit f3b44896bb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=237236
2 changed files with 16 additions and 4 deletions

View File

@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$");
*/
/*
* FTDI FT8U100AX serial adapter driver
* FTDI FT2232x, FT8U100AX and FT8U232AM serial adapter driver
*/
#include <sys/stdint.h>
@ -278,9 +278,15 @@ uftdi_probe(device_t dev)
*/
id = usbd_lookup_id_by_info(uftdi_devs, sizeof(uftdi_devs),
&uaa->info);
if (id == NULL || ((id->driver_info & UFTDI_FLAG_JTAG) != 0 &&
uaa->info.bIfaceIndex == UFTDI_IFACE_INDEX_JTAG))
if (id == NULL)
return (ENXIO);
if ((id->driver_info & UFTDI_FLAG_JTAG) != 0 &&
uaa->info.bIfaceIndex == UFTDI_IFACE_INDEX_JTAG) {
printf("%s: skipping JTAG interface at %u.%u\n",
device_get_name(dev), usbd_get_bus_index(uaa->device),
usbd_get_device_index(uaa->device));
return (ENXIO);
}
uaa->driver_info = id->driver_info;
return (BUS_PROBE_SPECIFIC);
}

View File

@ -70,6 +70,7 @@
#define FTDI_SIO_RESET_SIO 0
#define FTDI_SIO_RESET_PURGE_RX 1
#define FTDI_SIO_RESET_PURGE_TX 2
/*
* BmRequestType: 0100 0000B
* bRequest: FTDI_SIO_SET_BAUDRATE
@ -133,6 +134,7 @@ enum {
#define FTDI_SIO_SET_DATA_STOP_BITS_15 (0x1 << 11)
#define FTDI_SIO_SET_DATA_STOP_BITS_2 (0x2 << 11)
#define FTDI_SIO_SET_BREAK (0x1 << 14)
/*
* BmRequestType: 0100 0000B
* bRequest: FTDI_SIO_MODEM_CTRL
@ -168,6 +170,7 @@ enum {
#define FTDI_SIO_SET_RTS_MASK 0x2
#define FTDI_SIO_SET_RTS_HIGH (2 | ( FTDI_SIO_SET_RTS_MASK << 8))
#define FTDI_SIO_SET_RTS_LOW (0 | ( FTDI_SIO_SET_RTS_MASK << 8))
/*
* BmRequestType: 0100 0000b
* bRequest: FTDI_SIO_SET_FLOW_CTRL
@ -197,6 +200,7 @@ enum {
#define FTDI_SIO_RTS_CTS_HS 0x1
#define FTDI_SIO_DTR_DSR_HS 0x2
#define FTDI_SIO_XON_XOFF_HS 0x4
/*
* BmRequestType: 0100 0000b
* bRequest: FTDI_SIO_SET_EVENT_CHAR
@ -219,6 +223,7 @@ enum {
* data read so far - rather than wait 40ms or until 62 bytes are read
* which is what normally happens.
*/
/*
* BmRequestType: 0100 0000b
* bRequest: FTDI_SIO_SET_ERROR_CHAR
@ -237,6 +242,7 @@ enum {
* Set the parity error replacement character for the specified communications
* port.
*/
/*
* BmRequestType: 1100 0000b
* bRequest: FTDI_SIO_GET_MODEM_STATUS
@ -267,8 +273,8 @@ enum {
#define FTDI_SIO_DSR_MASK 0x20
#define FTDI_SIO_RI_MASK 0x40
#define FTDI_SIO_RLSD_MASK 0x80
/*
*
* DATA FORMAT
*
* IN Endpoint