All of lore.kernel.org
 help / color / mirror / Atom feed
From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: nomadik: fix multiplatform problem
Date: Tue, 21 Jan 2014 11:52:09 +0100	[thread overview]
Message-ID: <20140121105209.GC13396@lunn.ch> (raw)
In-Reply-To: <1390291581-5858-1-git-send-email-linus.walleij@linaro.org>

On Tue, Jan 21, 2014 at 09:06:21AM +0100, Linus Walleij wrote:
> The Nomadik debugfs screws up multiplatform boots if debugfs
> is enabled on the multiplatform image, since it's a simple
> initcall that is unconditionally executed and reads from certain
> memory locations.
> 
> Fix this by checking that the driver has been properly
> initialized, so a base offset to the Nomadik SRC controller
> exists, before proceeding to register debugfs files.
> 
> Reported-by: Andrew Lunn <andrew@lunn.ch>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Hi Linus

Thanks for fixing this so quick. I tested on my kirkwood, no longer
crashes.

Tested-by: Andrew Lunn <andrew@lunn.ch>

Thanks
	Andrew

> ---
>  drivers/clk/clk-nomadik.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/clk/clk-nomadik.c b/drivers/clk/clk-nomadik.c
> index 6a934a5296bd..05e04ce0f148 100644
> --- a/drivers/clk/clk-nomadik.c
> +++ b/drivers/clk/clk-nomadik.c
> @@ -494,6 +494,9 @@ static const struct file_operations nomadik_src_clk_debugfs_ops = {
>  
>  static int __init nomadik_src_clk_init_debugfs(void)
>  {
> +	/* Vital for multiplatform */
> +	if (!src_base)
> +		return -ENODEV;
>  	src_pcksr0_boot = readl(src_base + SRC_PCKSR0);
>  	src_pcksr1_boot = readl(src_base + SRC_PCKSR1);
>  	debugfs_create_file("nomadik-src-clk", S_IFREG | S_IRUGO,
> -- 
> 1.8.4.2
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2014-01-21 10:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-21  8:06 [PATCH] clk: nomadik: fix multiplatform problem Linus Walleij
2014-01-21 10:52 ` Andrew Lunn [this message]
2014-01-29  8:07 ` Linus Walleij
2014-02-25 21:35   ` Linus Walleij
2014-02-26  8:38     ` Mike Turquette

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=20140121105209.GC13396@lunn.ch \
    --to=andrew@lunn.ch \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.