iMX31 linux USB question

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX31 linux USB question

2,650 Views
LeeT
Contributor I

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

0 Kudos
8 Replies

777 Views
fabio_estevam
NXP Employee
NXP Employee

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

0 Kudos

777 Views
LeeT
Contributor I

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

0 Kudos

777 Views
fabio_estevam
NXP Employee
NXP Employee

Host side is ehci-arc.c and ehci-hcd.c.

 

Please check SDK1.4 Reference Manual (Table 39.5).

 

(http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX31PDK&nodeId=0162468rH311432973Zr...

 

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

0 Kudos

777 Views
LeeT
Contributor I

Which brings me back to my original question. Where is the 1 mS USB interrupt that calls fsl_otg_tick_timer?

 

Lee

0 Kudos

777 Views
LeeT
Contributor I

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

0 Kudos

777 Views
LeeT
Contributor I
OK, I'll have to look at the config closer.
0 Kudos

777 Views
LeeT
Contributor I

Also the i.MX31 PDK 1.4 Linux Reference Manual shows /otg/fsl_ogc.c and /otg/otg_fsm.c as being part of the iMX linux USB tree. Is this not correct?

0 Kudos

777 Views
fabio_estevam
NXP Employee
NXP Employee

Just checked that fsl_otg.o nor fsl_otg.ko are generated by default SDK1.4 config.

 

Regards,

 

Fabio Estevam

0 Kudos