2014-02-10 20:27:32

by Santosh Shilimkar

[permalink] [raw]
Subject: [PATCH 0/2] clk: keystone: Couple of fixes for 3.14-rcx

Mike,

Can you please look at these couple of keystone clock fixes ?
Without these, we have seen some random kernel crashes. I
have included the dts fix since both fixes are related. Do
let me know if you prefer dts patch to be sent it via arm-soc tree.

The following changes since commit 38dbfb59d1175ef458d006556061adeaa8751b72:

Linus 3.14-rc1 (2014-02-02 16:42:13 -0800)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone.git for_3.14-rcx/clk-fixes

for you to fetch changes up to 565bbdcd3b91523b4142587c00206302e091a23e:

ARM: keystone: dts: fix clkvcp3 control register address (2014-02-10 15:17:43 -0500)

----------------------------------------------------------------
Ivan Khoronzhuk (2):
clk: keystone: gate: fix clk_init_data initialization
ARM: keystone: dts: fix clkvcp3 control register address

arch/arm/boot/dts/keystone-clocks.dtsi | 2 +-
drivers/clk/keystone/gate.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)

Regards,
Santosh

--
1.7.9.5


2014-02-10 20:27:40

by Santosh Shilimkar

[permalink] [raw]
Subject: [PATCH 2/2] ARM: keystone: dts: fix clkvcp3 control register address

From: Ivan Khoronzhuk <[email protected]>

The address for control regs in clkvcp3 node is not correct and should
be 0x023500a8 instead of 0x0235000a8.

This lead to few unexpected behaviors while clocks were turned
of in absence of clk_ignore_unused

Mike Turquette <[email protected]>
Signed-off-by: Ivan Khoronzhuk <[email protected]>
Signed-off-by: Santosh Shilimkar <[email protected]>
---
arch/arm/boot/dts/keystone-clocks.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/keystone-clocks.dtsi b/arch/arm/boot/dts/keystone-clocks.dtsi
index 2363593..ef58d1c 100644
--- a/arch/arm/boot/dts/keystone-clocks.dtsi
+++ b/arch/arm/boot/dts/keystone-clocks.dtsi
@@ -612,7 +612,7 @@ clocks {
compatible = "ti,keystone,psc-clock";
clocks = <&chipclk13>;
clock-output-names = "vcp-3";
- reg = <0x0235000a8 0xb00>, <0x02350060 0x400>;
+ reg = <0x023500a8 0xb00>, <0x02350060 0x400>;
reg-names = "control", "domain";
domain-id = <24>;
};
--
1.7.9.5

2014-02-10 20:27:43

by Santosh Shilimkar

[permalink] [raw]
Subject: [PATCH 1/2] clk: keystone: gate: fix clk_init_data initialization

From: Ivan Khoronzhuk <[email protected]>

The clk_init_data struct is allocated in the stack. All members of
this struct should be initialized before using otherwise it will
lead to unpredictable situation as it can contain garbage.

Ultimately the clk->flag field contains garbage. In my case it leads
that flag CLK_IGNORE_UNUSED is set for most of clocks. As result a
bunch of unused clocks cannot be disabled.

So initialize flags in this structure too.

Cc: Mike Turquette <[email protected]>
Signed-off-by: Ivan Khoronzhuk <[email protected]>
Signed-off-by: Santosh Shilimkar <[email protected]>
---
drivers/clk/keystone/gate.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clk/keystone/gate.c b/drivers/clk/keystone/gate.c
index 17a5983..86f1e36 100644
--- a/drivers/clk/keystone/gate.c
+++ b/drivers/clk/keystone/gate.c
@@ -179,6 +179,7 @@ static struct clk *clk_register_psc(struct device *dev,

init.name = name;
init.ops = &clk_psc_ops;
+ init.flags = 0;
init.parent_names = (parent_name ? &parent_name : NULL);
init.num_parents = (parent_name ? 1 : 0);

--
1.7.9.5

2014-02-17 14:39:17

by Santosh Shilimkar

[permalink] [raw]
Subject: Re: [PATCH 0/2] clk: keystone: Couple of fixes for 3.14-rcx

Ping,

On Monday 10 February 2014 03:26 PM, Santosh Shilimkar wrote:
> Mike,
>
> Can you please look at these couple of keystone clock fixes ?
> Without these, we have seen some random kernel crashes. I
> have included the dts fix since both fixes are related. Do
> let me know if you prefer dts patch to be sent it via arm-soc tree.
>
> The following changes since commit 38dbfb59d1175ef458d006556061adeaa8751b72:
>
> Linus 3.14-rc1 (2014-02-02 16:42:13 -0800)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone.git for_3.14-rcx/clk-fixes
>
> for you to fetch changes up to 565bbdcd3b91523b4142587c00206302e091a23e:
>
> ARM: keystone: dts: fix clkvcp3 control register address (2014-02-10 15:17:43 -0500)
>
> ----------------------------------------------------------------
> Ivan Khoronzhuk (2):
> clk: keystone: gate: fix clk_init_data initialization
> ARM: keystone: dts: fix clkvcp3 control register address
>
> arch/arm/boot/dts/keystone-clocks.dtsi | 2 +-
> drivers/clk/keystone/gate.c | 1 +
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> Regards,
> Santosh
>

2014-02-19 14:27:23

by Santosh Shilimkar

[permalink] [raw]
Subject: Re: [PATCH 0/2] clk: keystone: Couple of fixes for 3.14-rcx

On Wednesday 19 February 2014 01:19 AM, Mike Turquette wrote:
> Quoting Santosh Shilimkar (2014-02-10 12:26:49)
>> Mike,
>>
>> Can you please look at these couple of keystone clock fixes ?
>> Without these, we have seen some random kernel crashes. I
>> have included the dts fix since both fixes are related. Do
>> let me know if you prefer dts patch to be sent it via arm-soc tree.
>
> No problem taking these in as fixes. They go in the next batch.
>
Thanks Mike !!

Regards,
Santosh