> The SET_ADDRESS request is received just fine, it then sets > musb->ep0_state = MUSB_EP0_STAGE_STATUSIN; but no IRQ arrives to trigger > another call to musb_g_ep0_irq. Eventually, the host just sends back > another SET_REQUEST. Looking at dmesg on the host (Device not responding > to set address), I guess that the device should send something back and > it apparently doesn't. > > Do you have any clue?
To get a better understanding of what is going on, I added debug prints to the Linux kernel (since that musb-new driver is apparently a direct copy of the Linux code). In Linux, everything is working nicely (for instance with ADB on Android). The relevant part is this: [ 8.616943] adb_open [ 8.674926] generic_interrupt: 1 0 0 [ 8.678680] ** IRQ peripheral usb0001 tx0000 rx0000 [ 8.683807] [ED_MC]1-2.<INT>USB_SUSPEND [ 8.777709] generic_interrupt: 4 0 0 [ 8.781433] ** IRQ peripheral usb0004 tx0000 rx0000 [ 8.893463] omapdss DSI error: DSI CIO error, cio irqstatus 400 [ 8.893493] DSI CIO IRQ 0x400: ERRCONTROL1 [ 8.929138] generic_interrupt: 8 1 0 [ 8.932922] ** IRQ peripheral usb0008 tx0001 rx0000 [ 8.938049] musb_g_ep0_irq: Current EP0 state is 0x1 [ 8.943267] service_zero_data_request: SET_ADDRESS [ 8.948303] new ep0 state is 4 [ 8.951507] Writing ACKPEND 0x48 [ 8.954925] generic_interrupt: 8 1 0 [ 8.958679] ** IRQ peripheral usb0008 tx0001 rx0000 [ 8.963806] musb_g_ep0_irq: Current EP0 state is 0x4 [ 8.969024] musb_g_ep0_irq: Actually setting address now! [ 8.974670] musb_g_ep0_irq: MUSB_EP0_STAGE_STATUSOUT now [ 8.983337] omapdss DSI error: DSI CIO error, cio irqstatus 100400 [ 8.983367] DSI CIO IRQ 0x100400: ERRCONTROL1 ERRCONTENTIONLP0_1 [ 9.077239] generic_interrupt: 8 1 0 [ 9.080993] ** IRQ peripheral usb0008 tx0001 rx0000 [ 9.086120] musb_g_ep0_irq: Current EP0 state is 0x0 [ 9.091400] generic_interrupt: 8 1 0 To put in perspective with my current U-Boot log: musb_register musb_init_controller omap2430_musb_init HS USB OTG: revision 0x40, sysconfig 0x1008, sysstatus 0x1, intrfsel 0x1, simenable 0x0 omap2430_musb_disable musb_gadget_setup USB Peripheral mode controller at 480ab000 using PIO, IRQ 0 Hit any key to stop autoboot: 0 usb_gadget_register_driver musb_gadget_start musb_start omap2430_musb_enable fastboot_add adding 'f_fastboot'/9fe50480 to config 'usb_dnload'/9fe503c0 fastboot_bind IN fastboot_bind OUT generic_interrupt: 45 1 0 ** IRQ peripheral usb002d tx0001 rx0000 <== Power=f0, DevCtl=98, int_usb=0x2d csr 0001, count 8, myaddr 0, ep0stage idle musb-hdrc: peripheral reset irq lost! musb_g_ep0_irq: power: 0xf0 speed: 0x3 new ep0 state is 6 service_zero_data_request() service_zero_data_request: SET_ADDRESS new ep0 state is 4 Writing ACKPEND 0x48 generic_interrupt: 1 0 0 ** IRQ peripheral usb0001 tx0000 rx0000 <== Power=e0, DevCtl=99, int_usb=0x1 generic_interrupt: 4 0 0 ** IRQ peripheral usb0004 tx0000 rx0000 <== Power=f0, DevCtl=99, int_usb=0x4 generic_interrupt: 8 0 0 ** IRQ peripheral usb0008 tx0000 rx0000 <== Power=f0, DevCtl=99, int_usb=0x8 generic_interrupt: 8 0 0 ** IRQ peripheral usb0008 tx0000 rx0000 <== Power=f0, DevCtl=99, int_usb=0x8 The difference between both is apparently that the first IRQ I get in U-Boot has, in addition to TX, an USB IRQ with value 0x2D. 0x2D is MUSB_INTR_DISCONNECT | MUSB_INTR_SUSPEND | MUSB_INTR_RESET | MUSB_INTR_BABBLE I'm a bit worried about MUSB_INTR_DISCONNECT, which normally indicates that the device was disconnected. In any case, I'm not getting the second TX message which is supposed to let the actual address set take place. I would appreciate a some highlights from people using this on the BeagleBoard, where it is apparently supposed to work. My current code (including debug prints) is at: http://git.code.paulk.fr/gitweb/?p=u-boot-sniper.git;a=shortlog;h=refs/heads/debug Thanks, have a nice holiday season! -- Paul Kocialkowski, Replicant developer Replicant is a fully free Android distribution running on several devices, a free software mobile operating system putting the emphasis on freedom and privacy/security. Website: http://www.replicant.us/ Blog: http://blog.replicant.us/ Wiki/tracker/forums: http://redmine.replicant.us/
signature.asc
Description: This is a digitally signed message part
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot