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.kernel.org

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. Unfortunately,

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

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 +++

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 on a

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 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 +, Russell

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 again walk

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(struct

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-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: 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

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, u8))

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 per child

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

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; + +

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's 222

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

2009-01-28 Thread Paul Walmsley
Track child clocks for each struct clk. This optimizes traversals of the clock tree from parent to child, which happens during rate propagation, and in the future, clock notifiers. Previously, parent-to-child traversals sequentially scanned the entire clock list at each step to determine the