During manual linux kernel driver initialization of the USB-otg gadget drivers typically used in SONY readers PRS900 and above, I am getting spurrious interrupts on irq 37. It happens when the USB cable is not plugged in before the arcotg.ko driver loads for the first time for device/slave mode usb usage.
IT's reproduceable on a sonyPRS900 with the following code, reliably: ( modules_09xx.tgz or modules_10xx.tgz)
The interrupt happens on IRQ 37 which is the interrupt normally associated with USB data transfer on the iMX31.
When the interrupt happens, none of the flags in the usb_dr_device (imx31 OTG hardware registers) indicate an interrupt has happened, and the host is stopped, etc. eg: usbsts (USB Status Register) is clear.
Nor does pre-clearing the interrupts in the otgsc register solve the problem.
Although I have looked, I am having trouble finding hardware data sheets which describe interrupt sources for the USBOTG core in the iMX31, and how they are accessed/masked and routed to IRQ 37. I believe, a PHY isp1504 may be present;
Where do I find information on how *ALL* the interrupts of the iMX31 are generated for USB-OTG, serviced, and masked at the hardware level so I can figure out how to mark the spurrious interrupt as serviced?
Failure to do so causes the interrupt to be disabled all together by the linux kernel after ~32 failed requests and the driver no longer works or detects cable plug ins or removals.