USB驱动移植
来源:互联网 发布:mac科学上网软件 编辑:程序博客网 时间:2024/04/25 07:49
1 在arch/arm/mach-s3c2410/mach-smdk2410.c中紧接着LCD的部分添加
//usb
#include <asm/arch/usb-control.h>
#include <asm/arch/regs-clock.h>
#include <linux/device.h>
#include <linux/delay.h>
//-------------------usb两个USBHOST支持---------------
struct s3c2410_hcd_info usb_s3c2410_info = {
.port[0] = {
.flags = S3C_HCDFLG_USED
}
};
int smdk2410_usb_init(void)
{
unsigned long upllvalue = (0x78 << 12) | (0x02 <<4) |(0x03);
printk("USB Control, (c) 2006 s3c2410/n");
s3c_device_usb.dev.platform_data = &usb_s3c2410_info;
while(upllvalue!=__raw_readl(S3C2410_UPLLCON))
{
__raw_writel(upllvalue,S3C2410_UPLLCON);
mdelay(1);
}
return 0;
}
2 在smdk2410_map_io函数最后添加
//usb
smdk2410_usb_init();
------------配置USB鼠标键盘----------
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
------------配置U盘支持------------------------
因为要优盘用到了SCSI 命令,所以我们先增加SCSI 支持。
Device Drivers >
SCSI device support --->
[*] legacy /proc/scsi support
<*> SCSI disk support
[*] SCSI generic support
Device Drivers >
USB support --->
[*] Support for Host-side USB
<*> USB Mass Storage support
[*] USB Mass Storage verbose debug
Block devices --->
<*> Low Performance USB Block driver
-------------让内核支持热插拔 -----------
│ General setup --->
│ │ Support for hot-pluggable devices
│ Device Drivers --->
│ Generic Driver Options --->
│ <*> Hotplug firmware loading support
-----------MSDOS fs和VFAT fs--------------
│ │ File systems --->
│ │ DOS/FAT/NT Filesystems --->
│ │ <*> MSDOS fs support │ │
│ │ <*> VFAT (Windows-95) fs support │ │
│ │ (936) Default codepage for FAT │ │
│ │ (cp936) Default iocharset for FAT │ │
│ │ < > NTFS file system support
│ │Partition Types --->
│ │ PC BIOS (MSDOS partition tables) support
没有加上这个就出现下面这个提示了...
[root@Qiu /]# mount -t vfat /dev/scsi/host0/bus0/target0/lun0/disc /mnt
mount: mounting /dev/scsi/host0/bus0/target0/lun0/disc on /mnt failed: No such device
还有下面这个提示...
[root@Qiu /]# mount -t vfat /dev/scsi/host0/bus0/target0/lun0/disc /mnt
FAT: codepage cp936 not found
mount: mounting /dev/scsi/host0/bus0/target0/lun0/disc on /mnt failed: Invalid argument
-----------加入中文字体库---------------------
│ │ Native Language Support --->
│ │ <*> Simplified Chinese charset (CP936, GB2312)
│ │ <*> NLS UTF8
最后加载提示:
[root@Qiu /]# usb 1-1: new full speed USB device using s3c2410-ohci and address 3
scsi1 : SCSI emulation for USB Mass Storage devices
Vendor: Model: Rev:
Type: Direct-Access ANSI SCSI revision: 00
SCSI device sdb: 483041 512-byte hdwr sectors (247 MB)
sdb: Write Protect is off
sdb: assuming drive cache: write through
SCSI device sdb: 483041 512-byte hdwr sectors (247 MB)
sdb: Write Protect is off
sdb: assuming drive cache: write through
/dev/scsi/host1/bus0/target0/lun0:<7>usb-storage: queuecommand called
unknown partition table
Attached scsi removable disk sdb at scsi1, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi1, channel 0, id 0, lun 0, type 0
挂载上后:(刚插上拔下一次变成host1)
[root@Qiu /]# mount -t vfat /dev/scsi/host1/bus0/target0/lun0/disc /mnt
[root@Qiu /]# cd mnt
[root@Qiu /mnt]# ls
9600gso.jpg Linux命令大全(修改版).chm
- USB 驱动移植心得
- USB 驱动移植心得
- USB驱动移植心得
- USB驱动移植心得
- USB驱动移植
- 移植usb wifi 驱动
- USB驱动移植
- usb触摸屏驱动移植
- 移植usb wifi 驱动
- fl2440 usb驱动移植
- 移植usb无线网卡驱动
- USB设备的驱动移植
- MINI2440 USB驱动移植问题
- linux下USB驱动移植
- usb wifi 驱动移植rtl5370
- USB MassStorage 驱动移植 笔记
- usb wifi 驱动移植rtl5370 .
- USB驱动移植(u盘)
- org.apache.jasper.JasperException: Unable to compile class for JSP:
- 引擎技术研究之场景管理------四叉树与视椎剔除技术
- 【收藏】如何提高网站访问速度
- OpenGL 着色
- OpenGL 第一个多边形
- USB驱动移植
- 一些通用的ExtJS报错信息处理收集
- OpenGL教程之新手上路
- 名人语录
- JAVA 中的System类
- 引擎技术研究之地形技术
- 【转】搜索算法基础教程 - Kangsheng的专栏 - CSDN博客
- 图片大小、像素、分辨率之间的关系
- Error: Debugging Failed Because Integrated Windows Authentication Is Not Enabled