内核里已经做好了很完善的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文件:
- config S3C_DEV_USB_HOST
- bool
- default y
- help
- Compile in platform device definition for USB host.
或修改arch/arm/mach-s3c2440/Kconfig文件:
- config MACH_XC2440
- bool "XC2440 development board with S3C2440 CPU module"
- select CPU_S3C2440
- select S3C_DEV_NAND
- select S3C_DEV_USB_HOST
- help
- Say Y here if you are using the XC2440 development board.
配置内核,支持USB Host:
- Device drivers --->
- SCSI Device support --->
- <*> SCSI device support
- <*> SCSI disk support
- [*] HID Devices --->
- -*- Generic HID support
- <*> USB Human Interface Device (full HID) support
- [*] USB support --->
- {*} Support for Host-side USB
- [*] USB announce new devices
- [*] USB device filesystem
- <*> OHCI HCD support
- <*> 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
阅读(1374) | 评论(0) | 转发(0) |