Re: [PATCH E 11/14] OMAP clock: track child clocks

2009-03-03 Thread Russell King - ARM Linux
On Mon, Mar 02, 2009 at 04:02:14PM -0700, Paul Walmsley wrote: > Suggest returning a more specific error than -EINVAL: > > if (clk->usecount > 0) > return -EBUSY; Done. -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kern

Re: [PATCH E 11/14] OMAP clock: track child clocks

2009-03-02 Thread Paul Walmsley
Hello Russell, On Mon, 23 Feb 2009, Russell King - ARM Linux wrote: > On Thu, Feb 19, 2009 at 06:50:52PM -0600, Woodruff, Richard wrote: > > The historic usage of this has been against single use leaf clocks (1st > > instance of gptimer). When it was used it did: > > clk_get() > >

Re: [PATCH E 11/14] OMAP clock: track child clocks

2009-02-25 Thread Paul Walmsley
Hello Russell, On Sat, 14 Feb 2009, Russell King - ARM Linux wrote: > On Sat, Feb 14, 2009 at 11:23:25AM +, Russell King - ARM Linux wrote: > > There's also a second issue - the comments before omap2_divisor_to_clksel() > > indicate that this function returns 0x on error. Unfortunate

RE: [PATCH E 11/14] OMAP clock: track child clocks

2009-02-24 Thread Woodruff, Richard
> From: Russell King - ARM Linux [mailto:li...@arm.linux.org.uk] > Sent: Monday, February 23, 2009 10:04 AM > To: Woodruff, Richard > Ack? Ack. > diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c > index 08baa18..b2d9e1f 100644 > --- a/arch/arm/plat-omap/clock.c > +++ b/arch/

Re: [PATCH E 11/14] OMAP clock: track child clocks

2009-02-24 Thread Russell King - ARM Linux
On Sun, Feb 22, 2009 at 04:37:31PM -0700, Paul Walmsley wrote: > Hello Russell, > > On Sat, 14 Feb 2009, Russell King - ARM Linux wrote: > > However, looking a little deeper, there's more issues in the reparenting > > area. I don't think this code has been tested at all... In > > _omap2_clksel_g

Re: [PATCH E 11/14] OMAP clock: track child clocks

2009-02-23 Thread Russell King - ARM Linux
On Thu, Feb 19, 2009 at 06:50:52PM -0600, Woodruff, Richard wrote: > The historic usage of this has been against single use leaf clocks (1st > instance of gptimer). When it was used it did: > clk_get() > clk_set_parent() > clk_enable() > > This usage was ok for that. Use

Re: [PATCH E 11/14] OMAP clock: track child clocks

