关于Android中加入USB主控驱动的问题

potty15 2010-04-09 06:38:13
最近因为毕设需要,在移植Android1.5到urbetter s3c6410的板子上,需要使用板子上的USB来连接USB设备

内核编译选项添加了usb host side driver,全选了usb host controller drivers,但是依然用不了USB设备,请问需要怎么配置内核?需要给内核打补丁添加其他的驱动吗?
...全文
1546 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
dsds0821 2010-04-30
  • 打赏
  • 举报
回复
potty15 我用的跟你是同个平台可以分享一下你USB-HOST启动的步骤吗?
potty15 2010-04-23
  • 打赏
  • 举报
回复
基本解決問題,參考阿虛電子小屋改了UBOOT裏面的晶振頻率。。
keepm 2010-04-18
  • 打赏
  • 举报
回复
帮顶!!!
beyondma 2010-04-14
  • 打赏
  • 举报
回复
把日志贴一下?
potty15 2010-04-14
  • 打赏
  • 举报
回复
这时启动日志
CPU: S3C6410@532MHz
Fclk = 532MHz, Hclk = 133MHz, Pclk = 66MHz, Serial = CLKUART (SYNC Mode)
Board: SMDK6410 DRAM: 128 MB Flash: 0 kB NAND: 256 MB SD/MMC: 983 MB
*** Warning - bad CRC or moviNAND, using default environment
In: serial Out: serial Err: serial Net: Not Found CS8900@0x18800300
Hit any key to stop autoboot: 3 2 1 0
Reading data from sector 32 (16384 sectors).. completed
Boot with zImage
Starting kernel ...
Uncompressing Linux........................................................................ done, booting the kernel.
Linux version 2.6.27 (root@ubuntu) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #60 Mon Apr 12 06:18:28 PDT 2010
CPU: ARMv6-compatible processor [410fb766] revision 6 (ARMv7), cr=00c5387f
Machine: UR6410
Ignoring unrecognised tag 0x00000000
Memory policy: ECC disabled, Data cache writeback
CPU S3C6410 (id 0x36410101)
S3C24XX Clocks, (c) 2004 Simtec Electronics
S3C64XX: PLL settings, A=532000000, M=532000000, E=24000000
S3C64XX: HCLK2=266000000, HCLK=133000000, PCLK=66500000
mout_apll: source is fout_apll (1), rate is 532000000
mout_epll: source is fout_epll (1), rate is 24000000
mout_mpll: source is mpll (1), rate is 532000000
mmc_bus: source is mout_epll (0), rate is 24000000
mmc_bus: source is mout_epll (0), rate is 24000000
mmc_bus: source is mout_epll (0), rate is 24000000
usb-host-bus: source is mout_epll (0), rate is 24000000
uclk1: source is dout_mpll (1), rate is 66500000
spi-bus: source is mout_epll (0), rate is 24000000
spi-bus: source is mout_epll (0), rate is 24000000
audio-bus: source is mout_epll (0), rate is 24000000
audio-bus: source is mout_epll (0), rate is 24000000
irda-bus: source is mout_epll (0), rate is 24000000
CPU0: D VIPT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 22098
Kernel command line: ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs init=/init console=ttySAC0,115200 break=mount
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x30
console [ttySAC0] enabled
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 87MB = 87MB total
Memory: 79156KB available (4076K code, 749K data, 4180K init)
Calibrating delay loop... 530.84 BogoMIPS (lpj=1327104)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 288 bytes
NET: Registered protocol family 16
S3C6410 Power Management, (c) 2008 Samsung Electronics
S3C6410: Initialising architecture
S3C DMA-pl080 Controller Driver, (c) 2006-2007 Samsung Electronics
Total 32 DMA channels will be initialized.
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
NET: Registered protocol family 1
S3C64XX ADC driver, (c) 2008 Samsung Electronics
S3C64XX ADC driver successfully probed
NetWinder Floating Point Emulator V0.97 (double precision)
ashmem: initialized
JFFS2 version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.
yaffs Apr 12 2010 06:14:01 Installing.
msgmni has been set to 154
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
S3C_LCD clock got enabled :: 133.000 Mhz
LCD TYPE :: LW500 will be initialized
GPIO-53 autorequested
。。。。。。。。。。。。。。
。。。。。。。。。。。。。
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 79, io mem 0x74300000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
barcode scanner: Init barcode scanner
usbcore: registered new interface driver barcode_scanner
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
[S3C USB-OTG MODE] : DMA
android init
android_bind
mass_storage_function_add
android_usb gadget: Number of LUNs=1
adb_function_add
android_usb gadget: android_usb ready
Registered gadget driver 'android_usb'
mice: PS/2 mouse device common for all mice
GPIO-144 autorequested
GPIO-145 autorequested
GPIO-146 autorequested
GPIO-147 autorequested
GPIO-148 autorequested
GPIO-149 autorequested
input: s3c-button as /class/input/input0
s3c button Initialized!!
S3C Touchscreen driver, (c) 2008 Samsung Electronics
S3C TouchScreen got loaded successfully : 12 bits
input: S3C TouchScreen as /class/input/input1
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c-rtc s3c-rtc: rtc disabled, re-enabling
s3c-rtc s3c-rtc: rtc core: registered s3c as rtc0
i2c /dev entries driver
s3c2440-i2c s3c2440-i2c.0: slave address 0x10
s3c2440-i2c s3c2440-i2c.0: bus frequency set to 377 KHz
usb 1-1: new low speed USB device using s3c2410-ohci and address 2
parent clock for camera: 266.000 MHz, divisor: 6
s3c2440-i2c s3c2440-i2c.0: i2c-0: S3C I2C adapter
s3c2440-i2c s3c2440-i2c.1: slave address 0x10
s3c2440-i2c s3c2440-i2c.1: bus frequency set to 377 KHz
parent clock for camera: 266.000 MHz, divisor: 6
s3c2440-i2c s3c2440-i2c.1: i2c-1: S3C I2C adapter
battery driver for s3c6410.
Software Watchdog Timer: 0.07 initialized. soft_noboot=0 soft_margin=60 sec (nowayout= 0)
cpuidle: using governor ladder
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
s3c-sdhci s3c-sdhci.0: clock source 0: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.0: clock source 1: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.0: clock source 2: hsmmc (133000000 Hz)
/n*** mmc->f_min : 519531***
/n*** mmc->f_max : 133000000***
Registered led device: mmc0
mmc0: SDHCI controller on samsung-hsmmc [s3c-sdhci.0] using DMA
usb 1-1: device descriptor read/64, error -62
usb 1-1: device descriptor read/64, error -62
selected source 0, clock 519531, delta 0
*** KEVIN_DEBUG : First we search for SDIO...***
*** KEVIN_DEBUG : ...then normal SD...***
***KEVIN : mmc_attach_sd***
usb 1-1: new low speed USB device using s3c2410-ohci and address 3
selected source 0, clock 25000000, delta 8375000
mmc0: new SD card at address 9359
mmcblk0: mmc0:9359 SD01G 1006080KiB
mmcblk0:<3>usb 1-1: device descriptor read/64, error -62
p1
usb 1-1: device descriptor read/64, error -62
usb 1-1: new low speed USB device using s3c2410-ohci and address 4
usb 1-1: device not accepting address 4, error -62
usb 1-1: new low speed USB device using s3c2410-ohci and address 5
usb 1-1: device not accepting address 5, error -62
hub 1-0:1.0: unable to enumerate USB device on port 1
usb 1-2: new low speed USB device using s3c2410-ohci and address 6
usb 1-2: device descriptor read/64, error -62
usb 1-2: device descriptor read/64, error -62
usb 1-2: new low speed USB device using s3c2410-ohci and address 7
usb 1-2: device descriptor read/64, error -62
usb 1-2: device descriptor read/64, error -62
usb 1-2: new low speed USB device using s3c2410-ohci and address 8
usb 1-2: device not accepting address 8, error -62
usb 1-2: new low speed USB device using s3c2410-ohci and address 9
usb 1-2: device not accepting address 9, error -62
hub 1-0:1.0: unable to enumerate USB device on port 2
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
S3C PWM Driver, (c) 2006-2007 Samsung Electronics
Advanced Linux Sound Architecture Driver Version 1.0.17.
ASoC version 0.13.2
WM9713/WM9714 SoC Audio Codec 0.15
asoc: AC97 HiFi <-> s3c64xx-ac97 mapping ok
ALSA device list:
#0: SMDK6400 (WM9713)
IPv4 over IPv4 tunneling driver
GRE over IPv4 tunneling driver
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
s3c-rtc s3c-rtc: setting system clock to 2030-04-12 05:34:48 UTC (1902202488)
Freeing init memory: 4180K
Loading, please wait...
depmod: chdir(2.6.27): No such file or directory
Begin: Loading essential drivers... ...
Done.
Begin: Running /scripts/init-premount ...
angel_leo 2010-04-13
  • 打赏
  • 举报
回复
恩,学习中
potty15 2010-04-13
  • 打赏
  • 举报
回复
之前主要是原来配置选项里没有OHCI驱动,后面加进去,然后拿ohci-s3c2410的来用,改了些错误

现在内核启动时ohci可以初始化加载上,现在的问题就是在内核启动的时候,ohci貌似是在探测硬件接口时都会出错,-64错误号,是超时的意思,比较奇怪
kyzf 2010-04-13
  • 打赏
  • 举报
回复
问题解决了吗?

好像这个得看BSP里面对应的驱动是否做好了?

MARK,帮顶下吧。

21,595

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 驱动开发/核心开发
社区管理员
  • 驱动开发/核心开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