[U-Boot-Users] Contribution: EHCI USB HC driver

Marcel Moolenaar marcelm at juniper.net
Mon Mar 3 19:18:18 CET 2008


On Mar 1, 2008, at 12:35 AM, Markus Klotzbücher wrote:

>>> At this time the EHCI driver is exclusive in that there's no support
>>> for having the companion controller active. I presume this is one of
>>> the major themes for adding EHCI support, so that's definitely open
>>> for discussion.
>
> This is definitely an issue, but not one that can or should be solved
> for the USB subsystem solely. What we really need to implement such
> features in a clean manner is a well thought out U-Boot Driver  
> Model...

Agreed. But for USB it also goes beyond just a driver model.
In particular we have:
	usb_lowlevel_init()
	usb_lowlevel_stop()
	submit_bulk_msg()
	submit_control_msg()
	submit_int_msg()

The functionality of the usb_lowlevel_*() functions will need
to be addressed by a driver abstraction. This leaves the
submit_*() functions. Those should be abstracted in the USB
stack itself and be directed to the HC driver to which the USB
device is attached. Something like function pointers in struct
usb_device should do the trick...

>>> Attached a patch with the common code changes as well as the EHCI
>>> driver itself. The patch does not contain any changes to get it  
>>> built
>>> (i.e. included in libusb, etc). A seasoned U-Boot developer should
>>> have no problem playing with it, while the details are being worked
>>> out for getting this alongside a USB 1.1 HC driver.
>
> Nice work! One thing we definitely will want to do is separate the
> low-level board/cpu specific and generic ehci code such as done for  
> the
> generic ohci driver. From a first look it doesn't seem this would be  
> too
> hard.

Agreed on both counts.

-- 
Marcel Moolenaar
marcelm at juniper.net





More information about the U-Boot mailing list