2009-02-22 Thread Paul Walmsley
Hello Russell, On Sat, 14 Feb 2009, Russell King - ARM Linux wrote: > However, looking a little deeper, there's more issues in the reparenting > area. I don't think this code has been tested at all... In > _omap2_clksel_get_src_field, there is this: > > for (clkr = clks->rates; clkr->div

RE: [PATCH E 11/14] OMAP clock: track child clocks

2009-02-19 Thread Woodruff, Richard
> From: Russell King - ARM Linux [mailto:li...@arm.linux.org.uk] > Sent: Thursday, February 19, 2009 6:20 AM > > > > Consider what happens when a clock is enabled - we walk up the tree > > > > enabling all parents. If we then change the clock's parent, and > > > > then disable the child, we will

Re: [PATCH E 11/14] OMAP clock: track child clocks

2009-02-19 Thread Russell King - ARM Linux
On Sat, Feb 14, 2009 at 11:23:25AM +, Russell King - ARM Linux wrote: > On Fri, Feb 13, 2009 at 12:01:37AM -0700, Paul Walmsley wrote: > > (cc'ing Richard Woodruff) > > > > Hello Russell, > > > > On Mon, 9 Feb 2009, Russell King - ARM Linux wrote: > > > > > On Thu, Jan 29, 2009 at 10:06:08PM

Re: [PATCH E 11/14] OMAP clock: track child clocks

2009-02-14 Thread Russell King - ARM Linux
On Sat, Feb 14, 2009 at 11:23:25AM +, Russell King - ARM Linux wrote: > There's also a second issue - the comments before omap2_divisor_to_clksel() > indicate that this function returns 0x on error. Unfortunately, > this is not so, it actually returns zero on error. Moreover, we test

Re: [PATCH E 11/14] OMAP clock: track child clocks

2009-02-14 Thread Russell King - ARM Linux
On Fri, Feb 13, 2009 at 12:01:37AM -0700, Paul Walmsley wrote: > (cc'ing Richard Woodruff) > > Hello Russell, > > On Mon, 9 Feb 2009, Russell King - ARM Linux wrote: > > > On Thu, Jan 29, 2009 at 10:06:08PM +, Russell King - ARM Linux wrote: > > > @@ -780,7 +780,7 @@ int omap2_clk_set_parent

Re: [PATCH E 11/14] OMAP clock: track child clocks

2009-02-12 Thread Paul Walmsley
(cc'ing Richard Woodruff) Hello Russell, On Mon, 9 Feb 2009, Russell King - ARM Linux wrote: > On Thu, Jan 29, 2009 at 10:06:08PM +, Russell King - ARM Linux wrote: > > @@ -780,7 +780,7 @@ int omap2_clk_set_parent(struct clk *clk, struct clk > > *new_parent) > > if (clk->usecount > 0) >

Re: [PATCH E 11/14] OMAP clock: track child clocks

2009-02-09 Thread Russell King - ARM Linux
On Thu, Jan 29, 2009 at 10:06:08PM +, Russell King - ARM Linux wrote: > @@ -780,7 +780,7 @@ int omap2_clk_set_parent(struct clk *clk, struct clk > *new_parent) > if (clk->usecount > 0) > _omap2_clk_enable(clk); > > - clk->parent = new_parent; > + clk_reparent(clk,

Re: [PATCH E 11/14] OMAP clock: track child clocks

2009-02-01 Thread Paul Walmsley
Hello Russell, On Thu, 29 Jan 2009, Russell King - ARM Linux wrote: > On Wed, Jan 28, 2009 at 12:27:59PM -0700, Paul Walmsley wrote: > > +static int omap_clk_for_each_child(struct clk *clk, unsigned long > > parent_rate, > > + u8 rate_storage, int (*cb)(struct clk *, unsigned long,

Re: [PATCH E 11/14] OMAP clock: track child clocks

2009-02-01 Thread Paul Walmsley
Hello Russell, On Thu, 29 Jan 2009, Russell King - ARM Linux wrote: > And here is my version of this patch: Thanks, your version is quite a bit cleaner than the original. Will you merge your patch directly, or would you like me to resend your version here? - Paul -- To unsubscribe from this l

Re: [PATCH E 11/14] OMAP clock: track child clocks

2009-01-30 Thread Paul Walmsley
On Thu, 29 Jan 2009, Russell King - ARM Linux wrote: > On Thu, Jan 29, 2009 at 03:14:01PM +, Russell King - ARM Linux wrote: > > On Wed, Jan 28, 2009 at 12:27:59PM -0700, Paul Walmsley wrote: > > > The price paid is additional runtime memory consumption - 8 bytes per > > > clock and 16 bytes p

Re: [PATCH E 11/14] OMAP clock: track child clocks

2009-01-29 Thread Russell King - ARM Linux
On Thu, Jan 29, 2009 at 03:14:01PM +, Russell King - ARM Linux wrote: > On Wed, Jan 28, 2009 at 12:27:59PM -0700, Paul Walmsley wrote: > > The price paid is additional runtime memory consumption - 8 bytes per > > clock and 16 bytes per child clock - roughly 4.5KiB on OMAP3. > > For OMAP3, that

Re: [PATCH E 11/14] OMAP clock: track child clocks

2009-01-29 Thread Russell King - ARM Linux
On Wed, Jan 28, 2009 at 12:27:59PM -0700, Paul Walmsley wrote: > +static int omap_clk_for_each_child(struct clk *clk, unsigned long > parent_rate, > +u8 rate_storage, int (*cb)(struct clk *, unsigned long, u8)) > +{ > + struct clk_child *child; > + int ret; > + > + list

Re: [PATCH E 11/14] OMAP clock: track child clocks

2009-01-29 Thread Russell King - ARM Linux
On Wed, Jan 28, 2009 at 12:27:59PM -0700, Paul Walmsley wrote: > The price paid is additional runtime memory consumption - 8 bytes per > clock and 16 bytes per child clock - roughly 4.5KiB on OMAP3. For OMAP3, that's 222 struct clks of which 182 are children, and indeed 222 * 8 + 182 * 16 gives ab