linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH CRITICAL] ARM: s3c64xx: dt: Fix boot failure due to double clock initialization
Date: Sat, 14 Dec 2013 04:00:16 +0100	[thread overview]
Message-ID: <201312140400.16794.arnd@arndb.de> (raw)
In-Reply-To: <1386964779-29457-1-git-send-email-tomasz.figa@gmail.com>

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

  reply	other threads:[~2013-12-14  3:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201312140400.16794.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).