I'm looking at the USB code for the iMX31 linux port and I have a question. In the file fsl_otg.c (usb/otg directory) the function fsl_otg_tick_timer has a comment that it's called by a 1mS timer interrupt. However I dont see anything calling this function, or a 1mS usb interrupt. Am I missing some file(s)? Or just missing the appropriate section to look in? Thanks.
Lee
fsl_otg.c is not a file used on MX31. It is for Freescale PowerPC processors.
For MX31 you can look at drivers/usb/gadget/arcotg_udc.c
Regards,
Fabio Estevam
Thanks for the fast response. Looking at the usb directories can I assume that the correct OTG host side code is ehci-arc.c? If so, my next question is, since OTG can be either a host or a device (gadget), there must be some part of the code that detects the type of plug used, in order to determine this. I found it in fsl_otg.c. Since that's not the appropriate code, can you tell me where the same function occurs for the iMX? Thanks.
Lee
Host side is ehci-arc.c and ehci-hcd.c.
Please check SDK1.4 Reference Manual (Table 39.5).
Click on IMX31_PDK14_LINUXDOCS_BUNDLE )
Sorry for my previous post. Table 39.5 does indicate that fsl_otg.c is also used by MX31.
Regards,
Fabio Estevam
Looking at the config and the code, it appears that arcotg_udc.c creates a gadget side device and ehci_arc.c creates a host side device. Can I assume from this that the otg directory code handles OTG devices, which is what I'm trying to accomplish? I see code for determining which side of a connection the OTG device is, and OTG protocol handlers, etc.
Lee
Just checked that fsl_otg.o nor fsl_otg.ko are generated by default SDK1.4 config.
Regards,
Fabio Estevam