On Tue, Nov 09, 2010 at 02:36:57PM +0100, Matthieu CASTET wrote:
> Hi Pavan,
>
> Pavan Kondeti a écrit :
>> On Tue, Nov 09, 2010 at 12:40:17PM +0100, Matthieu CASTET wrote:
>>
>> Hi Matthieu,
>>
>>>>
>>> This look like the arc/chipidea/mips ehci otg core.
>>
>> Yes. It is chipidea core for ARM.
>>> Why can't you reuse the ci13xxx_udc.c driver ?
>>> Or if ci13xxx_udc.c is too bad, rewrite a new generic version for this core.
>>>
>> ci13xxx_udc.c driver registers with PCI subsytem (ours is a platform 
>> subsystem),
>> does not manage clocks. msm72k_udc.c also takes care of initializing the
>> integrated PHY. We also need to program special registers (MSM-ARM specific)
>> upon resetting the hardware.
> Yes, but why not adding this to ci13xxx_udc.c instead of doing a new driver.
> For example adding platform subsystem is less than 150 lines of code.

I agree.
>
> I am not sure doing n drivers for a same hardware is a good idea.
>
> May be ci13xxx_udc.c isn't enough generic, but in this case don't do the  
> same mistake with the new driver.
>
Sure. Thanks for the advice.

> Make a generic core, and make the ulpi stuff (or other specific stuff)  
> in a glue around this code.
>
IMHO, generic core should handle the controller stuff (endpoint operations,
interrupts processing etc...) and leave the transceiver interaction to the
individual device controller driver.
> Look at host ehci : you don't need to rewrite ehci core. You only add a  
> glue around it.
>
Thanks for pointing to EHCI. ehci-hcd can support PCI/platform/PS3 buses.
It takes care of most of the things and yet gives flexibility to HCD to
implement their own methods.

I will hack ci13xxx_udc.c (platform bus support) and see how it goes. If
it works, I will see how ci13xxx_ stuff can be reused efficiently.

-- 
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

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

Reply via email to