Hi, On Fri, Sep 30, 2011 at 02:56:40PM +0530, Munegowda, Keshava wrote: > >> >> Usually there's something wrong with omap_devices that contain > >> >> multiple hwmods. Is there some reason why there isn't a separate driver > >> >> for the TLL? Judging by a brief look at drivers/mfd/omap_usb_host.c, the > >> >> TLL handling looks logically distinct? > >> > > >> > Yes, I have the same feeling. To my understanding, USB Host Subsystem on > >> > OMAP is composed of the Transceiver-less link (TLL) and USB Host (UHH). > >> > Aparently, they could be handled by separate drivers. > >> > > >> > -- > >> > balbi > >> > >> yes, it can be as two separate drivers for uhh and tll; But i don't > >> think driver can be used effectively. > >> Now ehci and ohci gets the clocks , config reg and port settings > >> through usb host which is sufficient. > >> If you make them as two different drivers; then ehci and ohci has to > >> interact with both the drivers separately. > >> which will be an unnecessary complications. I feel not divided this > >> driver into two > > > > Come again, EHCI/OHCI need clocks from UHH and TLL ?? If that's the > > case, then there's really no easy way to handle this as a device can > > have only one parent. > > yes, if you are using ehci phy mode ( port modes of UHH_HOSTCONFIG register) > then uhh functional ( omap3: interface clocks too) is sufficient; > if you are using ehci in tll mode , then you need tll functional clock too. But those clocks are fed into UHH and TLL respectively, not EHCI/OHCI, right ? IOW, EHCI/OHCI only need those clocks to be stable in order for it to work. I'm trying to think of a way to decouple that but nothing comes to mind right now... Ideally, calling pm_runtime_get_sync() on EHCI/OHCI would make all clocks enabled and the only way I see for that to happen is to make TLL parent of UHH which is parent of EHCI/OHCI, but I'm not sure that makes a lot of sense. Paul, do you have any tip which we could use ? What we need is to be able to call pm_runtime_get_sync() or ehci-omap.c and that should enable UHH clocks and if (port->mode == TLL) enable TLL clocks. We still want to split UHH and TLL into separate drivers. -- balbi
Attachment:
signature.asc
Description: Digital signature