linux2.6.37.4内核在XC2440开发板上移植(八)USB HOST驱动移植

内核里已经做好了很完善的USB Host驱动了,可以支持大多数USB设备(如U盘,USB键盘鼠标等),同时也支持USB HUB。

在mach-xc2440.c中添加USB Host驱动的支持:

xc2440_devices[ ]结构体中加入:
&s3c_device_ohci,

s3c_device_ohci结构体的实现文件为/arch/arm/plat-samsung/dev-usb.c,系统默认没有对它的编译支持,修改同目录下的Kconfig文件:
  1. config S3C_DEV_USB_HOST
  2.     bool
  3.     default y
  4.     help
  5.         Compile in platform device definition for USB host.
或修改arch/arm/mach-s3c2440/Kconfig文件:
  1. config MACH_XC2440
  2.     bool "XC2440 development board with S3C2440 CPU module"
  3.     select CPU_S3C2440
  4.     select S3C_DEV_NAND
  5.     select S3C_DEV_USB_HOST
  6.     help
  7.         Say Y here if you are using the XC2440 development board.

配置内核,支持USB Host:
  1. Device drivers --->
  2.     SCSI Device support --->
  3.         <*> SCSI device support
  4. <*> SCSI disk support
  5.     [*] HID Devices --->
  6. -*- Generic HID support
  7. <*> USB Human Interface Device (full HID) support
  8.     [*] USB support --->
  9. {*} Support for Host-side USB
  10. [*] USB announce new devices
  11. [*] USB device filesystem
  12. <*> OHCI HCD support
  13. <*> USB Mass Storage support

USB Human Interface Device (full HID) support 是对USB鼠标键盘的支持
SCSI disk support 和USB Mass Storage support 是对U盘的支持

系统启动时的调试信息:
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: S3C24XX OHCI
usb usb1: Manufacturer: Linux 2.6.37.4 ohci_hcd

原创地址:http://blog.chinaunix.net/uid-22030783-id-3028206.html
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值