Linux2.6.24下的USB HOST移植

未作移植,插入U盘后提示如下[root@Emux/]#usb 1-1: new full speed USB device using s3c2410-ohci and address 2usb 1-1: device descriptor read/64, error -62usb 1-1: device descriptor read/64, error -62usb 1-1: new f
摘要由CSDN通过智能技术生成

未作移植,插入U盘后提示如下

[root@Emux/]#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

 

2.代码修改——修改arch/arm/mach-s3c2410/mach-smdk2410.c
+#include <asm/arch/regs-clock.h>
+#include <asm/arch/usb-control.h>
+#include <linux/device.h>
+#include <linux/delay.h>


+static struct s3c2410_hcd_info usb_sbc2410_info = {
+ .port[0] = {

+ .flags = S3C_HCDFLG_USED
+ }
+};

+int usb_sbc2410_init(void)
+{
+unsigned long upllvalue = (0x78<<12)|(0x02<<4)|(0x03);
+printk("USB Control, (c) 2006 sbc2410/n");
+s3c_device_usb.dev.platform_data = &usb_sbc2410_info;
+while(upllvalue!=__raw_readl(S3C2410_UPLLCON))
+{
+__raw_writel(upllvalue,S3C2410_UPLLCON);
+mdelay(1);
+}
+return 0;
+}

static void __init smdk2410_map_io(void)
{
s3c24xx_init_io(smdk2410_iodesc, ARRAY_SIZE(smdk2410_iodesc));
s3c24xx_init_clocks(0);
s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs));
s3c24xx_set_board(&smdk2410_board);
+usb_sbc2410_init();
}


3.内核配置
>让内核支持热插拔

General setup ---> Suppo

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值