Subject: USB on MIPS

From: "samavarthy c" <[email-masked]>
Date: Thu, 18 Dec 2003 19:58:36 +0530

Hi,

I am working on a PDA based board which has a NEC MIPS VR4131
processor.
The board has a companion chip MediaQ 1132 which has OHCI support
builtin.
The kernel used is MontaVista HardHat 2.4.18. I am trying to configure
MQ1132 for USB Host support. It looks like the Host controller
(MQ1132) is initialized properly but not sure. When I plug in a USB
stick on to the USB port, I get the following messages.
-----------------------------------------------------------------
hub.c: USB new device connect on bus1/1, assigned device number 2
usb-ohci.c: unlink URB timeout
usb.c: USB device not accepting new address=2 (error=-145)

hub.c: USB new device connect on bus1/1, assigned device number 3
usb_control/bulk_msg: timeout
usb-ohci.c: unlink URB timeout
usb.c: USB device not accepting new address=3 (error=-145)
-------------------------------------------------------------------
Has anyone experienced the same out there. Could any one suggest how
to debug this error. What could be the problem?.

Thanks in advance.

Regards,
aks

_________________________________________________________________
Add glamour to your desktop. Let your screen sizzle. 
http://server1.msn.co.in/msnchannels/Entertainment/wallpaperhome.asp 
Download the hottest wallpapers.

---

From: Pete Popov <[email-masked]>
Date: Thu, 18 Dec 2003 08:51:17 -0800

I haven't worked with that board, but on the AMD/Alchemy boards, the 
same errors have typically been associated with improper setup of the 
usb controller -- usually the clock that is routed internally to the 
controller.

Pete

---

From: Jun Sun <[email-masked]>
Date: Thu, 18 Dec 2003 09:43:21 -0800

> stick on to the USB port, I get the following messages.

Another possiblity (which is probably more likely) is the IRQ
number is not seupt correctly.  

Are you using Rokchopper II baseboard?  If so, single-function
PCI card should work properly w.r.t. IRQ.  If you are using other
backplan or using multi-function pci card, you need to some IRQ
fixup.

Jun

---

From: Kunihiko IMAI <[email-masked]>
Date: Fri, 19 Dec 2003 13:14:31 +0900

Hi,

At Thu, 18 Dec 2003 09:43:21 -0800,
> On Thu, Dec 18, 2003 at 07:58:36PM +0530, samavarthy c wrote:
(snip)
> number is not seupt correctly.  

And another possibilities are:

	DMA cache coherency
		NEC VR4xxxs have no bus-snoop function. So
		cache-coherency must be maintaind by software.
		(or use KSEG1 access)

		But I remember linux-2.4.18 of usb-ohci.c doesn't have
		this problem.

	Read/write cycle order
		Read/write cycle order of CPU instruction level is
		guaranteed at bus level?
		( Or at assembler level, the sequent instruction is
		re-ordered ? )

		Newer version of usb-ohci.c has some wmb() funtions.
		It synchronizes read/write order.

I got similar errors on VR4181A with 2.4.18 kernel.  VR4181A has
built-in USB OHCI 1.1 host connected internal PCI bus.

To fix this problem, I compared newer usb-ohci.c and put wmb()
corresponded place. It is expaneded as subsequent NOPs. (VR4xxx has
real SYNC instruction.)

Thanks.
_._. __._  _ . ... _  .___ ._. _____ _... ._ _._ _.._. .____  _ . ... _

                                                          Kunihiko IMAI