* USB support for Bamboo/440EP (Yosemite/440EPx)
@ 2007-05-14 14:07 Stephen Winiecki
2007-05-14 14:31 ` Gerhard Jaeger
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Winiecki @ 2007-05-14 14:07 UTC (permalink / raw)
To: linuxppc-embedded
Is there an intention to add the configuration for the USB host controller
for Bamboo/Yosemite to the mainline kernel? drivers/usb/host contains
ohci-ppc-soc.c/h, but the Kconfig isn't updated to include it for
440EP/EPx?
I noticed it is configured in the Denx 4.1 2.6.19.2 kernel. When I
updated the 2.6.21 drivers/usb/host/Kconfig to include the controller
support for 440EP for some reason I couldn't get the kernel to recognize
the controller or devices when it boots - not sure if there is something
else I am missing here? One thing I noticed was that in the 2.6.19.2
kernel CONFIG_USB_OHCI_BIG_ENDIAN gets defined - in 2.6.21 there is both
CONFIG_USB_OHCI_BIG_ENDIAN_DESC and CONFIG_USB_OHCI_BIG_ENDIAN_MMIO -
assume I want both defined?
Wondering also if anyone has much experience using the USB interface on
Bamboo - and if any reliability issues have been observed? I have a
Bamboo system where we've added graphics card init capability to PIBS and
are using the DENX 2.6.19.2 kernel and booting X (Xorg 7.1.1 - Debian 4.0
system on hard disk) with a USB keyboard and mouse - and sometimes the
mouse/keyboard are not detected properly by either the kernel on boot, or
by X during its initialization (sometimes even after the kernel seems to
detect everything fine). I did play a bit with a memory stick on the
interface and that seemed reliable for the little I did with it.
I am using an Apple keyboard plugged into the USB port on the board, with
an IBM Scrollpoint USB mouse plugged into one of the ports on the
keyboard.
An excerpt of the kernel boot when it finds everything OK:
...
IBM mouse - input driver mouse interface
hde: cache flushes supported
hde: hde1 hde2 hde3
ppc-soc-ohci ppc-soc-ohci.0: USB Host Controller
ppc-soc-ohci ppc-soc-ohci.0: new USB bus registered, assigned bus number 1
ppc-soc-ohci ppc-soc-ohci.0: irq 40, io mem 0xef601000
usb usb1: Product: USB Host Controller
usb usb1: Manufacturer: Linux 2.6.19.2 ohci_hcd
usb usb1: SerialNumber: PPC-SOC USB
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
pegasus: v0.6.14 (2006/09/27), Pegasus/Pegasus II USB Ethernet driver
usbcore: registered new interface driver pegasus
i8042.c: No controller found.
mice: PS/2 mouse device common for all mice
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
usb 1-1: new full speed USB device using ppc-soc-ohci and address 2
usb 1-1: Product: Hub in Apple Extended USB Keyboard
usb 1-1: Manufacturer: Mitsumi Electric
usb 1-1: configuration #1 chosen from 1 choice
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 3 ports detected
eth0: link is up, 100 FDX, pause enabled
eth1: link is down
usb 1-1.1: new low speed USB device using ppc-soc-ohci and address 3
usb 1-1.1: configuration #1 chosen from 1 choice
input: HID 04b3:3100 as /class/input/input0
input: USB HID v1.00 Mouse [HID 04b3:3100] on usb-PPC-SOC USB-1.1
usb 1-1.3: new full speed USB device using ppc-soc-ohci and address 4
usb 1-1.3: Product: Apple Extended USB Keyboard
usb 1-1.3: Manufacturer: Mitsumi Electric
usb 1-1.3: configuration #1 chosen from 1 choice
input: Mitsumi Electric Apple Extended USB Keyboard as /class/input/input1
input: USB HID v1.10 Keyboard [Mitsumi Electric Apple Extended USB
Keyboard] on
usb-PPC-SOC USB-1.3
input: Mitsumi Electric Apple Extended USB Keyboard as /class/input/input2
input: USB HID v1.10 Device [Mitsumi Electric Apple Extended USB Keyboard]
on us
b-PPC-SOC USB-1.3
Sending DHCP requests .,. OK
...
Sometimes though it does not find the mouse:
...
hde: 78140160 sectors (40007 MB) w/8192KiB Cache, CHS=65535/16/63
hde: cache flushes supported
hde: hde1 hde2 hde3
ppc-soc-ohci ppc-soc-ohci.0: USB Host Controller
ppc-soc-ohci ppc-soc-ohci.0: new USB bus registered, assigned bus number 1
ppc-soc-ohci ppc-soc-ohci.0: irq 40, io mem 0xef601000
usb usb1: Product: USB Host Controller
usb usb1: Manufacturer: Linux 2.6.19.2 ohci_hcd
usb usb1: SerialNumber: PPC-SOC USB
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
pegasus: v0.6.14 (2006/09/27), Pegasus/Pegasus II USB Ethernet driver
usb 1-1: new full speed USB device using ppc-soc-ohci and address 2
usb 1-1: Product: Hub in Apple Extended USB Keyboard
usb 1-1: Manufacturer: Mitsumi Electric
usb 1-1: configuration #1 chosen from 1 choice
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 3 ports detected
usb 1-1.1: new low speed USB device using ppc-soc-ohci and address 3
usb 1-1.3: new full speed USB device using ppc-soc-ohci and address 4
usb 1-1.3: Product: Apple Extended USB Keyboard
usb 1-1.3: Manufacturer: Mitsumi Electric
usb 1-1.3: configuration #1 chosen from 1 choice
input: Mitsumi Electric Apple Extended USB Keyboard as /class/input/input0
input: USB HID v1.10 Keyboard [Mitsumi Electric Apple Extended USB
Keyboard] on
usb-PPC-SOC USB-1.3
input: Mitsumi Electric Apple Extended USB Keyboard as /class/input/input1
input: USB HID v1.10 Device [Mitsumi Electric Apple Extended USB Keyboard]
on us
b-PPC-SOC USB-1.3
usbcore: registered new interface driver pegasus
i8042.c: No controller found.
mice: PS/2 mouse device common for all mice
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
eth0: link is up, 100 FDX, pause enabled
eth1: link is down
Sending DHCP requests .,. OK
...
And on rarer occasions it does not seem to fully discover the keyboard:
...
hde: 78140160 sectors (40007 MB) w/8192KiB Cache, CHS=65535/16/63
hde: cache flushes supported
hde: hde1 hde2 hde3
ppc-soc-ohci ppc-soc-ohci.0: USB Host Controller
ppc-soc-ohci ppc-soc-ohci.0: new USB bus registered, assigned bus number 1
ppc-soc-ohci ppc-soc-ohci.0: irq 40, io mem 0xef601000
usb usb1: Product: USB Host Controller
usb usb1: Manufacturer: Linux 2.6.19.2 ohci_hcd
usb usb1: SerialNumber: PPC-SOC USB
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
pegasus: v0.6.14 (2006/09/27), Pegasus/Pegasus II USB Ethernet driver
usbcore: registered new interface driver pegasus
i8042.c: No controller found.
mice: PS/2 mouse device common for all mice
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
usb 1-1: new full speed USB device using ppc-soc-ohci and address 2
usb 1-1: Product: Hub in Apple Extended USB Keyboard
usb 1-1: Manufacturer: Mitsumi Electric
usb 1-1: configuration #1 chosen from 1 choice
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 3 ports detected
eth0: link is up, 100 FDX, pause enabled
eth1: link is down
usb 1-1.1: new low speed USB device using ppc-soc-ohci and address 3
usb 1-1.3: new full speed USB device using ppc-soc-ohci and address 4
Sending DHCP requests .,. OK
...
One typical fail scenario is that the keyboard/mouse seem to be detected
fine by the kernel, but X doesn't start because it can't locate the mouse
device (messages in /var/log/Xorg.0.log).
I did find the following power down sequence which does seem to result in
reliable detection/operation whenever stopping/starting the system:
- Shutdown from X Desktop
- When Linux console 'power down' message appears, (with power still on)
unplug then plug the keyboard from/into the USB port
- Power down the board
- Turn the power supply off/on
Thanks,
Steve
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: USB support for Bamboo/440EP (Yosemite/440EPx)
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
0 siblings, 1 reply; 4+ messages in thread
From: Gerhard Jaeger @ 2007-05-14 14:31 UTC (permalink / raw)
To: linuxppc-embedded
On Montag, 14. Mai 2007, Stephen Winiecki wrote:
> Is there an intention to add the configuration for the USB host controller
> for Bamboo/Yosemite to the mainline kernel? drivers/usb/host contains
> ohci-ppc-soc.c/h, but the Kconfig isn't updated to include it for
> 440EP/EPx?
>
> I noticed it is configured in the Denx 4.1 2.6.19.2 kernel. When I
> updated the 2.6.21 drivers/usb/host/Kconfig to include the controller
> support for 440EP for some reason I couldn't get the kernel to recognize
> the controller or devices when it boots - not sure if there is something
> else I am missing here? One thing I noticed was that in the 2.6.19.2
> kernel CONFIG_USB_OHCI_BIG_ENDIAN gets defined - in 2.6.21 there is both
> CONFIG_USB_OHCI_BIG_ENDIAN_DESC and CONFIG_USB_OHCI_BIG_ENDIAN_MMIO -
> assume I want both defined?
>
> Wondering also if anyone has much experience using the USB interface on
> Bamboo - and if any reliability issues have been observed? I have a
> Bamboo system where we've added graphics card init capability to PIBS and
> are using the DENX 2.6.19.2 kernel and booting X (Xorg 7.1.1 - Debian 4.0
> system on hard disk) with a USB keyboard and mouse - and sometimes the
> mouse/keyboard are not detected properly by either the kernel on boot, or
> by X during its initialization (sometimes even after the kernel seems to
> detect everything fine). I did play a bit with a memory stick on the
> interface and that seemed reliable for the little I did with it.
>
> I am using an Apple keyboard plugged into the USB port on the board, with
> an IBM Scrollpoint USB mouse plugged into one of the ports on the
> keyboard.
[SNIPSNAP]
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.
HTH
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: USB support for Bamboo/440EP (Yosemite/440EPx)
2007-05-14 14:31 ` Gerhard Jaeger
@ 2007-05-14 18:25 ` Stephen Winiecki
2007-05-15 7:27 ` Gerhard Jaeger
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Winiecki @ 2007-05-14 18:25 UTC (permalink / raw)
To: linuxppc-embedded; +Cc: g.jaeger
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?
So has this never been formally reported/patched? 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?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: USB support for Bamboo/440EP (Yosemite/440EPx)
2007-05-14 18:25 ` Stephen Winiecki
@ 2007-05-15 7:27 ` Gerhard Jaeger
0 siblings, 0 replies; 4+ messages in thread
From: Gerhard Jaeger @ 2007-05-15 7:27 UTC (permalink / raw)
To: linuxppc-embedded
[-- 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;
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-05-15 7:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).