fl2440USB驱动的问题

来源:互联网 发布:数据库软件 中标 编辑:程序博客网 时间:2024/06/06 01:37
fl2440启动时打印的错误信息如下:
new full speed USB device usings3c2410-ohci and address 2
usb 1-1: device descriptor read/64, error -62
usb 1-1: device descriptor read/64, error -62
usb 1-1: new full speed USB device using s3c2410-ohci andaddress 3
usb 1-1: device descriptor read/64, error -62
usb 1-1: device descriptor read/64, error -62
usb 1-1: new full speed USB device using s3c2410-ohci andaddress 4
usb 1-1: device not accepting address 4, error -62
usb 1-1: new full speed USB device using s3c2410-ohci andaddress 5
usb 1-1: device not accepting address 5, error -62
hub 1-0:1.0: unable to enumerate USB device on port 1
是UPLLCON的问题,该问题可以修改uboot来解决,也可以修改内核来解决。
修改内核:
vim drivers/usb/host/ohci-s3c2410.c
添加头文件:
#include <mach/regs-clock.h>
在函数s3c2410_start_hc中添加:
unsigned long upllvalue = (0x78 << 12) | (0x02 << 4) | (0x03);
while (upllvalue != __raw_readl(S3C2410_UPLLCON)) {
__raw_writel(upllvalue, S3C2410_UPLLCON);
mdelay(1);
}
重新编译内核,打印信息如下:
usb 1-1: new full speed USB device number 2 using s3c2410-ohci
usb 1-1: New USB device found, idVendor=05e3, idProduct=0606
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1: Product: USB Hub 2.0
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
错误信息没有了!
启动开发板,将USB插入接口:
[root@Ideapad /]# usb 1-1.2: new full speed USB device number 3 using s3c2410-ohci
usb 1-1.2: New USB device found, idVendor=05e3, idProduct=0608
usb 1-1.2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
usb 1-1.2: Product: USB2.0 Hub
hub 1-1.2:1.0: USB hub found
hub 1-1.2:1.0: 4 ports detected
usb 1-1.2.4: new full speed USB device number 4 using s3c2410-ohci
usb 1-1.2.4: New USB device found, idVendor=148f, idProduct=760b
usb 1-1.2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.2.4: Product: 802.11 n WLAN
usb 1-1.2.4: Manufacturer: MediaTek
usb 1-1.2.4: SerialNumber: 1.0
usb 1-1.2.1: new full speed USB device number 5 using s3c2410-ohci
usb 1-1.2.1: New USB device found, idVendor=360a, idProduct=318a
usb 1-1.2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.2.1: Product: WiFi Flash Disk               
usb 1-1.2.1: Manufacturer: 360                           
usb 1-1.2.1: SerialNumber: 44400000000009CD
scsi0 : usb-storage 1-1.2.1:1.0
scsi 0:0:0:0: Direct-Access     360      WiFi Flash Disk  1.00 PQ: 0 ANSI: 2
sd 0:0:0:0: [sda] 15669248 512-byte logical blocks: (8.02 GB/7.47 GiB)
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] No Caching mode page present
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] No Caching mode page present
sd 0:0:0:0: [sda] Assuming drive cache: write through
 sda: sda4
sd 0:0:0:0: [sda] No Caching mode page present
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Attached SCSI removable disk
USB挂载上了!修改正确。

0 0
原创粉丝点击