未作移植,插入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 ---> Support for hot-pluggable devices
>USB驱动设置
Device Drivers --->Generic Driver Options
---> Hotplug firmware loading support
Block devices
---> Low Performance USB Block driver

本文档详细介绍了如何在Linux2.6.24内核中移植USB HOST功能到S3C2410平台,包括代码修改、内核配置、解决设备识别错误(-62)和挂载问题,以及针对不同错误的调试方法。
最低0.47元/天 解锁文章
2558

被折叠的 条评论
为什么被折叠?



