Chinaunix首页 | 论坛 | 博客
  • 博客访问: 383156
  • 博文数量: 149
  • 博客积分: 25
  • 博客等级: 民兵
  • 技术积分: 220
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-27 14:53
文章分类

全部博文(149)

文章存档

2016年(3)

2015年(2)

2014年(144)

我的朋友

分类: LINUX

2014-10-09 15:16:22

1.mach-ok6410.c文件中增加如下内容:

#include

#include
#include

#ifdef CONFIG_USB_SUPPORT
void s3c_hsotg_phy_config(int enable) {
u32 val;

if (enable) {
__raw_writel(0x0, S3C_PHYPWR); /* Power up */

val = __raw_readl(S3C_PHYCLK);
val &= ~S3C_PHYCLK_CLKSEL_MASK;
__raw_writel(val, S3C_PHYCLK);

__raw_writel(0x1, S3C_RSTCON);
udelay(5);
__raw_writel(0x0, S3C_RSTCON); /* Finish the reset */
udelay(5);
} else {
__raw_writel(0x19, S3C_PHYPWR); /* Power down */
}
}
EXPORT_SYMBOL(s3c_hsotg_phy_config);

#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




阅读(1597) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~