Re: Testing glue layer for DWC3 device controller

2013-11-18 Thread Amit Virdi

Dear Felipe,

On 11/15/2013 11:04 PM, Felipe Balbi wrote:

please send your glue layer sources and any logs you might have. PHY
drivers are loading at subsys_initcall and gadget drivers are loading at
module_init(). I don't see how that could happen :-s


Thanks for your inputs. I was using module_init for my PHY driver. 
Although DWC3 probe was deferred until PHY was registered, udc_start was 
not called and, hence, the device didn't change state to running.


Using subsys_initcall, I see that the PHY is probed first and then the 
gadget driver is loaded thereby, resolving the problem.


Regards
Amit Virdi
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Testing glue layer for DWC3 device controller

2013-11-18 Thread Felipe Balbi
Hi,

On Mon, Nov 18, 2013 at 05:32:32PM +0530, Amit Virdi wrote:
 On 11/15/2013 11:04 PM, Felipe Balbi wrote:
 please send your glue layer sources and any logs you might have. PHY
 drivers are loading at subsys_initcall and gadget drivers are loading at
 module_init(). I don't see how that could happen :-s
 
 Thanks for your inputs. I was using module_init for my PHY driver.
 Although DWC3 probe was deferred until PHY was registered, udc_start
 was not called and, hence, the device didn't change state to
 running.
 
 Using subsys_initcall, I see that the PHY is probed first and then
 the gadget driver is loaded thereby, resolving the problem.

good to know :-) I'll try to find time to fix that properly though. We
should be able to have everything at module_init.

-- 
balbi


signature.asc
Description: Digital signature


Testing glue layer for DWC3 device controller

2013-11-15 Thread Amit Virdi

Hi All,

I'm new to this USB driver development so posting this email. Currently, 
I'm using Kernel version 3.12-rc5


In my SoC, there's Synopsys' DWC3 USB controller configured in device 
mode. This is integrated with our internal USB3.0 PHY and USB 2.0 PHY 
taken from synopsys. I'm done with the initial coding and now I want to 
test the glue layer logic implemented. I have compiled and statically 
linked the drivers.


When I boot my kernel, I see that the PHY and the DWC3 driver is probed 
successfully. However, the device doesn't enumerate. I debugged this and 
found that the device specific registers are not configured at all. More 
debugging followed and I figured out that the probe for zero gadget is 
called before the phy and the device is probed.


So, how can I test the driver by *not* modularizing the phy and the 
controller drivers.


I would be thankful for any help.

Regards
Amit Virdi
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Testing glue layer for DWC3 device controller

2013-11-15 Thread Felipe Balbi
Hi,

On Fri, Nov 15, 2013 at 03:33:45PM +0530, Amit Virdi wrote:
 I'm new to this USB driver development so posting this email.
 Currently, I'm using Kernel version 3.12-rc5
 
 In my SoC, there's Synopsys' DWC3 USB controller configured in device
 mode. This is integrated with our internal USB3.0 PHY and USB 2.0 PHY
 taken from synopsys. I'm done with the initial coding and now I want
 to test the glue layer logic implemented. I have compiled and
 statically linked the drivers.
 
 When I boot my kernel, I see that the PHY and the DWC3 driver is
 probed successfully. However, the device doesn't enumerate. I
 debugged this and found that the device specific registers are not
 configured at all. More debugging followed and I figured out that the
 probe for zero gadget is called before the phy and the device is
 probed.
 
 So, how can I test the driver by *not* modularizing the phy and the
 controller drivers.
 
 I would be thankful for any help.

please send your glue layer sources and any logs you might have. PHY
drivers are loading at subsys_initcall and gadget drivers are loading at
module_init(). I don't see how that could happen :-s

cheers

-- 
balbi


signature.asc
Description: Digital signature