* [PATCH-V2] ARM: AM33XX: Add missing .clkdm_name to clkdiv32k_ick clock
@ 2013-03-27 10:04 Vaibhav Hiremath
2013-03-27 17:45 ` Paul Walmsley
0 siblings, 1 reply; 6+ messages in thread
From: Vaibhav Hiremath @ 2013-03-27 10:04 UTC (permalink / raw)
To: linux-arm-kernel
It is required to enable respective clock-domain before
enabling any clock/module inside that clock-domain.
During common-clock migration, .clkdm_name field got missed
for "clkdiv32k_ick" clock, which leaves "clk_24mhz_clkdm"
unused; so it will be disabled even if childs of this clock-domain
is enabled, which keeps child modules in idle mode.
This fixes the kernel crash observed on AM335xEVM-SK platform,
where clkdiv32_ick clock is being used as a gpio debounce clock
and since clkdiv32k_ick is in idle mode it leads to below crash -
Crash Log:
==========
[ 2.598347] Unhandled fault: external abort on non-linefetch (0x1028) at
0xfa1ac150
[ 2.606434] Internal error: : 1028 [#1] SMP ARM
[ 2.611207] Modules linked in:
[ 2.614449] CPU: 0 Not tainted (3.8.4-01382-g1f449cd-dirty #4)
[ 2.620973] PC is at _set_gpio_debounce+0x60/0x104
[ 2.626025] LR is at clk_enable+0x30/0x3c
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Rajendra Nayak <rnayak@ti.com>
---
Change from V1 (no code change):
- Commit description updated as per Rajendra and Paul's
comment.
arch/arm/mach-omap2/cclock33xx_data.c | 26 +++++++++++++++++++++++---
1 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c
index 476b820..8327721 100644
--- a/arch/arm/mach-omap2/cclock33xx_data.c
+++ b/arch/arm/mach-omap2/cclock33xx_data.c
@@ -446,9 +446,29 @@ DEFINE_CLK_GATE(cefuse_fck, "sys_clkin_ck", &sys_clkin_ck, 0x0,
*/
DEFINE_CLK_FIXED_FACTOR(clkdiv32k_ck, "clk_24mhz", &clk_24mhz, 0x0, 1, 732);
-DEFINE_CLK_GATE(clkdiv32k_ick, "clkdiv32k_ck", &clkdiv32k_ck, 0x0,
- AM33XX_CM_PER_CLKDIV32K_CLKCTRL, AM33XX_MODULEMODE_SWCTRL_SHIFT,
- 0x0, NULL);
+static struct clk clkdiv32k_ick;
+
+static const char *clkdiv32k_ick_parent_names[] = {
+ "clkdiv32k_ck",
+};
+
+static const struct clk_ops clkdiv32k_ick_ops = {
+ .enable = &omap2_dflt_clk_enable,
+ .disable = &omap2_dflt_clk_disable,
+ .is_enabled = &omap2_dflt_clk_is_enabled,
+ .init = &omap2_init_clk_clkdm,
+};
+
+static struct clk_hw_omap clkdiv32k_ick_hw = {
+ .hw = {
+ .clk = &clkdiv32k_ick,
+ },
+ .enable_reg = AM33XX_CM_PER_CLKDIV32K_CLKCTRL,
+ .enable_bit = AM33XX_MODULEMODE_SWCTRL_SHIFT,
+ .clkdm_name = "clk_24mhz_clkdm",
+};
+
+DEFINE_STRUCT_CLK(clkdiv32k_ick, clkdiv32k_ick_parent_names, clkdiv32k_ick_ops);
/* "usbotg_fck" is an additional clock and not really a modulemode */
DEFINE_CLK_GATE(usbotg_fck, "dpll_per_ck", &dpll_per_ck, 0x0,
--
1.7.0.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH-V2] ARM: AM33XX: Add missing .clkdm_name to clkdiv32k_ick clock
2013-03-27 10:04 [PATCH-V2] ARM: AM33XX: Add missing .clkdm_name to clkdiv32k_ick clock Vaibhav Hiremath
@ 2013-03-27 17:45 ` Paul Walmsley
2013-03-27 20:19 ` Tony Lindgren
2013-05-17 10:30 ` Hiremath, Vaibhav
0 siblings, 2 replies; 6+ messages in thread
From: Paul Walmsley @ 2013-03-27 17:45 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, 27 Mar 2013, Vaibhav Hiremath wrote:
> It is required to enable respective clock-domain before
> enabling any clock/module inside that clock-domain.
>
> During common-clock migration, .clkdm_name field got missed
> for "clkdiv32k_ick" clock, which leaves "clk_24mhz_clkdm"
> unused; so it will be disabled even if childs of this clock-domain
> is enabled, which keeps child modules in idle mode.
>
> This fixes the kernel crash observed on AM335xEVM-SK platform,
> where clkdiv32_ick clock is being used as a gpio debounce clock
> and since clkdiv32k_ick is in idle mode it leads to below crash -
>
> Crash Log:
> ==========
> [ 2.598347] Unhandled fault: external abort on non-linefetch (0x1028) at
> 0xfa1ac150
> [ 2.606434] Internal error: : 1028 [#1] SMP ARM
> [ 2.611207] Modules linked in:
> [ 2.614449] CPU: 0 Not tainted (3.8.4-01382-g1f449cd-dirty #4)
> [ 2.620973] PC is at _set_gpio_debounce+0x60/0x104
> [ 2.626025] LR is at clk_enable+0x30/0x3c
>
> Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Rajendra Nayak <rnayak@ti.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Tony, if it isn't too late, could this one be added to your 3.9-rc fixes
series?
- Paul
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH-V2] ARM: AM33XX: Add missing .clkdm_name to clkdiv32k_ick clock
2013-03-27 17:45 ` Paul Walmsley
@ 2013-03-27 20:19 ` Tony Lindgren
2013-05-17 10:30 ` Hiremath, Vaibhav
1 sibling, 0 replies; 6+ messages in thread
From: Tony Lindgren @ 2013-03-27 20:19 UTC (permalink / raw)
To: linux-arm-kernel
* Paul Walmsley <paul@pwsan.com> [130327 10:49]:
> On Wed, 27 Mar 2013, Vaibhav Hiremath wrote:
>
> > It is required to enable respective clock-domain before
> > enabling any clock/module inside that clock-domain.
> >
> > During common-clock migration, .clkdm_name field got missed
> > for "clkdiv32k_ick" clock, which leaves "clk_24mhz_clkdm"
> > unused; so it will be disabled even if childs of this clock-domain
> > is enabled, which keeps child modules in idle mode.
> >
> > This fixes the kernel crash observed on AM335xEVM-SK platform,
> > where clkdiv32_ick clock is being used as a gpio debounce clock
> > and since clkdiv32k_ick is in idle mode it leads to below crash -
> >
> > Crash Log:
> > ==========
> > [ 2.598347] Unhandled fault: external abort on non-linefetch (0x1028) at
> > 0xfa1ac150
> > [ 2.606434] Internal error: : 1028 [#1] SMP ARM
> > [ 2.611207] Modules linked in:
> > [ 2.614449] CPU: 0 Not tainted (3.8.4-01382-g1f449cd-dirty #4)
> > [ 2.620973] PC is at _set_gpio_debounce+0x60/0x104
> > [ 2.626025] LR is at clk_enable+0x30/0x3c
> >
> > Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
> > Cc: Tony Lindgren <tony@atomide.com>
> > Cc: Paul Walmsley <paul@pwsan.com>
> > Cc: Rajendra Nayak <rnayak@ti.com>
>
> Acked-by: Paul Walmsley <paul@pwsan.com>
>
> Tony, if it isn't too late, could this one be added to your 3.9-rc fixes
> series?
Just sent the previous ones, I'll add this into omap-for-v3.9-rc4/fixes.
Regards,
Tony
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH-V2] ARM: AM33XX: Add missing .clkdm_name to clkdiv32k_ick clock
2013-03-27 17:45 ` Paul Walmsley
2013-03-27 20:19 ` Tony Lindgren
@ 2013-05-17 10:30 ` Hiremath, Vaibhav
2013-05-17 17:10 ` Tony Lindgren
1 sibling, 1 reply; 6+ messages in thread
From: Hiremath, Vaibhav @ 2013-05-17 10:30 UTC (permalink / raw)
To: linux-arm-kernel
> -----Original Message-----
> From: Paul Walmsley [mailto:paul at pwsan.com]
> Sent: Wednesday, March 27, 2013 11:15 PM
> To: Tony Lindgren; Hiremath, Vaibhav
> Cc: linux-omap at vger.kernel.org; linux-arm-kernel at lists.infradead.org;
> Nayak, Rajendra
> Subject: Re: [PATCH-V2] ARM: AM33XX: Add missing .clkdm_name to
> clkdiv32k_ick clock
>
> On Wed, 27 Mar 2013, Vaibhav Hiremath wrote:
>
> > It is required to enable respective clock-domain before
> > enabling any clock/module inside that clock-domain.
> >
> > During common-clock migration, .clkdm_name field got missed
> > for "clkdiv32k_ick" clock, which leaves "clk_24mhz_clkdm"
> > unused; so it will be disabled even if childs of this clock-domain
> > is enabled, which keeps child modules in idle mode.
> >
> > This fixes the kernel crash observed on AM335xEVM-SK platform,
> > where clkdiv32_ick clock is being used as a gpio debounce clock
> > and since clkdiv32k_ick is in idle mode it leads to below crash -
> >
> > Crash Log:
> > ==========
> > [ 2.598347] Unhandled fault: external abort on non-linefetch
> (0x1028) at
> > 0xfa1ac150
> > [ 2.606434] Internal error: : 1028 [#1] SMP ARM
> > [ 2.611207] Modules linked in:
> > [ 2.614449] CPU: 0 Not tainted (3.8.4-01382-g1f449cd-dirty #4)
> > [ 2.620973] PC is at _set_gpio_debounce+0x60/0x104
> > [ 2.626025] LR is at clk_enable+0x30/0x3c
> >
> > Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
> > Cc: Tony Lindgren <tony@atomide.com>
> > Cc: Paul Walmsley <paul@pwsan.com>
> > Cc: Rajendra Nayak <rnayak@ti.com>
>
> Acked-by: Paul Walmsley <paul@pwsan.com>
>
> Tony, if it isn't too late, could this one be added to your 3.9-rc
> fixes
> series?
>
>
Looks like we missed this so far.
Tony, can you merge this patch for v3.10-rc ?
Thanks,
Vaibhav
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH-V2] ARM: AM33XX: Add missing .clkdm_name to clkdiv32k_ick clock
2013-05-17 10:30 ` Hiremath, Vaibhav
@ 2013-05-17 17:10 ` Tony Lindgren
2013-05-20 5:51 ` Hiremath, Vaibhav
0 siblings, 1 reply; 6+ messages in thread
From: Tony Lindgren @ 2013-05-17 17:10 UTC (permalink / raw)
To: linux-arm-kernel
* Hiremath, Vaibhav <hvaibhav@ti.com> [130517 03:36]:
>
> > -----Original Message-----
> > From: Paul Walmsley [mailto:paul at pwsan.com]
> > Sent: Wednesday, March 27, 2013 11:15 PM
> > To: Tony Lindgren; Hiremath, Vaibhav
> > Cc: linux-omap at vger.kernel.org; linux-arm-kernel at lists.infradead.org;
> > Nayak, Rajendra
> > Subject: Re: [PATCH-V2] ARM: AM33XX: Add missing .clkdm_name to
> > clkdiv32k_ick clock
> >
> > On Wed, 27 Mar 2013, Vaibhav Hiremath wrote:
> >
> > > It is required to enable respective clock-domain before
> > > enabling any clock/module inside that clock-domain.
> > >
> > > During common-clock migration, .clkdm_name field got missed
> > > for "clkdiv32k_ick" clock, which leaves "clk_24mhz_clkdm"
> > > unused; so it will be disabled even if childs of this clock-domain
> > > is enabled, which keeps child modules in idle mode.
> > >
> > > This fixes the kernel crash observed on AM335xEVM-SK platform,
> > > where clkdiv32_ick clock is being used as a gpio debounce clock
> > > and since clkdiv32k_ick is in idle mode it leads to below crash -
> > >
> > > Crash Log:
> > > ==========
> > > [ 2.598347] Unhandled fault: external abort on non-linefetch
> > (0x1028) at
> > > 0xfa1ac150
> > > [ 2.606434] Internal error: : 1028 [#1] SMP ARM
> > > [ 2.611207] Modules linked in:
> > > [ 2.614449] CPU: 0 Not tainted (3.8.4-01382-g1f449cd-dirty #4)
> > > [ 2.620973] PC is at _set_gpio_debounce+0x60/0x104
> > > [ 2.626025] LR is at clk_enable+0x30/0x3c
> > >
> > > Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
> > > Cc: Tony Lindgren <tony@atomide.com>
> > > Cc: Paul Walmsley <paul@pwsan.com>
> > > Cc: Rajendra Nayak <rnayak@ti.com>
> >
> > Acked-by: Paul Walmsley <paul@pwsan.com>
> >
> > Tony, if it isn't too late, could this one be added to your 3.9-rc
> > fixes
> > series?
> >
> >
>
> Looks like we missed this so far.
>
> Tony, can you merge this patch for v3.10-rc ?
Oops, sorry somehow this did not make it. I'll apply it to omap-for-v3.10/fixes
with cc: stable flag.
Regards,
Tony
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH-V2] ARM: AM33XX: Add missing .clkdm_name to clkdiv32k_ick clock
2013-05-17 17:10 ` Tony Lindgren
@ 2013-05-20 5:51 ` Hiremath, Vaibhav
0 siblings, 0 replies; 6+ messages in thread
From: Hiremath, Vaibhav @ 2013-05-20 5:51 UTC (permalink / raw)
To: linux-arm-kernel
> -----Original Message-----
> From: Tony Lindgren [mailto:tony at atomide.com]
> Sent: Friday, May 17, 2013 10:40 PM
> To: Hiremath, Vaibhav
> Cc: Paul Walmsley; linux-omap at vger.kernel.org; linux-arm-
> kernel at lists.infradead.org; Nayak, Rajendra
> Subject: Re: [PATCH-V2] ARM: AM33XX: Add missing .clkdm_name to
> clkdiv32k_ick clock
>
> * Hiremath, Vaibhav <hvaibhav@ti.com> [130517 03:36]:
> >
> > > -----Original Message-----
> > > From: Paul Walmsley [mailto:paul at pwsan.com]
> > > Sent: Wednesday, March 27, 2013 11:15 PM
> > > To: Tony Lindgren; Hiremath, Vaibhav
> > > Cc: linux-omap at vger.kernel.org; linux-arm-
> kernel at lists.infradead.org;
> > > Nayak, Rajendra
> > > Subject: Re: [PATCH-V2] ARM: AM33XX: Add missing .clkdm_name to
> > > clkdiv32k_ick clock
> > >
> > > On Wed, 27 Mar 2013, Vaibhav Hiremath wrote:
> > >
> > > > It is required to enable respective clock-domain before
> > > > enabling any clock/module inside that clock-domain.
> > > >
> > > > During common-clock migration, .clkdm_name field got missed
> > > > for "clkdiv32k_ick" clock, which leaves "clk_24mhz_clkdm"
> > > > unused; so it will be disabled even if childs of this clock-
> domain
> > > > is enabled, which keeps child modules in idle mode.
> > > >
> > > > This fixes the kernel crash observed on AM335xEVM-SK platform,
> > > > where clkdiv32_ick clock is being used as a gpio debounce clock
> > > > and since clkdiv32k_ick is in idle mode it leads to below crash -
> > > >
> > > > Crash Log:
> > > > ==========
> > > > [ 2.598347] Unhandled fault: external abort on non-linefetch
> > > (0x1028) at
> > > > 0xfa1ac150
> > > > [ 2.606434] Internal error: : 1028 [#1] SMP ARM
> > > > [ 2.611207] Modules linked in:
> > > > [ 2.614449] CPU: 0 Not tainted (3.8.4-01382-g1f449cd-dirty
> #4)
> > > > [ 2.620973] PC is at _set_gpio_debounce+0x60/0x104
> > > > [ 2.626025] LR is at clk_enable+0x30/0x3c
> > > >
> > > > Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
> > > > Cc: Tony Lindgren <tony@atomide.com>
> > > > Cc: Paul Walmsley <paul@pwsan.com>
> > > > Cc: Rajendra Nayak <rnayak@ti.com>
> > >
> > > Acked-by: Paul Walmsley <paul@pwsan.com>
> > >
> > > Tony, if it isn't too late, could this one be added to your 3.9-rc
> > > fixes
> > > series?
> > >
> > >
> >
> > Looks like we missed this so far.
> >
> > Tony, can you merge this patch for v3.10-rc ?
>
> Oops, sorry somehow this did not make it. I'll apply it to omap-for-
> v3.10/fixes
> with cc: stable flag.
>
Thanks Tony, I saw it in your yesterday's pull request.
Thanks,
Vaibhav
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-05-20 5:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-27 10:04 [PATCH-V2] ARM: AM33XX: Add missing .clkdm_name to clkdiv32k_ick clock Vaibhav Hiremath
2013-03-27 17:45 ` Paul Walmsley
2013-03-27 20:19 ` Tony Lindgren
2013-05-17 10:30 ` Hiremath, Vaibhav
2013-05-17 17:10 ` Tony Lindgren
2013-05-20 5:51 ` Hiremath, Vaibhav
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).