* [PATCH CRITICAL] ARM: s3c64xx: dt: Fix boot failure due to double clock initialization
@ 2013-12-13 19:59 Tomasz Figa
2013-12-14 3:00 ` Arnd Bergmann
2013-12-14 5:52 ` Olof Johansson
0 siblings, 2 replies; 13+ messages in thread
From: Tomasz Figa @ 2013-12-13 19:59 UTC (permalink / raw)
To: linux-arm-kernel
Commit
4178bac ARM: call of_clk_init from default time_init handler
added implicit call to of_clk_init() from default time_init callback,
but it did not change platforms calling it from other callbacks, despite
of not having custom time_init callbacks. This caused double clock
initialization on such platforms, leading to boot failures. An example
of such platform is mach-s3c64xx.
This patch fixes boot failure on s3c64xx by dropping custom init_irq
callback, which had a call to of_clk_init() and moving system reset
initialization to init_machine callback. This allows us to have
clocks initialized properly without a need to have custom init_time or
init_irq callbacks.
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
---
arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
NOTE: This is a critical boot regression fix for mach-s3c64xx that
should be merged for next 3.13-rc release.
diff --git a/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c b/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
index 7eb9a10..2fddf38 100644
--- a/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
+++ b/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
@@ -8,8 +8,6 @@
* published by the Free Software Foundation.
*/
-#include <linux/clk-provider.h>
-#include <linux/irqchip.h>
#include <linux/of_platform.h>
#include <asm/mach/arch.h>
@@ -48,15 +46,9 @@ static void __init s3c64xx_dt_map_io(void)
panic("SoC is not S3C64xx!");
}
-static void __init s3c64xx_dt_init_irq(void)
-{
- of_clk_init(NULL);
- samsung_wdt_reset_of_init();
- irqchip_init();
-};
-
static void __init s3c64xx_dt_init_machine(void)
{
+ samsung_wdt_reset_of_init();
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}
@@ -79,7 +71,6 @@ DT_MACHINE_START(S3C6400_DT, "Samsung S3C64xx (Flattened Device Tree)")
/* Maintainer: Tomasz Figa <tomasz.figa@gmail.com> */
.dt_compat = s3c64xx_dt_compat,
.map_io = s3c64xx_dt_map_io,
- .init_irq = s3c64xx_dt_init_irq,
.init_machine = s3c64xx_dt_init_machine,
.restart = s3c64xx_dt_restart,
MACHINE_END
--
1.8.5.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH CRITICAL] ARM: s3c64xx: dt: Fix boot failure due to double clock initialization
2013-12-13 19:59 [PATCH CRITICAL] ARM: s3c64xx: dt: Fix boot failure due to double clock initialization Tomasz Figa
@ 2013-12-14 3:00 ` Arnd Bergmann
2013-12-14 5:50 ` Olof Johansson
2013-12-14 11:47 ` Sebastian Hesselbarth
2013-12-14 5:52 ` Olof Johansson
1 sibling, 2 replies; 13+ messages in thread
From: Arnd Bergmann @ 2013-12-14 3:00 UTC (permalink / raw)
To: linux-arm-kernel
On Friday 13 December 2013, Tomasz Figa wrote:
> Commit
>
> 4178bac ARM: call of_clk_init from default time_init handler
>
> added implicit call to of_clk_init() from default time_init callback,
> but it did not change platforms calling it from other callbacks, despite
> of not having custom time_init callbacks. This caused double clock
> initialization on such platforms, leading to boot failures. An example
> of such platform is mach-s3c64xx.
>
> This patch fixes boot failure on s3c64xx by dropping custom init_irq
> callback, which had a call to of_clk_init() and moving system reset
> initialization to init_machine callback. This allows us to have
> clocks initialized properly without a need to have custom init_time or
> init_irq callbacks.
>
> Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
I see of_clk_init(NULL) getting called on two other ARM platforms:
$ git grep -w of_clk_init arch/arm
arch/arm/kernel/time.c: of_clk_init(NULL);
arch/arm/mach-keystone/pm_domain.c: of_clk_init(NULL);
arch/arm/mach-mvebu/armada-370-xp.c: of_clk_init(NULL);
arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c: of_clk_init(NULL);
Are the other two platforms ok here?
I assume that mvebu is fine since Sebastian would have noticed breaking
that one and it has a custom init_time function, but keystone seems
broken in the same way as s3c64xx. Santosh, can you have a look?
Arnd
> diff --git a/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c b/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
> index 7eb9a10..2fddf38 100644
> --- a/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
> +++ b/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
> @@ -48,15 +46,9 @@ static void __init s3c64xx_dt_map_io(void)
> panic("SoC is not S3C64xx!");
> }
>
> -static void __init s3c64xx_dt_init_irq(void)
> -{
> - of_clk_init(NULL);
> - samsung_wdt_reset_of_init();
> - irqchip_init();
> -};
> -
> static void __init s3c64xx_dt_init_machine(void)
> {
> + samsung_wdt_reset_of_init();
> of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> }
>
> @@ -79,7 +71,6 @@ DT_MACHINE_START(S3C6400_DT, "Samsung S3C64xx (Flattened Device Tree)")
> /* Maintainer: Tomasz Figa <tomasz.figa@gmail.com> */
> .dt_compat = s3c64xx_dt_compat,
> .map_io = s3c64xx_dt_map_io,
> - .init_irq = s3c64xx_dt_init_irq,
> .init_machine = s3c64xx_dt_init_machine,
> .restart = s3c64xx_dt_restart,
> MACHINE_END
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH CRITICAL] ARM: s3c64xx: dt: Fix boot failure due to double clock initialization
2013-12-14 3:00 ` Arnd Bergmann
@ 2013-12-14 5:50 ` Olof Johansson
2013-12-14 17:28 ` Santosh Shilimkar
2013-12-14 11:47 ` Sebastian Hesselbarth
1 sibling, 1 reply; 13+ messages in thread
From: Olof Johansson @ 2013-12-14 5:50 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Dec 13, 2013 at 7:00 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Friday 13 December 2013, Tomasz Figa wrote:
>> Commit
>>
>> 4178bac ARM: call of_clk_init from default time_init handler
>>
>> added implicit call to of_clk_init() from default time_init callback,
>> but it did not change platforms calling it from other callbacks, despite
>> of not having custom time_init callbacks. This caused double clock
>> initialization on such platforms, leading to boot failures. An example
>> of such platform is mach-s3c64xx.
>>
>> This patch fixes boot failure on s3c64xx by dropping custom init_irq
>> callback, which had a call to of_clk_init() and moving system reset
>> initialization to init_machine callback. This allows us to have
>> clocks initialized properly without a need to have custom init_time or
>> init_irq callbacks.
>>
>> Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
>
> I see of_clk_init(NULL) getting called on two other ARM platforms:
>
> $ git grep -w of_clk_init arch/arm
> arch/arm/kernel/time.c: of_clk_init(NULL);
> arch/arm/mach-keystone/pm_domain.c: of_clk_init(NULL);
> arch/arm/mach-mvebu/armada-370-xp.c: of_clk_init(NULL);
> arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c: of_clk_init(NULL);
>
> Are the other two platforms ok here?
>
> I assume that mvebu is fine since Sebastian would have noticed breaking
> that one and it has a custom init_time function, but keystone seems
> broken in the same way as s3c64xx. Santosh, can you have a look?
Yeah, and Free Electrons also sent two systems to Kevin so he has them
in his boot test setup, and they're still happy there. Keystone lacks
such coverage though, so Santosh will need to check.
-Olof
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH CRITICAL] ARM: s3c64xx: dt: Fix boot failure due to double clock initialization
2013-12-14 5:50 ` Olof Johansson
@ 2013-12-14 17:28 ` Santosh Shilimkar
0 siblings, 0 replies; 13+ messages in thread
From: Santosh Shilimkar @ 2013-12-14 17:28 UTC (permalink / raw)
To: linux-arm-kernel
Arnd, Olof,
On Saturday 14 December 2013 12:50 AM, Olof Johansson wrote:
> On Fri, Dec 13, 2013 at 7:00 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>> On Friday 13 December 2013, Tomasz Figa wrote:
>>> Commit
>>>
>>> 4178bac ARM: call of_clk_init from default time_init handler
>>>
>>> added implicit call to of_clk_init() from default time_init callback,
>>> but it did not change platforms calling it from other callbacks, despite
>>> of not having custom time_init callbacks. This caused double clock
>>> initialization on such platforms, leading to boot failures. An example
>>> of such platform is mach-s3c64xx.
>>>
>>> This patch fixes boot failure on s3c64xx by dropping custom init_irq
>>> callback, which had a call to of_clk_init() and moving system reset
>>> initialization to init_machine callback. This allows us to have
>>> clocks initialized properly without a need to have custom init_time or
>>> init_irq callbacks.
>>>
>>> Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
>>
>> I see of_clk_init(NULL) getting called on two other ARM platforms:
>>
>> $ git grep -w of_clk_init arch/arm
>> arch/arm/kernel/time.c: of_clk_init(NULL);
>> arch/arm/mach-keystone/pm_domain.c: of_clk_init(NULL);
>> arch/arm/mach-mvebu/armada-370-xp.c: of_clk_init(NULL);
>> arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c: of_clk_init(NULL);
>>
>> Are the other two platforms ok here?
>>
>> I assume that mvebu is fine since Sebastian would have noticed breaking
>> that one and it has a custom init_time function, but keystone seems
>> broken in the same way as s3c64xx. Santosh, can you have a look?
>
> Yeah, and Free Electrons also sent two systems to Kevin so he has them
> in his boot test setup, and they're still happy there. Keystone lacks
> such coverage though, so Santosh will need to check.
>
Keystone isn't broken as such but some warnings are produced because of
the change. This was noticed on keystone quite a while back and a
patch[1] is already in my queue. It didn't click me that other
machines might have been also affected at that point of time.
Regards,
Santosh
[1] http://www.spinics.net/lists/arm-kernel/msg288578.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH CRITICAL] ARM: s3c64xx: dt: Fix boot failure due to double clock initialization
2013-12-14 3:00 ` Arnd Bergmann
2013-12-14 5:50 ` Olof Johansson
@ 2013-12-14 11:47 ` Sebastian Hesselbarth
2013-12-14 17:30 ` Santosh Shilimkar
1 sibling, 1 reply; 13+ messages in thread
From: Sebastian Hesselbarth @ 2013-12-14 11:47 UTC (permalink / raw)
To: linux-arm-kernel
On 12/14/2013 04:00 AM, Arnd Bergmann wrote:
> On Friday 13 December 2013, Tomasz Figa wrote:
>> Commit
>>
>> 4178bac ARM: call of_clk_init from default time_init handler
>>
>> added implicit call to of_clk_init() from default time_init callback,
>> but it did not change platforms calling it from other callbacks, despite
>> of not having custom time_init callbacks. This caused double clock
>> initialization on such platforms, leading to boot failures. An example
>> of such platform is mach-s3c64xx.
>>
>> This patch fixes boot failure on s3c64xx by dropping custom init_irq
>> callback, which had a call to of_clk_init() and moving system reset
>> initialization to init_machine callback. This allows us to have
>> clocks initialized properly without a need to have custom init_time or
>> init_irq callbacks.
>>
>> Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Thomas,
thanks for catching this and sorry for the inconvenience. Either I
simply missed s3c64xx or it went in with that global of_clk_init
patch.
> I see of_clk_init(NULL) getting called on two other ARM platforms:
>
> $ git grep -w of_clk_init arch/arm
> arch/arm/kernel/time.c: of_clk_init(NULL);
> arch/arm/mach-keystone/pm_domain.c: of_clk_init(NULL);
> arch/arm/mach-mvebu/armada-370-xp.c: of_clk_init(NULL);
> arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c: of_clk_init(NULL);
>
> Are the other two platforms ok here?
mvebu is fine as long as it has its own .init_time callback (which it
has).
> I assume that mvebu is fine since Sebastian would have noticed breaking
> that one and it has a custom init_time function, but keystone seems
> broken in the same way as s3c64xx. Santosh, can you have a look?
I also had a look at keystone and guess it is broken, too.
of_clk_init(NULL) is called in keystone_pm_runtime_init() which is
set as subsys_initcall. Simply removing the extra of_clk_init call
in keystone_pm_runtime_init should be enough here:
From 4ef4720c0d7ca9be57b06dc7ab1483c77a5ada1d Mon Sep 17 00:00:00 2001
From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Date: Sat, 14 Dec 2013 12:21:01 +0100
Subject: [PATCH] ARM: keystone: remove call to of_clk_init
Commit
4178bac ARM: call of_clk_init from default time_init handler
added implicit call to of_clk_init(NULL) from default time_init callback.
This causes double clock initialization on keystone, leading to boot
failures.
This patch fixes boot failure on keystone by dropping the call to
of_clk_init(NULL) in keystone_pm_runtime_init(), which is set as
subsys_initcall and therefore called after arch-wide .init_time callback.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
arch/arm/mach-keystone/pm_domain.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/arm/mach-keystone/pm_domain.c
b/arch/arm/mach-keystone/pm_domain.c
index 2962523..3f17e16 100644
--- a/arch/arm/mach-keystone/pm_domain.c
+++ b/arch/arm/mach-keystone/pm_domain.c
@@ -16,7 +16,6 @@
#include <linux/pm_runtime.h>
#include <linux/pm_clock.h>
#include <linux/platform_device.h>
-#include <linux/clk-provider.h>
#include <linux/of.h>
#ifdef CONFIG_PM_RUNTIME
@@ -74,7 +73,6 @@ int __init keystone_pm_runtime_init(void)
if (!np)
return 0;
- of_clk_init(NULL);
pm_clk_add_notifier(&platform_bus_type, &platform_domain_notifier);
return 0;
--
1.8.4.rc3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH CRITICAL] ARM: s3c64xx: dt: Fix boot failure due to double clock initialization
2013-12-14 11:47 ` Sebastian Hesselbarth
@ 2013-12-14 17:30 ` Santosh Shilimkar
0 siblings, 0 replies; 13+ messages in thread
From: Santosh Shilimkar @ 2013-12-14 17:30 UTC (permalink / raw)
To: linux-arm-kernel
On Saturday 14 December 2013 06:47 AM, Sebastian Hesselbarth wrote:
[..]
> From 4ef4720c0d7ca9be57b06dc7ab1483c77a5ada1d Mon Sep 17 00:00:00 2001
> From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> Date: Sat, 14 Dec 2013 12:21:01 +0100
> Subject: [PATCH] ARM: keystone: remove call to of_clk_init
>
> Commit
>
> 4178bac ARM: call of_clk_init from default time_init handler
>
> added implicit call to of_clk_init(NULL) from default time_init callback.
> This causes double clock initialization on keystone, leading to boot
> failures.
>
> This patch fixes boot failure on keystone by dropping the call to
> of_clk_init(NULL) in keystone_pm_runtime_init(), which is set as
> subsys_initcall and therefore called after arch-wide .init_time callback.
>
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> ---
I already have a patch [1] for this in my queue. Thanks
Regards,
Santosh
[1] http://www.spinics.net/lists/arm-kernel/msg288578.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH CRITICAL] ARM: s3c64xx: dt: Fix boot failure due to double clock initialization
2013-12-13 19:59 [PATCH CRITICAL] ARM: s3c64xx: dt: Fix boot failure due to double clock initialization Tomasz Figa
2013-12-14 3:00 ` Arnd Bergmann
@ 2013-12-14 5:52 ` Olof Johansson
[not found] ` <CAPTRvHn7yTt6mC1fjEn5Ra9yx=GZ1DyNQtGWvHsDd_LkuiM_wA@mail.gmail.com>
1 sibling, 1 reply; 13+ messages in thread
From: Olof Johansson @ 2013-12-14 5:52 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Dec 13, 2013 at 11:59 AM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
> Commit
>
> 4178bac ARM: call of_clk_init from default time_init handler
>
> added implicit call to of_clk_init() from default time_init callback,
> but it did not change platforms calling it from other callbacks, despite
> of not having custom time_init callbacks. This caused double clock
> initialization on such platforms, leading to boot failures. An example
> of such platform is mach-s3c64xx.
>
> This patch fixes boot failure on s3c64xx by dropping custom init_irq
> callback, which had a call to of_clk_init() and moving system reset
> initialization to init_machine callback. This allows us to have
> clocks initialized properly without a need to have custom init_time or
> init_irq callbacks.
>
> Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
> ---
> arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c | 11 +----------
> 1 file changed, 1 insertion(+), 10 deletions(-)
>
> NOTE: This is a critical boot regression fix for mach-s3c64xx that
> should be merged for next 3.13-rc release.
Applied to fixes. We sent a batch of fixes just the other day so this
will likely go in sometime next week, but it'll be in linux-next as of
the next release.
Hm, it'd be nice to get better coverage of 64xx as well as exynos 4.
Are there any cheap 64xx development boards out there?
-Olof
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2014-06-10 8:17 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-13 19:59 [PATCH CRITICAL] ARM: s3c64xx: dt: Fix boot failure due to double clock initialization Tomasz Figa
2013-12-14 3:00 ` Arnd Bergmann
2013-12-14 5:50 ` Olof Johansson
2013-12-14 17:28 ` Santosh Shilimkar
2013-12-14 11:47 ` Sebastian Hesselbarth
2013-12-14 17:30 ` Santosh Shilimkar
2013-12-14 5:52 ` Olof Johansson
[not found] ` <CAPTRvHn7yTt6mC1fjEn5Ra9yx=GZ1DyNQtGWvHsDd_LkuiM_wA@mail.gmail.com>
2013-12-14 12:41 ` Tomasz Figa
2013-12-14 14:14 ` Dillon
2013-12-16 21:09 ` Mark Brown
2013-12-17 15:14 ` Charles Keepax
2013-12-17 19:12 ` Olof Johansson
2014-06-10 8:17 ` Olof Johansson
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).