On Mon, January 28, 2013 11:29 am, Stuart Henderson wrote:
> Have you checked if this is still necessary? libusb on OpenBSD is now able to 
> talk to devices claimed by drivers other than ugen.

Yes, I suspect it is still necessary to use ugen.
It seems like libusb does not support bulk transfers otherwise.


uhub8 at uhub0 port 1 "Standard Microsystems product 0x2412" rev 2.00/b.b2 addr 
3
uftdi0 at uhub8 port 1 configuration 1 interface 0 "FTDI BeagleBone/XDS100V2" 
rev 2.00/7.00 addr 4
ucom0 at uftdi0 portno 1
uftdi1 at uhub8 port 1 configuration 1 interface 1 "FTDI BeagleBone/XDS100V2" 
rev 2.00/7.00 addr 4
ucom1 at uftdi1 portno 2

$ openocd -f /usr/local/share/openocd/scripts/board/ti_beaglebone.cfg
Open On-Chip Debugger 0.6.1 (2013-01-29-22:25)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter speed: 16000 kHz
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
Warn : unable to open ftdi device (trying more): device not found
Error: ftdi_write_data: usb bulk write failed
Error: couldn't initialize data bits low byte
Error: couldn't initialize FT2232 with 'xds100v2' layout
in procedure 'init'

>
>
> Raphael Graf <r...@undefined.ch> wrote:
>
>>The diff below makes the jtag and serial interfaces of the beaglebone
>>(FT2232H)
>>work simultaneously.
>>This is how the beaglebone shows up:
>>
>>uhub8 at uhub0 port 1 "Standard Microsystems product 0x2412" rev
>>2.00/b.b2 addr 3
>>uftdi0 at uhub8 port 1 configuration 1 interface 1 "FTDI
>>BeagleBone/XDS100V2" rev 2.00/7.00 addr 4
>>ucom0 at uftdi0 portno 2
>>ugen0 at uhub8 port 1 configuration 1 "FTDI BeagleBone/XDS100V2" rev
>>2.00/7.00 addr 4
>>
>>Like this, openocd (using ugen) and cu both work.
>>
>>It is just assumed that interface 0 is used for jtag, not sure if this
>>is
>>always true. I'm also unsure if the diff would break other devices.
>>Can someone comment on this?
>>
>>Thanks
>>
>>
>>Index: uftdi.c
>>===================================================================
>>RCS file: /cvs/src/sys/dev/usb/uftdi.c,v
>>retrieving revision 1.63
>>diff -u -p -r1.63 uftdi.c
>>--- uftdi.c   11 Sep 2012 16:04:44 -0000      1.63
>>+++ uftdi.c   27 Jan 2013 13:20:53 -0000
>>@@ -748,28 +748,21 @@ int
>> uftdi_match(struct device *parent, void *match, void *aux)
>> {
>>      struct usb_attach_arg *uaa = aux;
>>-     usbd_status err;
>>      u_int8_t nifaces;
>>
>>      if (usb_lookup(uftdi_devs, uaa->vendor, uaa->product) == NULL)
>>              return (UMATCH_NONE);
>>
>>      /* Get the number of interfaces. */
>>-     if (uaa->iface != NULL) {
>>+     if (uaa->iface != NULL)
>>              nifaces = uaa->nifaces;
>>-     } else {
>>-             err = usbd_set_config_index(uaa->device, UFTDI_CONFIG_INDEX, 1);
>>-             if (err)
>>-                     return (UMATCH_NONE);
>>-             err = usbd_interface_count(uaa->device, &nifaces);
>>-             if (err)
>>-                     return (UMATCH_NONE);
>>-             usbd_set_config_index(uaa->device, USB_UNCONFIG_INDEX, 1);
>>-     }
>>+     else
>>+             return UMATCH_NONE;
>>
>>      /* JTAG on USB interface 0 */
>>      if (uaa->vendor == USB_VENDOR_FTDI &&
>>-         uaa->product == USB_PRODUCT_FTDI_OPENRD &&
>>+         (uaa->product == USB_PRODUCT_FTDI_OPENRD ||
>>+         uaa->product == USB_PRODUCT_FTDI_SERIAL_2232C) &&
>>          uaa->ifaceno == 0)
>>              return (UMATCH_NONE);
>
>

Reply via email to