On Sun, May 2, 2010 at 7:05 PM, Russell King - ARM Linux <linux@xxxxxxxxxxxxxxxx> wrote: > On Sun, May 02, 2010 at 06:54:15PM +0300, saeed bishara wrote: >> >> well, I think that those drivers that have more than one clk can be >> >> redesigned by adding virtual clk for the the usb host, and the clk >> >> implementation for that soc should manage all the underlying physical >> >> clocks. I've looked at the omap,at91 and atmel, and it looks to me >> >> that this is doable. you see can see that the clk stuff in those >> >> driver has nothing to do with usb itself. what do you think? >> > >> > Not happy with this for two reasons: >> > 1. You're assuming that they can be managed as one entity; that doesn't seem >> > true for some of the drivers. >> can you please give an example? > > drivers/usb/host/ohci-da8xx.c has two clocks, and needs to know the > configuration of the USB block to know whether to manage the USB2.0 > clock: > > cfgchip2 = __raw_readl(CFGCHIP2); > if (on) { > clk_enable(usb11_clk); > > /* > * If USB 1.1 reference clock is sourced from USB 2.0 PHY, we > * need to enable the USB 2.0 module clocking, start its PHY, > * and not allow it to stop the clock during USB 2.0 suspend. > */ > if (!(cfgchip2 & CFGCHIP2_USB1PHYCLKMUX)) { > clk_enable(usb20_clk); > David, can I've your opinion about this patch? adding the clk struct to the hcd struct will save the orion-ehci driver from having private data structure. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html