From: Gerhard Jaeger <g.jaeger@sysgo.com>
To: linuxppc-embedded@ozlabs.org
Subject: Re: USB support for Bamboo/440EP (Yosemite/440EPx)
Date: Tue, 15 May 2007 09:27:29 +0200 [thread overview]
Message-ID: <200705150927.29798.g.jaeger@sysgo.com> (raw)
In-Reply-To: <OFC56C5EA1.CC32B615-ON872572DB.0063BF4F-852572DB.00653577@us.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 2161 bytes --]
On Montag, 14. Mai 2007, Stephen Winiecki wrote:
> Gerhard Jaeger <g.jaeger@sysgo.com> wrote on 05/14/2007 10:31:04 AM:
> > Hi Stephen,
> >
> > I also played with Bamboo and Yosemite USB and found out, that the OHCI
> > ISR contains an assumption that makes the 440 OHCI implementation sometimes
> > stop when having a timeout condition. Find the following sequence @function
> > ohci_irq() (in file ohci-hcd.c) and disable the following code:
> >
> > if ((ohci->hcca->done_head != 0)
> > && ! (hc32_to_cpup (ohci, &ohci->hcca->done_head)
> > & 0x01)) {
> > ints = OHCI_INTR_WDH;
> > }
> >
> > This should make the USB host work reliably on the 440s.
> >
> Thanks Gerhard. This definitely makes things work better - I have had
> 100% success in both the kernel and X recognizing the devices and having X
> boot with this update.
>
> However, I am occasionally still having an issue after X comes up with the
> keyboard not working (mouse working fine). Just to be clear - I only want
> to comment out the code you indicated above - not also any/either of the
> else/if clauses, correct?
Yes - the lines mentioned didn't care about irq-status register
and try to figure out from some context, how the irq-status register
should look like - but this in fact does not work correctly for the
440 OHCI implementation...
> So has this never been formally reported/patched?
Not that I'm aware of, I discovered that a few days ago.
> Do you know also why
> the USB support has not been configured in the mainline kernel for these
> platforms - is it due to known existing issues?
I don't know why this is not part of the mainline kernel. On the PPC
side there is currently a lot of restructure work going on, so I guess
this is only a question of time, when the necessary patches will go
into the mainline.
Please find the patch for the ohc-hcd.c in the attachment.
Ciao,
Gerhard
--
Gerhard Jaeger <gjaeger@sysgo.com>
SYSGO AG Embedded and Real-Time Software
www.sysgo.com | www.elinos.com | www.pikeos.com | www.osek.de
[-- Attachment #2: ppc440-ohci.patch --]
[-- Type: text/x-diff, Size: 1055 bytes --]
This patch makes the OHCI code work correctly on AMCC PPC440
cpus with internal USB-host controller. It seems that the
optimization is not allowed for this OHCI implementation.
Signed-off-by: Gerhard Jaeger <gjaeger@sysgo.com>
---
--- linux/drivers/usb/host/ohci-hcd.c.orig 2007-03-09 11:33:39.000000000 +0100
+++ linux/drivers/usb/host/ohci-hcd.c 2007-05-15 09:03:50.000000000 +0200
@@ -646,13 +646,16 @@ static irqreturn_t ohci_irq (struct usb_
/* we can eliminate a (slow) ohci_readl()
if _only_ WDH caused this irq */
+#if !(defined(CONFIG_USB_OHCI_HCD_PPC_SOC) && (defined(CONFIG_440EP) || defined(CONFIG_440EPX)))
if ((ohci->hcca->done_head != 0)
&& ! (hc32_to_cpup (ohci, &ohci->hcca->done_head)
& 0x01)) {
ints = OHCI_INTR_WDH;
/* cardbus/... hardware gone before remove() */
- } else if ((ints = ohci_readl (ohci, ®s->intrstatus)) == ~(u32)0) {
+ } else
+#endif
+ if ((ints = ohci_readl (ohci, ®s->intrstatus)) == ~(u32)0) {
disable (ohci);
ohci_dbg (ohci, "device removed!\n");
return IRQ_HANDLED;
prev parent reply other threads:[~2007-05-15 7:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-14 14:07 USB support for Bamboo/440EP (Yosemite/440EPx) Stephen Winiecki
2007-05-14 14:31 ` Gerhard Jaeger
2007-05-14 18:25 ` Stephen Winiecki
2007-05-15 7:27 ` Gerhard Jaeger [this message]
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=200705150927.29798.g.jaeger@sysgo.com \
--to=g.jaeger@sysgo.com \
--cc=linuxppc-embedded@ozlabs.org \
/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;
as well as URLs for NNTP newsgroup(s).