Chinaunix首页 | 论坛 | 博客
  • 博客访问: 933107
  • 博文数量: 70
  • 博客积分: 1741
  • 博客等级: 上尉
  • 技术积分: 2476
  • 用 户 组: 普通用户
  • 注册时间: 2009-07-05 14:46
个人简介

全志全系列芯片产品方案开发 A20/A33/A64/A40/A60/A83/A63/H3/H5/H6/H8

文章存档

2018年(1)

2012年(20)

2011年(49)

分类: LINUX

2011-11-26 09:08:46

内核里已经做好了很完善的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
阅读(4282) | 评论(0) | 转发(7) |
给主人留下些什么吧!~~