最近公司想通过U盘对内核进行升级,用的是6410的开发板,我根据/common/cmd_usb.c入手,添加了uboot对usb的支持,和USB相关的开关也开了,但usb start 时扫描不到U盘输出:
e)start USB...
USB: CLK_SRC = 7e00f01c, CLK_DIV1 = 7e00f024,SCLK_GATE = 7e00f038
scanning bus for devices... usb_scan_device :USB_MAX_DEVICE IS 32
New Device 0
usb_control_msg: request: 0x6, requesttype: 0x80
value 0x100 index 0x0 length 0x8
descriptor.bMaxPacketSize0 is 8
set address dev->devnum = 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 0x8
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_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
usb_control_msg: request: 0x0, requesttype: 0xA0
value 0x0 index 0x0 length 0x4
1 USB Device(s) found
scanning bus for storage devices... 0 Storage Device(s) found
#usb info 时输出:
USB_MAX_DEVICE IS 32
1: Hub, USB Revision 1.10
- OHCI Root Hub
- Class: Hub
- PacketSize: 8 Configurations: 1
- Vendor: 0x0000 Product 0x0000 Version 0.0
Configuration: 1
- Interfaces: 1 Self Powered 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 2 Interval 255ms
求教这是怎么回事啊??
------解决方案--------------------
USB分析仪,或者其它仪器,先验证一下USB上电了没有,数据线上到底有没有数据。
------解决方案--------------------
禁用DCache和MMU,把延时加大一点。
------解决方案--------------------
U盘也是一种文件系统, 根据你的描述, 在文件系统挂载后,U盘可以识别(灯亮), 那就是你初始化U盘的时候,文件系统还没初始化啊! 你把初始化检测U盘的代码,移到挂载文件系统之后,是不是就好了呢?
------解决方案--------------------
你的USB驱动是HOST驱动还是device驱动呀?要host驱动才能检测U盘插入,才能给u盘供电。应该跟DCASH和MMU没有关系,也和延时没有关系的。USB驱动是要host先发起通讯,device回应。
------解决方案--------------------
USB device not responding, giving up (status=20)
这样看来还是U盘没有响应。从你之前的描述来看,硬件上是OK的,重点查驱动吧。
这里status代表什么意思?