Re: [PATCH V2 3/3] ARM: OMAP2+: clk: Fix return type of callbacks

2013-06-23 Thread Ambresh K
On Friday 21 June 2013 11:43 PM, Mike Turquette wrote: > Quoting Ambresh K (2013-06-17 01:39:44) >> From: Ambresh K >> >> clk_ops's .get_parent member data return's signed value. >> >> Signed-off-by: Ambresh K > > Unsurprisingly I get the fo

[PATCH V2 1/3] clk: fix clk_mux_get_parent return's signed value

2013-06-17 Thread Ambresh K
From: Ambresh K clk_mux_get_parent should return an error if the value read from the register is erroneous. Currently if the value read is greater than the number of available parents clk_mux_get_parent return's signed error which will result in NULL pointer dereferencing in the ca

[PATCH V2 3/3] ARM: OMAP2+: clk: Fix return type of callbacks

2013-06-17 Thread Ambresh K
From: Ambresh K clk_ops's .get_parent member data return's signed value. Signed-off-by: Ambresh K --- arch/arm/mach-omap2/clkt_clksel.c |2 +- arch/arm/mach-omap2/clkt_dpll.c |2 +- arch/arm/mach-omap2/clock.h |4 ++-- 3 files changed, 4 insertions(+), 4 deletion

[PATCH V2 0/3] Fix to clk framework while handling orphan clks

2013-06-17 Thread Ambresh K
From: Ambresh K On a possible HW bug or in-correct configuration of MUX register's in bootloader; might return a value greater than available parent clocks for a MUX clk. Sensing invalid parent index, clk_mux_get_parent returns -EINVALID. Due to function's "u8" ret

[PATCH V2 2/3] clk: skip re-parenting orphan clk

2013-06-17 Thread Ambresh K
From: Ambresh K If clk is same as orphan clk then skip the iteration, there by avoiding unnecessary look-up. Signed-off-by: Ambresh K --- drivers/clk/clk.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 2842450..57bb94a

Re: [Patch 3/3] clk: Avoid re-parenting orphan clk's having invalid parent index.

2013-06-13 Thread Ambresh K
>> Sorry for not being descriptive in commit message. >> >> a) Avoids unnecessary re-parenting cycle for orphan clock's with invalid >> parent for every clock >> > > True, but this is a minor optimisation. If this is a big optimization > for you then you really need to fix your bootloader.

Re: [Patch 3/3] clk: Avoid re-parenting orphan clk's having invalid parent index.

2013-06-04 Thread Ambresh K
On Wednesday 29 May 2013 12:48 PM, Mike Turquette wrote: > Quoting Ambresh K (2013-05-01 23:25:29) >> From: Ambresh K >> >> Add orhan clk nodes having invalid parent index to list and use >> the list to skip re-parenting orphan clk having invalid parents. >

Re: [Patch 1/3] clk: fix clk_mux_get_parent return's signed value

2013-06-03 Thread Ambresh K
the value read is greater than the number of >> available parents clk_mux_get_parent return's signed error >> which will result in NULL pointer dereferencing in the >> calling functions. >> >> Signed-off-by: Ambresh K >> --- >> drivers/clk/clk-mux

[Patch 2/3] clk: skip re-parenting orphan clk

2013-05-01 Thread Ambresh K
From: Ambresh K If clk is same as orphan clk than skip the iteration, there by avoiding unnecessary look-up. Signed-off-by: Ambresh K --- drivers/clk/clk.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index c187321..f4d2c73

[Patch 1/3] clk: fix clk_mux_get_parent return's signed value

2013-05-01 Thread Ambresh K
From: Ambresh K If for some reason, the value read from clksel field return erroneous due to HW bug or improper configuration, then clk_mux_get_parent should return appropriate error's. Currently if the value read is greater than the number of available parents clk_mux_get_parent ret

[Patch 3/3] clk: Avoid re-parenting orphan clk's having invalid parent index.

2013-05-01 Thread Ambresh K
From: Ambresh K Add orhan clk nodes having invalid parent index to list and use the list to skip re-parenting orphan clk having invalid parents. Signed-off-by: Ambresh K --- drivers/clk/clk.c | 21 +++-- 1 files changed, 19 insertions(+), 2 deletions(-) diff --git a/drivers

[Patch 0/3] Fix to clk framework while handling orphan clks

2013-05-01 Thread Ambresh K
From: Ambresh K On a possible HW bug or in-correct configuration of clk_sel bits in bootloaders, there are high probablity of returning a value greater than available parent clocks for a MUX clk. Sensing invalid parent index, clk_mux_get_parent returns -EINVALID. Due to function'