public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] NEC OHCI chip bug
@ 2010-12-17  3:49 gavinguo at andestech.com
  2010-12-17  7:49 ` Martin Mueller
  0 siblings, 1 reply; 11+ messages in thread
From: gavinguo at andestech.com @ 2010-12-17  3:49 UTC (permalink / raw)
  To: u-boot

> not sure if the PCI bus number plays a role here. In our case the PCI
> window size was not set correctly so that the OHCI access to the PCI
> bus/RAM was refused.

I found it strange that 2 devices are detected, and we can get descriptor
from hub descriptor. And the "Unrecoverable Error" is occurred when 
getting device descriptor from keyboard. So whether this still relate to PCI 
bridge setting problem?


Regards,
Gavin Guo

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [U-Boot] NEC OHCI chip bug
@ 2010-12-17  9:39 Martin Mueller
  2010-12-21  6:43 ` Macpaul Lin
  0 siblings, 1 reply; 11+ messages in thread
From: Martin Mueller @ 2010-12-17  9:39 UTC (permalink / raw)
  To: u-boot

Hi Gavin,

> > detection might work without PCI slave-initiated transfer and the
> > root hub is OHCI internal. But - just guessing. If you have double
> > checked the window there are no more ideas from my side.
> 
> Do you setup host bridge window base & size? Exactly, I didn??t set
> it before. Suppose, PCI devices on bus 0 should work, right ?

yes, usually at least size is set in a register. The documentation of 
your (PCI) hardware can be a valuable source of information here.

Regards,
Martin

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [U-Boot] NEC OHCI chip bug
@ 2010-12-17  9:25 gavinguo at andestech.com
  0 siblings, 0 replies; 11+ messages in thread
From: gavinguo at andestech.com @ 2010-12-17  9:25 UTC (permalink / raw)
  To: u-boot

> detection might work without PCI slave-initiated transfer and the
> root hub is OHCI internal. But - just guessing. If you have double
> checked the window there are no more ideas from my side.

Do you setup host bridge window base & size? Exactly, I didn?t set
it before. Suppose, PCI devices on bus 0 should work, right ?

Regards,
Gavin

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [U-Boot] NEC OHCI chip bug
@ 2010-12-16  9:46 Martin Mueller
  0 siblings, 0 replies; 11+ messages in thread
From: Martin Mueller @ 2010-12-16  9:46 UTC (permalink / raw)
  To: u-boot

Hi Gavin,

> > are you sure it is that NEC bug? We had a similar error message when the
> > PCI bridge was not properly setup and the OHCI could not access RAM
> > through PCI (DMA), hence the "unrecoverable error".
>
> The bus/dev/func/ number of OHCI host controller are 0/8/0 and 0/8/1, bus
> number is 0 of both devices. I think that PCI bridge need setup if the bus
> number is other than 0? Is that correct?

not sure if the PCI bus number plays a role here. In our case the PCI
window size was not set correctly so that the OHCI access to the PCI
bus/RAM was refused.

Regards,
Martin

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [U-Boot] NEC OHCI chip bug
@ 2010-12-16  2:11 gavinguo at andestech.com
  0 siblings, 0 replies; 11+ messages in thread
From: gavinguo at andestech.com @ 2010-12-16  2:11 UTC (permalink / raw)
  To: u-boot

Hi Martin,

> are you sure it is that NEC bug? We had a similar error message when the 
> PCI bridge was not properly setup and the OHCI could not access RAM 
> through PCI (DMA), hence the "unrecoverable error".

The bus/dev/func/ number of OHCI host controller are 0/8/0 and 0/8/1, bus number is 0 of both devices. I think that PCI bridge need setup if the bus number is other than 0? Is that correct?

Thanks

Regards,
Gavin

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [U-Boot]  NEC OHCI chip bug
@ 2010-12-15 10:19 Martin Mueller
  0 siblings, 0 replies; 11+ messages in thread
From: Martin Mueller @ 2010-12-15 10:19 UTC (permalink / raw)
  To: u-boot

Hi Gavin ,

> We need NEC pci-to-usb host controller work on U-boot. Because
> using Faraday technology PCI controller, I need to complete the PCI
> driver first. Now the PCI driver is completed. At this time, the
> NEC host controller can work. When plugging a keyboard, 2 devices
> can be found showing on console. But things are not as easy as we
> think, OHCI host controller encounter an "Unrecoverable Error"
> when getting device descriptor from keyboard. In the Linux kernel,
> I found that there is a workaround if the OHCI host controller is
> NEC's. The following link explain more detail: 
> http://www.mail-archive.com/linux-usb-devel at lists.sourceforge.net/msg54465.html
> After looking at the source code in U-boot, it seems that there 
> isn't any workaround about the NEC's bug ? Any idea about how to
> get the controller, or do I need to implement the workaround by 
> myself ??

are you sure it is that NEC bug? We had a similar error message when 
the PCI bridge was not properly setup and the OHCI could not access 
RAM through PCI (DMA), hence the "unrecoverable error".

