全部博文(187)
分类: LINUX
2009-07-03 16:32:42
Linux
参照资料
http://blog.chinaunix.net/u3/93290/showart_1904445.html (不是很完整)
下面主要例一下修改过的地方
移植步骤:
1. 修改在arch/arm/mach-s
//添加usb头文件
#include
#include
#include
#include
//……………………………………………………………………………………usb
static struct s
.port[0] = {
.flags = S
}
};
int usb_sbc2410_init(void)
{
unsigned long upllvalue = (0x78<<12)|(0x02<<4)|(0x03);
printk("USB Control, (c) 2006 sbc2410\n");
s
while(upllvalue!=__raw_readl(S
{
__raw_writel(upllvalue,S
mdelay(1);
}
return 0;
}
注(__raw_readl 和__raw_writel ,“l”是字每来的)
static struct platform_device *smdk2410_devices[] __initdata = {
&s
// &s
&s
&s
&s
&s
};
static void __init smdk2410_map_io(void)
{
s
s
s
s
usb_sbc2410_init();
}
2. 编译内核,选中所装驱动,配置USB鼠标键盘
#make menuconfig
Device Drivers >
USB support --->
<*> Support for Host-side USB
<*> OHCI HCD support
--- USB Input Devices
<*> USB Human Interface Devices (full HID) support
[*] HID input layer support
3. 配置U盘支持
因为要优盘用到了SCSI 命令,所以我们先增加SCSI 支持。
在Device Drivers 菜单里面,选择SCSI device support
#make menuconfig
Device Drivers >
SCSI device support --->
[*] legacy /proc/scsi support
<*> SCSI disk support
然后选择
Device Drivers >
USB support --->
<*> USB Mass Storage support
[*] USB Mass Storage verbose debug
Mount /dev/sda1 usb/