usb 1-1: device descriptor read/64, error -62

在学习usb驱动的时候遇到的问题:

usb 1-1: new full speed USB device using s3c2410-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 and address 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 and address 4
usb 1-1: device not accepting address 4, error -62
usb 1-1: new full speed USB device using s3c2410-ohci and address 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。但是可以修改内核来弥补。

在drivers/usb/host/ohci-s3c2410.c 的函数 s3c2410_start_hc修改如下:

drivers/usb/host/ohci-s3c2410.c

static void s3c2410_start_hc(struct platform_device *dev, struct usb_hcd *hcd)
{
	struct s3c2410_hcd_info *info = dev->dev.platform_data;

	unsigned long upllvalue  = (0x38<< 12) | (0x02 << 4) | (0x01); // 添加的代码
	unsigned long upllvalue1 = (0x38<< 12) | (0x02 << 4) | (0x02); // 添加的代码

	dev_dbg(&dev->dev, "s3c2410_start_hc:\n");

	__raw_writel(upllvalue, S3C2410_UPLLCON);  // 添加的代码
	mdelay(20);				// 添加的代码
	__raw_writel(upllvalue1, S3C2410_UPLLCON);// 添加的代码
	mdelay(20);				// 添加的代码


	clk_enable(usb_clk);
	mdelay(2);			/* let the bus clock stabilise */

	clk_enable(clk);

	if (info != NULL) {
		info->hcd	= hcd;
		info->report_oc = s3c2410_hcd_oc;

		if (info->enable_oc != NULL) {
			(info->enable_oc)(info, 1);
		}
	}
}

重新编译内核,然后在uboot中用新内核启动即可:

#nfs 30000000 192.168.1.131:/nfs/busybox/fs_mini2440/uImage_XXX 

#bootm 30000000


参考:http://download.csdn.net/detail/wenxiaohua_113/4313893#comment

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值