[#4794] u-boot will hang at scanning bus for usb devices if start usb twice

Document created by Aaronwu Employee on Sep 25, 2013
Version 1Show Document
  • View in full screen mode

[#4794] u-boot will hang at scanning bus for usb devices if start usb twice

Submitted By: Vivi Li

Open Date

2009-01-11 22:42:29    

Priority:

Medium     Assignee:

Nobody

Category:

Commands     Fixed In Release:

N/A

Found In Release:

snaps     Status:

Open

Board:

N/A     Processor:

BF548

Silicon Revision:

    Resolution:

N/A

Is the bug repeatable?:

N/A     

Summary: u-boot will hang at scanning bus for usb devices if start usb twice

Details:

 

In latest trunk, if enter "usb start" twice, u-boot will hang at scanning bus for usb devices.

 

--

U-Boot 2008.10-svn1596 (ADI-2009R1-pre) (Jan 11 2009 - 17:29:13)

 

CPU:   ADSP bf527-0.0 (Detected Rev: 0.0) (parallel flash boot)

Board: ADI BF527 EZ-Kit board

       Support: http://blackfin.uclinux.org/

Clock: VCO: 600 MHz, Core: 600 MHz, System: 50 MHz

RAM:   64 MB

Flash:  4 MB

In:    serial

Out:   serial

Err:   serial

Net:   Blackfin EMAC

MAC:   00:E0:22:FE:BB:4B

Hit any key to stop autoboot:  0

bfin>

bfin> usb

USB is stopped. Please issue 'usb start' first.

bfin> usb start

(Re)start USB...

USB:   scanning bus for devices... 1 USB Device(s) found

       scanning bus for storage devices... 1 Storage Device(s) found

bfin> usb start

(Re)start USB...

USB:   scanning bus for devices...

--

 

Follow-ups

 

--- Vivi Li                                                  2009-01-11 23:27:06

It also hangs when reset usb.

--

bfin> usb start

(Re)start USB...

USB:   scanning bus for devices... 1 USB Device(s) found

       scanning bus for storage devices... 1 Storage Device(s) found

bfin> usb reset

(Re)start USB...

USB:   scanning bus for devices...

--

 

It also hangs when stop and start usb.

--

bfin> usb start

(Re)start USB...

USB:   scanning bus for devices... 1 USB Device(s) found

       scanning bus for storage devices... 1 Storage Device(s) found

bfin> usb stop

stopping USB..

bfin> usb start

(Re)start USB...

USB:   scanning bus for devices...

--

 

--- Bryan Wu                                                 2009-01-14 07:11:28

The MUSB code miss the timeout control in the polling functions. so when you run

the usb command without a usb device connected, it will hang in the endless

waiting loop.

 

I added the timeout control to the driver, it will not hang the U-boot

---

bfin> usb start

(Re)start USB...

USB:   scanning bus for devices...

      USB device not responding, giving up (status=20)

No USB Device found

       scanning bus for storage devices... 0 Storage Device(s) found

---

 

But I still can not start usb twice.

-Bryan

 

--- Cliff Cai                                                2009-11-12 05:07:20

It seems to need a usb module reset to enable start usb twice,unfortunately,this

reset only can be done by processor core,no software approach.

 

Cliff

 

--- Mike Frysinger                                           2009-11-12 12:56:37

is this a MUSB issue or a Blackfin MUSB issue ?

 

--- Robin Getz                                               2009-11-12 17:02:00

Clearing Global_Ena (bit 0 of USB_GLOBAL_CTL) should reset the state machine.

 

If it doesn't -- it is a problem. (Although I'm not sure if this is documented

anywhere).

 

-Robin

 

--- Cliff Cai                                                2009-11-12 21:08:11

I've already tried to clear that bit,but no difference.

 

Cliff

 

--- Michael Hennerich                                        2009-11-13 03:58:55

In addition - did you also try to cycle the USB Port power?

 

 

--- Cliff Cai                                                2009-11-17 01:24:05

I've tried to switch off PHY(set USBPARTB1V of USB_APHY_CNTRL2) when stops and

switch on it when starts.

 

Cliff

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes