USB驱动中出现usb 1-1: device descriptor read/64的解决方法

自己编写的USB驱动,插入USB设备,出现:
[root@Nision=W]#usb 1-1: 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

最后一句的意思是,设备枚举失败,error -62的意思时超时错误。从这里可以看出,系统应该是识别到了USB设备,但是设备却无法工作,而且可以断定是USB主机控制器的错误。的确如此,百度一下,网上说这是时钟错误,也就是USB是时钟没有起来,对于2440,USB时钟需要工作在48M。修改内核源码:

修改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);
}
在这里,S3C2410_UPLLCON的值为0xF4100008。

在这里插入图片描述
之后问题成功解决

在这里插入图片描述

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值