[U-Boot-Users] USB OHCI drivers unification
giometti at linux.it
Tue May 30 16:04:05 CEST 2006
I'm trying to unify the several USB OHCI drivers. First of all I
created two new files called "common/usb_ohci.c" and
Latter file is just a copy of several OHCI headers (for instance I
copy the file cpu/mips/au1x00_usb_ohci.h) and the former is an OHCI
driver modified as follow:
Functions "usb_lowlevel_init()" and "usb_lowlevel_stop()" have the
/* Specific board OHCI init */
dbg("OHCI board setup complete\n");
memset (&gohci, 0, sizeof (ohci_t));
memset (&urb_priv, 0, sizeof (urb_priv_t));
... bla bla ...
dbg("OHCI revision: 0x%08x\nRH: a: 0x%08x b: 0x%08x\n",
/* enable host controller */
if (usb_ohci_lowlevel_enable() < 0)
dbg("OHCI clock running\n");
if (hc_reset (&gohci) < 0)
... bla bla ...
err("OHCI initialization error\n");
/* Initialization failed */
/* this gets called really early - before the controller has */
/* even been initialized! */
/* TODO release any interrupts, etc. */
/* call hc_release_ohci() here ? */
/* disable host controller */
Where the new functions "usb_ohci_lowlevel_init()",
"usb_ohci_lowlevel_enable()" and "usb_ohci_lowlevel_disable()" will be
defined per CPUs into their own directories.
I'd like to know if this modification can be acceptable and who can
help me in testing and doing the patch for each platform using USB
OHCI. I can test and patch my board with MIPS au1100.
Also, I'd like to know how I should build my patch since I'm quite
sure that it could be greater than 40KB...
GNU/Linux Solutions e-mail: giometti at enneenne.com
Linux Device Driver giometti at gnudd.com
Embedded Systems giometti at linux.it
UNIX programming phone: +39 349 2432127
More information about the U-Boot