[LinuxBIOS] #57: libusb host program for PLX NET20DC debug device

Eric W. Biederman ebiederm at xmission.com
Sat Dec 2 00:13:39 CET 2006

Greg KH <gregkh at suse.de> writes:

> On Fri, Dec 01, 2006 at 10:55:48AM -0800, Lu, Yinghai wrote:
>> -----Original Message-----
>> From: Greg KH [mailto:gregkh at suse.de] 
>> >I can do that in about 15 minutes if you give me the device ids for the
>> >usb debug device that you wish to have.
>> >Or you can also use the generic usb-serial driver today just fine with
>> >no modification.  Have you had a problem with using that option?
>> We are talking about using USB debug device/EHCI debug port in LinuxBIOS
>> in legacy free PC.
>> Because one AM2+MCP55 MB doesn't have serial port.
>> I guess Eric is working on USB debug device/EHCI debug port for
>> earlyprintk or printk.
> Well, earlyprintk will not work, as you need PCI up and running.
> And I have some code that barely works for this already, perhaps Eric
> and I should work together on this :)

I'd love to work with someone on this.  I'm cc'ing Andi Kleen because
he asked me where we had gotten on this the other day.

One big thing we need is a way to tell if you have the
system booted if your device is plugged into the usb port that
connects to the usb debug port.  Figuring out which usb port
you really have to plug into is still trying and error but at
least being able to tell without having to try the code is good.

So here is my mostly somewhat working code.  I don't understand
what you have todo if you want to reset the device and then
find the device so this code currently only works if you have
ehci_hcd already loaded. 

I am avoiding the pci bit simply by having someone pass me the
hard coded numbers...

I think I can get it down to a single base address if I don't
print debugging of which port you are plugged into, or try and
debug the state out of reset.

usbtest.c is my little libusb client program.  It's useful
for exploring things.

usbdebug_direct.c is roughly a driver living in user space
so I can debug the hard bits of the logic.  Not a good production
technique but great for prototyping.  It has all of the basic
primitives needed to actually use the ehci debug port.

The next big thing for me I guess is to modify a kernel and see
what state the usb ports are in when I am booting and how much
of the reset logic I need to understand to make this work.
Greg I expect you understand that a little better than I do.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: usbtest.c
Type: text/x-csrc
Size: 7104 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20061201/aa9bd8c3/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: usbdebug_direct.c
Type: text/x-csrc
Size: 17393 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20061201/aa9bd8c3/attachment-0001.c>

More information about the coreboot mailing list