From: Rodolfo Giometti <giometti@linux.it>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] USB OHCI drivers unification
Date: Tue, 30 May 2006 16:04:05 +0200 [thread overview]
Message-ID: <20060530140405.GB21734@enneenne.com> (raw)
Hello,
I'm trying to unify the several USB OHCI drivers. First of all I
created two new files called "common/usb_ohci.c" and
"include/usb_ohci.h".
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
form:
int usb_lowlevel_init(void)
{
/* Specific board OHCI init */
usb_ohci_lowlevel_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",
readl(&gohci.regs->revision),
readl(&gohci.regs->roothub.a), readl(&gohci.regs->roothub.b));
/* enable host controller */
if (usb_ohci_lowlevel_enable() < 0)
goto errout;
dbg("OHCI clock running\n");
if (hc_reset (&gohci) < 0)
goto errout;
... bla bla ...
errout:
err("OHCI initialization error\n");
hc_release_ohci (&gohci);
/* Initialization failed */
usb_ohci_lowlevel_disable();
return -1;
}
int usb_lowlevel_stop(void)
{
/* this gets called really early - before the controller has */
/* even been initialized! */
if (!ohci_inited)
return 0;
/* TODO release any interrupts, etc. */
/* call hc_release_ohci() here ? */
hc_reset (&gohci);
/* disable host controller */
usb_ohci_lowlevel_disable();
return 0;
}
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...
Ciao,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti at enneenne.com
Linux Device Driver giometti at gnudd.com
Embedded Systems giometti@linux.it
UNIX programming phone: +39 349 2432127
next reply other threads:[~2006-05-30 14:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-30 14:04 Rodolfo Giometti [this message]
2006-05-30 14:17 ` [U-Boot-Users] USB OHCI drivers unification Wolfgang Denk
[not found] ` <20060530145421.GU21995@enneenne.com>
2006-05-31 8:43 ` Markus Klotzbücher
2006-05-31 9:21 ` Rodolfo Giometti
2006-05-31 10:29 ` Markus Klotzbücher
2006-05-31 10:34 ` Rodolfo Giometti
2006-05-31 12:11 ` Markus Klotzbücher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060530140405.GB21734@enneenne.com \
--to=giometti@linux.it \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox