tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Merging ugen into the usb stack



Hi folks,

I have a Guruplug JTAG device (and right now need to use it to unbrick
one of my Guruplugs after some ... stupid u-boot experiment).

The device is supported by openocd, which we have in pkgsrc. The driver
used is:

http://openocd.org/doc/html/Debug-Adapter-Configuration.html#Debug-Adapter-Configuration
(search for ftdi):

Interface Driver: ftdi

    This driver is for adapters using the MPSSE
    (Multi-Protocol Synchronous Serial Engine) mode
    built into many FTDI chips, such as the FT2232,
    FT4232 and FT232H.

    The driver is using libusb-1.0 in asynchronous
    mode to talk to the FTDI device, bypassing
    intermediate libraries like libftdi or D2XX. 


For the recovery procedure I need access to the serial console at the
same time. The uftdi jtag luckily offers that as well.

However, it can not work with the way NetBSD uses ugen devices:

uftdi0 at uhub3 port 2
uftdi0: FTDI (0x9e88) SheevaPlug JTAGKey FT2232D B (0x9e8f), rev 2.00/5.00, addr 3
ucom0 at uftdi0 portno 1
ucom1 at uftdi0 portno 2

I can disable the ucom at uftdi0 portno 1, but there is no way to get a ugen
device to attach there.

The uftdi chip itself offers a separate interface for each of the ports,
at that layer there should not be a problem.

I could hack uftdi to allow attaching a ugen child, but that sounds like a
very special hack. Jared suggested to instead make ugen not a separate device,
but globaly fold it into the usb stack. That would also solve similar issues
we have seen with usb scanner devices and ulpts.

So, how should we proceed here?

Martin


Home | Main Index | Thread Index | Old Index