From mboxrd@z Thu Jan 1 00:00:00 1970 From: linux@arm.linux.org.uk (Russell King - ARM Linux) Date: Sun, 2 May 2010 17:05:56 +0100 Subject: [PATCH 3/5] USB: add clk structure for systems that support clkdev framework In-Reply-To: References: <1272810162-14858-1-git-send-email-saeed@marvell.com> <1272810162-14858-2-git-send-email-saeed@marvell.com> <1272810162-14858-3-git-send-email-saeed@marvell.com> <1272810162-14858-4-git-send-email-saeed@marvell.com> <20100502143602.GA4233@n2100.arm.linux.org.uk> <20100502151425.GC4233@n2100.arm.linux.org.uk> <20100502153157.GD4233@n2100.arm.linux.org.uk> Message-ID: <20100502160555.GE4233@n2100.arm.linux.org.uk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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);