Martin

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [U-Boot] NEC OHCI chip bug
@ 2010-12-15  8:32 gavinguo at andestech.com
  0 siblings, 0 replies; 11+ messages in thread
From: gavinguo at andestech.com @ 2010-12-15  8:32 UTC (permalink / raw)
  To: u-boot

> Seems you have to implement this workaround for U-Boot.  Patches
> welcome.

Ok, I will try my best to figure out how to implement this one.

> And *PLEASE* restrict your line length to some 70 or so characters.

Thank you for the reminder. I have modified the setting to 70 characters a line.

Regards,
Gavin Guo

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [U-Boot] NEC OHCI chip bug
@ 2010-12-15  6:21 gavinguo at andestech.com
  2010-12-15  7:26 ` Wolfgang Denk
  0 siblings, 1 reply; 11+ messages in thread
From: gavinguo at andestech.com @ 2010-12-15  6:21 UTC (permalink / raw)
  To: u-boot

Hi All,
Let's me explain the story first.
We need NEC pci-to-usb host controller work on U-boot. Because using Faraday technology PCI controller, I need to complete the PCI driver first. Now the PCI driver is completed. At this time, the NEC host controller can work. When plugging a keyboard, 2 devices can be found showing on console. But things are not as easy as we think, OHCI host controller encounter an "Unrecoverable Error" when getting device descriptor from keyboard. In the Linux kernel, I found that there is a workaround if the OHCI host controller is NEC's. The following link explain more detail: http://www.mail-archive.com/linux-usb-devel at lists.sourceforge.net/msg54465.html. After looking at the source code in U-boot, it seems that there isn't any workaround about the NEC's bug ? Any idea about how to get the controller, or do I need to implement the workaround by myself ??

The following is the debug message when "usb start":
NDS32 # usb start
(Re)start USB...
USB:   ftpci pci_find_devices
OHCI pci controller (1033, 0035) found @(0:8:0)
OHCI regs address 0xa0000000
scanning bus for devices... New Device 0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x40
set address 1
usb_control_msg: request: 0x5, requesttype: 0x0, value 0x1 index 0x0 length 0x0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x12
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x9
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0 length 0x19
get_conf_no 0 Result 25, wLength 25
if 0, ep 0
##EP epmaxpacketin[1] = 2
set configuration 1
usb_control_msg: request: 0x9, requesttype: 0x0, value 0x1 index 0x0 length 0x0
new device strings: Mfr=0, Product=1, SerialNumber=0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x300 index 0x0 length 0xFF
USB device number 1 default language ID 0x409
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x301 index 0x409 length 0xFF
Manufacturer
Product      OHCI Root Hub
SerialNumber
USB hub found
usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0 length 0x4
usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0 length 0x9
3 ports detected
ganged power switching
standalone hub
individual port over-current protection
power on to power good time: 30ms
hub controller current requirement: 0mA
port 1 is removable
port 2 is removable
port 3 is removable
usb_control_msg: request: 0x0, requesttype: 0xA0, value 0x0 index 0x0 length 0x4
get_hub_status returned status 0, change 0
local power source is good
no over-current condition exists
enabling power on all ports
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x8 index 0x1 length 0x0
port 1 returns 0
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x8 index 0x2 length 0x0
port 2 returns 0
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x8 index 0x3 length 0x0
port 3 returns 0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length 0x4
Port 1 Status 100 Change 0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x2 length 0x4
Port 2 Status 301 Change 1
port 2 connection change
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x2 length 0x4
portstatus 301, change 1, 1.5 Mb/s
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x10 index 0x2 length 0x0
hub_port_reset: resetting port 1...
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x2 length 0x0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x2 length 0x4
portstatus 303, change 10, 1.5 Mb/s
STAT_C_CONNECTION = 0 STAT_CONNECTION = 1  USB_PORT_STAT_ENABLE 1
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x14 index 0x2 length 0x0
New Device 1
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x40
ERROR: OHCI Unrecoverable Error, controller usb-ohci_ftpci disabled
usb_new_device: usb_get_descriptor() failed
hub: disabling port 2
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x1 index 0x2 length 0x0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x3 length 0x4
Port 3 Status 100 Change 0
2 USB Device(s) found
drv_usb_kbd_init
scan end

Best Regards,
Gavin Guo

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-12-21  6:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-17  3:49 [U-Boot] NEC OHCI chip bug gavinguo at andestech.com
2010-12-17  7:49 ` Martin Mueller
  -- strict thread matches above, loose matches on Subject: below --
2010-12-17  9:39 Martin Mueller
2010-12-21  6:43 ` Macpaul Lin
2010-12-17  9:25 gavinguo at andestech.com
2010-12-16  9:46 Martin Mueller
2010-12-16  2:11 gavinguo at andestech.com
2010-12-15 10:19 Martin Mueller
2010-12-15  8:32 gavinguo at andestech.com
2010-12-15  6:21 gavinguo at andestech.com
2010-12-15  7:26 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox