一个愤青
分类: LINUX
2015-03-08 00:11:03
原文地址:Linux3.6.7在OK6410平台的移植(十)USB 作者:STANzxd
1.mach-ok6410.c文件中增加如下内容:
#include
#endif
并在static void __init ok6410_machine_init(void)函数中增加s3c_hsotg_phy_config(1);
2.linux 3.6.7/arch/arm/plat-samsung/devs.c文件中void __init s3c_hsotg_set_platdata(struct s3c_hsotg_plat *pd)屏蔽掉s5p_usb_phy_init,s5p_usb_phy_exit。
3.内核配置:
device drivers-->SCSI device support -->
│ ┌────────────────────────────────────────────────────────────────────┐ │
│ │ < > RAID Transport Class │ │
│ │ <*> SCSI device support │ │
│ │ < > SCSI target support │ │
│ │ [*] legacy /proc/scsi/ support │ │
│ │ *** SCSI support type (disk, tape, CD-ROM) *** │ │
│ │ <*> SCSI disk support │ │
│ │ < > SCSI tape support │ │
│ │ < > SCSI OnStream SC-x0 tape support │ │
│ │ < > SCSI CDROM support │ │
│ │ <*> SCSI generic support │ │
│ │ < > SCSI media changer support │ │
│ │ [ ] Probe all LUNs on each SCSI device │ │
│ │ [ ] Verbose SCSI error reporting (kernel size +=12K) │ │
│ │ [ ] SCSI logging facility │ │
│ │ [ ] Asynchronous SCSI scanning │ │
│ │ SCSI Transports ---> │ │
│ │ [*] SCSI low-level drivers ---> │ │
│ │ < > SCSI Device Handlers ---> │ │
│ │ < > OSD-Initiator library
device drivers-->USB support-->
<*> Support for Host-side USB
[*] USB announce new devices
<*> OHCI HCD support
<*> USB Mass Storage support
系统启动后插入U盘,显示如下信息:
usb 1-1: new full-speed USB device number 6 using s3c2410-ohci
usb 1-1: not running at top speed; connect to a high speed hub
usb 1-1: New USB device found, idVendor=090c, idProduct=1000
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: KINGSTON
usb 1-1: Manufacturer: SMI Corporation
usb 1-1: SerialNumber: AA04012700010995
scsi0 : usb-storage 1-1:1.0
scsi 0:0:0:0: Direct-Access KINGSTON 2.0 1100 PQ: 0 ANSI: 0 CCS
sd 0:0:0:0: [sda] 3915776 512-byte logical blocks: (2.00 GB/1.86 GiB)
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] No Caching mode page present
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] No Caching mode page present
sd 0:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sd 0:0:0:0: [sda] No Caching mode page present
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Attached SCSI removable disk
usb 1-1: USB disconnect, device number 6
插入USB鼠标,显示如下信息:
usb 1-1: new low-speed USB device number 7 using s3c2410-ohci
usb 1-1: New USB device found, idVendor=1c4f, idProduct=0003
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1: Product: U+P Mouse
usb 1-1: Manufacturer: SIGMACH1P
input: SIGMACH1P U+P Mouse as /devices/platform/s3c2410-ohci/usb1/1-1/1-1:1.0/input/input0
hid-generic 0003:1C4F:0003.0001: input: USB HID v1.10 Mouse [SIGMACH1P U+P Mouse] on usb-s3c24xx-1/input0