USB: ftdi_sio: enable two UART ports on ST Microconnect Lite
The FT4232H used in the ST Micro Connect Lite has four hi-speed UART ports. The first two ports are reserved for the JTAG interface. We enable by default ports 2 and 3 as UARTs (where port 2 is a conventional RS-232 UART) Signed-off-by: Adrian Thomasset <adrian.thomasset@st.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ee5d5499ed
commit
71d9a2b95f
@ -1789,20 +1789,24 @@ static int ftdi_8u2232c_probe(struct usb_serial *serial)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First and second port on STMCLiteadaptors is reserved for JTAG interface
|
* First two ports on JTAG adaptors using an FT4232 such as STMicroelectronics's
|
||||||
* and the forth port for pio
|
* ST Micro Connect Lite are reserved for JTAG or other non-UART interfaces and
|
||||||
|
* can be accessed from userspace.
|
||||||
|
* The next two ports are enabled as UARTs by default, where port 2 is
|
||||||
|
* a conventional RS-232 UART.
|
||||||
*/
|
*/
|
||||||
static int ftdi_stmclite_probe(struct usb_serial *serial)
|
static int ftdi_stmclite_probe(struct usb_serial *serial)
|
||||||
{
|
{
|
||||||
struct usb_device *udev = serial->dev;
|
struct usb_device *udev = serial->dev;
|
||||||
struct usb_interface *interface = serial->interface;
|
struct usb_interface *interface = serial->interface;
|
||||||
|
|
||||||
if (interface == udev->actconfig->interface[2])
|
if (interface == udev->actconfig->interface[0] ||
|
||||||
return 0;
|
interface == udev->actconfig->interface[1]) {
|
||||||
|
dev_info(&udev->dev, "Ignoring serial port reserved for JTAG\n");
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
dev_info(&udev->dev, "Ignoring serial port reserved for JTAG\n");
|
return 0;
|
||||||
|
|
||||||
return -ENODEV;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user