On 2/10/2010 6:32 PM, Andrew de Quincey wrote:
> Hi, thanks for the .config, that helped getting my dev system setup a
> lot. Anyway, attached is a backport against the android-msm-htc-2.6.25
> branch; I can't guarantee it'll work properly as the kernel EHCI stack
> has definitely changed a bit since .25. It compiles though, what more
> testing do we need? :)
>
> I'm only going to support the standard linux USB host + gadget
> frameworks: that's what all the linux USB OTG support is based on, and I
> can't be bothered porting all that to the android specific USB_FUNCTION
> stuff. If someone else does though, I've no objections!
>
> I'm going to start reading up on OTG drivers to take this beyond the
> prototype stage.
>
> --
> unsubscribe: android-kernel+***@googlegroups.com
> website: http://groups.google.com/group/android-kernel
Thanks, Andrew. This patch applies perfectly.
I build a new kernel with usb host config. See the attachment.
The kernel boots up fine, with driver starting seemingly fine. However,
plugging in a USB disk does not cause any kernel messages. I did take a
look of interrupt, there is no usb interrupts at all. See below.
Any ideas?
One thing I think could be the issue is that the USB connector might be
wrong for the host side.
Cheers.
Jun
----------------
[ 0.558361] smd_init()
[ 0.558392] smd_core_init()
[ 0.558605] smd_alloc_channel() 'SMD_RPCCALL' cid=2, shared=e010d9a0
[ 0.558911] smd_alloc_channel() 'SMD_DATA5' cid=11, shared=e0119a18
[ 0.559124] smd_alloc_channel() 'SMD_DATA6' cid=12, shared=e011da40
[ 0.559368] smd_alloc_channel() 'SMD_DATA7' cid=13, shared=e0121a68
[ 0.559582] smd_alloc_channel() 'SMD_DATA11' cid=17, shared=e01119c8
[ 0.559796] smd_alloc_channel() 'SMD_CS_A2M' cid=33, shared=e01159f0
[ 0.560091] smd_alloc_channel() 'SMD_DATA5_CNTL' cid=38, shared=e0125a90
[ 0.560366] smd_alloc_channel() 'SMD_DATA6_CNTL' cid=39, shared=e0129ab8
[ 0.560640] smd_alloc_channel() 'SMD_DATA7_CNTL' cid=40, shared=e012dae0
[ 0.560915] smd_core_init() done
[ 0.563326] SMD: ch 2 OPENING -> OPENED
[ 0.564791] hw3d: 0 init
[ 0.565249] msm_perf_init():
[ 0.566835] H2W: Registering H2W (headset) driver
[ 0.569033] input: h2w headset as /class/input/input0
[ 0.582471] RPC_TIME_TOD_SET_APPS_BASES:
[ 0.582471] tick = 339413
[ 0.582502] stamp = 855640006
[ 0.584302] ashmem: initialized
[ 0.585920] yaffs Jan 20 2010 21:15:37 Installing.
[ 0.586073] io scheduler noop registered
[ 0.586103] io scheduler anticipatory registered (default)
[ 0.586896] logger: created 64K log 'log_main'
[ 0.587080] logger: created 256K log 'log_events'
[ 0.587263] logger: created 64K log 'log_radio'
[ 0.587415] ram_console: got buffer at 16d00000, size 20000
[ 0.587904] ram_console: uncorrectable error in header
[ 0.587995] ram_console: no valid data in buffer (sig = 0xc7effffe)
[ 0.588026] console [ram-1] enabled
[ 0.591678] pmem: 1 init
[ 0.601129] pmem_adsp: 0 init
[ 0.602166] pmem_gpu0: 0 init
[ 0.603509] pmem_gpu1: 0 init
[ 0.605157] pmem_camera: 0 init
[ 0.606805] mddi_pmdh: init() base=0xe000b000 irq=16
[ 0.625493] get_smem_clock: state 10429 clock 0
[ 0.650244] mddi cmd send rtd: int 3a000, stat 8063, rtd val d
[ 0.670762] mddi_pmdh: publish: mddi_c_d263_0000
[ 0.672929] vsync on gpio 97 now 0
[ 0.673265] mddi_pmdh: mddi_add_panel(c039bda0, c02f44ac)
[ 0.673540] mddi_pmdh: publish: mddi_panel
[ 0.674272] msmfb_probe() installing 320 x 480 panel
[ 0.696286] smd_alloc_channel() 'SMD_GPSNMEA' cid=27, shared=e0131b10
[ 0.710976] msm_serial: detected port #0
[ 0.711464] msm_serial.0: ttyMSM0 at MMIO 0xa9a00000 (irq = 9) is a MSM
[ 0.712746] msm_serial: driver initialized
[ 0.714913] loop: module loaded
[ 0.715279] PPP generic driver version 2.4.2
[ 0.716042] PPP Deflate Compression module registered
[ 0.716347] PPP BSD Compression module registered
[ 0.726500] allocated dma buffer at ffc01000, dma_addr 16166000
[ 0.726958] read CFG0 = aad400c0, CFG1 = 4745c
[ 0.727507] CFG0 = e8d408c0, CFG1 = 4745c
[ 0.727812] CFG0: cw/page=3 ud_sz=516 ecc_sz=10 spare_sz=1
num_addr_cycles=5
[ 0.728575] NAND_READ_ID = 1500aaec
[ 0.729124] status: c03120
[ 0.729429] nandid: 1500aaec maker ec device aa
[ 0.729735] CFG0: cw/page=3 ud_sz=512 ecc_sz=10 spare_sz=5
[ 0.730396] DEV_CMD1: f00f3000
[ 0.730885] NAND_EBI2_ECC_BUF_CFG: 1ff
[ 0.731434] flash_id: 1500aaec size 10000000
[ 0.731739] Creating 6 MTD partitions on "msm_nand":
[ 0.732044] 0x024c0000-0x02500000 : "misc"
[ 0.733448] 0x026c0000-0x02bc0000 : "recovery"
[ 0.734547] 0x02bc0000-0x02e40000 : "boot"
[ 0.735615] 0x02e40000-0x071c0000 : "system"
[ 0.736927] 0x071c0000-0x0b540000 : "cache"
[ 0.738087] 0x0b540000-0x10000000 : "userdata"
[ 0.750091] msm_hsusb msm_hsusb: Qualcomm MSM7201 On-Chip EHCI Host
Controller
[ 0.751068] msm_hsusb msm_hsusb: new USB bus registered, assigned bus
number 1
[ 0.780213] msm_hsusb msm_hsusb: irq 47, io mem 0xa0800000
[ 0.790091] msm_hsusb msm_hsusb: USB 2.0 started, EHCI 1.00, driver
10 Dec 2004
[ 0.792044] usb usb1: configuration #1 chosen from 1 choice
[ 0.792929] hub 1-0:1.0: USB hub found
[ 0.793387] hub 1-0:1.0: 1 port detected
[ 0.800915] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 0.801495] usb usb1: New USB device strings: Mfr=3, Product=2,
SerialNumber=1
[ 0.801800] usb usb1: Product: Qualcomm MSM7201 On-Chip EHCI Host
Controller
[ 0.802349] usb usb1: Manufacturer: Linux 2.6.25-01843-gfea26b0 ehci_hcd
[ 0.802899] usb usb1: SerialNumber: msm_hsusb
[ 0.803540] Initializing USB Mass Storage driver...
[ 0.804058] usbcore: registered new interface driver usb-storage
[ 0.804608] USB Mass Storage support registered.
[ 0.810427] mice: PS/2 mouse device common for all mice
[ 0.847659] smd_alloc_channel() 'SMD_DS' cid=0, shared=e0135b38
[ 0.848575] smd_alloc_channel() 'SMD_DATA1' cid=7, shared=e0139b60
[ 0.849613] smd_alloc_channel() 'SMD_DATA2' cid=8, shared=e013db88
[ 0.850396] smd_alloc_channel() 'SMD_DATA3' cid=9, shared=e0141bb0
[ 0.851251] smd_alloc_channel() 'SMD_DATA4' cid=10, shared=e0145bd8
[ 0.870579] msm_i2c msm_i2c.0: Error during data xfer (-5)
[ 0.881403] synaptics_ts_probe: Product Major Version 1
[ 0.883173] synaptics_ts_probe: Product Minor Version c
[ 0.884669] synaptics_ts_probe: product property 2
[ 0.886164] synaptics_ts_probe: device control 81
[ 0.887904] synaptics_ts_probe: interrupt enable 3
[ 0.890000] synaptics_ts_probe: 0xe0: 1 1 1 2 1 c 0 0
[ 0.890000] synaptics_ts_probe: max_x 3480, max_y 5368
[ 0.890000] synaptics_ts_probe: inactive_x -80 -80, inactive_y -32 -32
[ 0.890000] synaptics_ts_probe: snap_x 240-248 240-248, snap_y 80-88
80-88
[ 0.890488] input: synaptics-rmi-touchscreen as /class/input/input1
[ 0.950763] synaptics_ts_probe: Start touchscreen
synaptics-rmi-touchscreen in interrupt mode
[ 0.951556] GPIO Event Driver
[ 0.952349] GPIO Keypad Driver: Start keypad matrix for
trout-keypad-v3 in interrupt mode
[ 0.953051] No IRQF_TRIGGER set_type function for IRQ 191 (troutgpio)
[ 0.953387] No IRQF_TRIGGER set_type function for IRQ 192 (troutgpio)
[ 0.953997] GPIO Input Driver: Start gpio inputs for trout-keypad-v3
in interrupt mode
[ 0.954333] No IRQF_TRIGGER set_type function for IRQ 188 (troutgpio)
[ 0.954913] GPIO Input Driver: Start gpio inputs for trout-keypad-v3
in interrupt mode
[ 0.955951] input: trout-keypad-v3 as /class/input/input2
[ 1.010885] No IRQF_TRIGGER set_type function for IRQ 186 (troutgpio)
[ 1.011495] GPIO Input Driver: Start gpio inputs for trout-nav in
interrupt mode
[ 1.012319] input: trout-nav as /class/input/input3
[ 1.071495] rs30000048:0da5b528 rs30000048:0da5b528: rtc core:
registered msm_rtc as rtc0
[ 1.075554] Registered led device: blue
[ 1.076134] Registered led device: green
[ 1.076591] Registered led device: red
[ 1.077263] AKM8976A compass driver: init
[ 1.077660] No IRQF_TRIGGER set_type function for IRQ 187 (troutgpio)
[ 1.078819] input: compass as /class/input/input4
[ 1.101068] pdev->dev.platform_data is not NULL
[ 1.101495] mt9t013: probe
[ 1.102044] mt9t013: init
[ 1.102319] mt9t013: mt9t013_register_init
[ 1.102624] mt9t013: camera sensor_reset set as 1
[ 1.105188] mt9t013: clk_get(vfe_mdc_clk): c02e4cc8
[ 1.105523] mt9t013: clk_get(mdc_clk): c02e4948
[ 1.105859] mt9t013: clk select 1
[ 1.106378] mt9t013: clk_get(vfe_clk): c02e4ca8
[ 1.106744] mt9t013: enable vfe_clk
[ 1.130061] mt9t013: clk select 0
[ 1.139124] mt9t013: camera sensor init sequence done
[ 1.139430] mt9t013: camera sensor suspend sequence
[ 1.140091] mt9t013: disabling vfe_clk
[ 1.140427] mt9t013: clk_put(vfe_clk): c02e4ca8
[ 1.140976] mt9t013: camera sensor suspend sequence done
[ 1.142044] Bluetooth: HCI UART driver ver 2.2
[ 1.142380] Bluetooth: HCI H4 protocol initialized
[ 1.142899] Bluetooth: HCILL protocol initialized
[ 1.144150] mmc0: Qualcomm MSM SDCC at 0x00000000e1000000 irq 24,0 dma -1
[ 1.144730] mmc0: 4 bit data mode enabled
[ 1.145004] mmc0: MMC clock 144000 -> 20000000 Hz, PCLK 64000000 Hz
[ 1.145554] mmc0: Slot eject status = 1
[ 1.145828] mmc0: Power save feature enable = 0
[ 1.146134] mmc0: PIO transfer enabled
[ 1.147629] mmc1: Qualcomm MSM SDCC at 0x00000000e1001000 irq 26,194
dma 8
[ 1.147965] mmc1: 4 bit data mode enabled
[ 1.148514] mmc1: MMC clock 144000 -> 20000000 Hz, PCLK 64000000 Hz
[ 1.148789] mmc1: Slot eject status = 0
[ 1.149094] mmc1: Power save feature enable = 0
[ 1.149613] mmc1: DM non-cached buffer at ffc06000, dma_addr 0x16189000
[ 1.149918] mmc1: DM cmd busaddr 370708480, cmdptr busaddr 370709248
[ 1.150732] Registered led device: spotlight
[ 1.151281] Registered led device: keyboard-backlight
[ 1.152044] Registered led device: button-backlight
[ 1.152838] No IRQF_TRIGGER set_type function for IRQ 190 (troutgpio)
[ 1.154028] usbcore: registered new interface driver usbhid
[ 1.154364] drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
[ 1.155432] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[ 1.163875] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 1.164638] TCP cubic registered
[ 1.165066] NET: Registered protocol family 1
[ 1.165523] NET: Registered protocol family 17
[ 1.166134] Bluetooth: L2CAP ver 2.9
[ 1.166439] Bluetooth: L2CAP socket layer initialized
[ 1.166958] Bluetooth: SCO (Voice Link) ver 0.6
[ 1.167263] Bluetooth: SCO socket layer initialized
[ 1.167934] Bluetooth: RFCOMM socket layer initialized
[ 1.168575] Bluetooth: RFCOMM TTY layer initialized
[ 1.168880] Bluetooth: RFCOMM ver 1.9
[ 1.169826] clock_late_init() disabled 18 unused clocks
[ 1.173204] rs30000048:0da5b528 rs30000048:0da5b528: setting system
clock to 2010-02-12 18:00:18 UTC (1265997618)
[ 1.173906] Freeing init memory: 104K
[ 1.174303] Warning: unable to open an initial console.
[ 1.361495] init: cannot open '/initlogo.rle'
[ 1.367415] yaffs: dev is 32505859 name is "mtdblock3"
[ 1.367995] yaffs: passed flags ""
[ 1.368300] yaffs: Attempting MTD mount on 31.3, "mtdblock3"
[ 1.400000] yaffs: restored from checkpoint
[ 1.400000] yaffs_read_super: isCheckpointed 1
[ 1.431373] yaffs: dev is 32505861 name is "mtdblock5"
[ 1.431922] yaffs: passed flags ""
[ 1.432228] yaffs: Attempting MTD mount on 31.5, "mtdblock5"
[ 1.456347] yaffs: restored from checkpoint
[ 1.456988] yaffs_read_super: isCheckpointed 1
[ 1.466073] yaffs: dev is 32505860 name is "mtdblock4"
[ 1.466653] yaffs: passed flags ""
[ 1.466958] yaffs: Attempting MTD mount on 31.4, "mtdblock4"
[ 1.471587] yaffs: restored from checkpoint
[ 1.472197] yaffs_read_super: isCheckpointed 1
[ 1.501007] init: service 'console' requires console
[ 2.218087] warning: `rild' uses 32-bit capabilities (legacy support
in use)
[ 2.268911] mmc_sd_init_card: Delay 250 ms
[ 2.628087] mmc1: host does not support reading read-only switch.
assuming write-enable.
[ 2.628545] mmc1: new SD card at address aaaa
[ 2.631587] mmcblk0: mmc1:aaaa SU01G 992000KiB
[ 2.632289] mmcblk0: p1
[ 2.638758] FAT: bogus number of reserved sectors
[ 2.639399] VFS: Can't find a valid FAT filesystem on dev mmcblk0.
[ 3.062906] SMD: ch 0 OPENING -> OPENED
[ 3.063913] qmi: smd closed
[ 3.064248] SMD: ch 38 OPENING -> OPENED
[ 3.064523] qmi: smd opened
[ 3.065286] qmi: smd closed
[ 3.065622] SMD: ch 39 OPENING -> OPENED
[ 3.065927] qmi: smd opened
[ 3.066812] qmi: smd closed
[ 3.067392] SMD: ch 40 OPENING -> OPENED
[ 3.067666] qmi: smd opened
[ 3.069650] qmi: ctl: wds use client_id 0x01
[ 3.070128] qmi: ctl: wds use client_id 0x01
[ 3.070434] qmi: ctl: wds use client_id 0x01
[ 5.166056] init: untracked pid 60 exited
[ 5.216087] init: untracked pid 62 exited
[ 12.651283] init sharp panel
[ 17.201516] android_power: wakeup (0->0) at 24781448974 (2010-02-12
18:00:41.738067627 UTC)
[ 17.845576] wlan: no version for "struct_module" found: kernel tainted.
[ 17.887621] TIWLAN: Driver loading
[ 17.888048] trout_wifi_power: 1
[ 18.100001] trout_wifi_reset: 0
[ 18.154020] trout_wifi_set_carddetect: 1
[ 18.154569] mmc0: card_present 1
[ 18.154874] mmc0: Slot status change detected (0 -> 1)
[ 18.170083] mmc0: card claims to support voltages below the defined
range. These will be ignored.
[ 18.170083] mmc0: SDIO card claims to support the incompletely
defined 'low voltage range'. This will be ignored.
[ 18.170083] mmc0: new SDIO card at address 0001
[ 18.170083] TIWLAN: Found SDIO controller (vendor 0x104c, device 0x9066)
[ 18.174966] TIWLAN: Driver initialized (rc 0)
[ 18.175576] TIWLAN: Driver loaded
[ 29.151946] audmgr_rpc_thread() start
[ 29.152892] audio_enable()
[ 29.161550] audmgr: rpc_reply status 0
[ 29.180329] audmgr: rpc READY handle=0x00000000
[ 29.244144] audmgr: rpc CODEC_CONFIG volume=0x00002000
[ 29.245120] audpp: enable
[ 29.245517] adsp: opening module AUDPPTASK
[ 29.248721] adsp: module AUDPPTASK has been registered
[ 29.249270] msm_adsp_enable() 'AUDPPTASK'
[ 29.251000] adsp: rpc event=0, proc_id=2, module=4, image=0
[ 29.251489] adsp: module AUDPPTASK: READY
[ 29.253350] audpp: ENABLE
[ 29.253655] audio_dsp_event: CFG_MSG ENABLE
[ 29.256982] adsp: waiting for DSP write ready
[ 29.356861] audpp: DMA missed
[ 29.856861] audpp: DMA missed
[ 30.552833] audpp: DMA missed
[ 30.908875] audpp: DMA missed
[ 31.776892] audpp: DMA missed
[ 32.520880] audpp: DMA missed
[ 34.920363] audio_disable()
[ 34.921980] audio_dsp_event: CFG_MSG DISABLE
[ 34.922255] audpp: disable
[ 34.923567] msm_adsp_disable() 'AUDPPTASK'
[ 34.924116] audpp: DISABLE
[ 34.925459] adsp: closing module AUDPPTASK
[ 34.925795] adsp: disable interrupt
[ 34.930454] audmgr: rpc_reply status 0
[ 34.959182] audmgr: DISABLED
[ 44.847297] NOHZ: local_softirq_pending 08
[ 44.853147] NOHZ: local_softirq_pending 08
[ 45.090095] NOHZ: local_softirq_pending 08
[ 56.490101] NOHZ: local_softirq_pending 08
[ 56.490101] NOHZ: local_softirq_pending 08
[ 56.490101] NOHZ: local_softirq_pending 08
[ 56.520101] NOHZ: local_softirq_pending 08
[ 58.440102] NOHZ: local_softirq_pending 08
[ 58.499867] NOHZ: local_softirq_pending 08
[ 60.980103] NOHZ: local_softirq_pending 08
/ # cat /proc/interrupts
CPU0
0: 353 msm smd_dev
1: 0 msm debug
5: 2068 msm smsm_dev
7: 9565 msm gp_timer
8: 0 msm dg_timer
16: 1852 msm mddi_pmdh
19: 1090 msm msm_mdp
20: 0 msm hw3d
21: 42550 msm msmdatamover
23: 69 msm adsp
24: 2185 msm msm-sdcc (cmd)
26: 74 msm msm-sdcc (cmd)
34: 5515 msm msm_i2c
47: 0 msm ehci_hcd:usb1
82: 1 msmgpio gpio_event_axis
83: 2 msmgpio gpio_event_axis
84: 0 msmgpio gpio_keys
93: 1202 msmgpio tiwlan0
100: 0 msmgpio gpio_kp
101: 0 msmgpio gpio_kp
102: 0 msmgpio gpio_kp
103: 8 msmgpio gpio_kp
104: 0 msmgpio gpio_kp
105: 0 msmgpio gpio_kp
106: 1 msmgpio gpio_kp
113: 0 msmgpio h2w_button
147: 0 msmgpio h2w_detect
154: 1 msmgpio gpio_event_axis
158: 1 msmgpio gpio_event_axis
161: 839 msmgpio vsync
186: 0 troutgpio gpio_keys
187: 0 troutgpio akm8976
188: 0 troutgpio gpio_keys
190: 0 troutgpio switch-gpio
191: 0 troutgpio gpio_keys
192: 0 troutgpio gpio_keys
193: 279 troutgpio synaptics-rmi-ts
194: 0 troutgpio msm-sdcc (slot)
Err: 0
/ #
--
unsubscribe: android-kernel+***@googlegroups.com
website: http://groups.google.com/group/android-kernel