* [PATCH] clk: nomadik: fix multiplatform problem
@ 2014-01-21 8:06 Linus Walleij
2014-01-21 10:52 ` Andrew Lunn
2014-01-29 8:07 ` Linus Walleij
0 siblings, 2 replies; 5+ messages in thread
From: Linus Walleij @ 2014-01-21 8:06 UTC (permalink / raw)
To: linux-arm-kernel
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>
---
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] clk: nomadik: fix multiplatform problem
2014-01-21 8:06 [PATCH] clk: nomadik: fix multiplatform problem Linus Walleij
@ 2014-01-21 10:52 ` Andrew Lunn
2014-01-29 8:07 ` Linus Walleij
1 sibling, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2014-01-21 10:52 UTC (permalink / raw)
To: linux-arm-kernel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] clk: nomadik: fix multiplatform problem
2014-01-21 8:06 [PATCH] clk: nomadik: fix multiplatform problem Linus Walleij
2014-01-21 10:52 ` Andrew Lunn
@ 2014-01-29 8:07 ` Linus Walleij
2014-02-25 21:35 ` Linus Walleij
1 sibling, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2014-01-29 8:07 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jan 21, 2014 at 9:06 AM, Linus Walleij <linus.walleij@linaro.org> 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>
Ping Mike, pls pick this for fixes!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] clk: nomadik: fix multiplatform problem
2014-01-29 8:07 ` Linus Walleij
@ 2014-02-25 21:35 ` Linus Walleij
2014-02-26 8:38 ` Mike Turquette
0 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2014-02-25 21:35 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Jan 29, 2014 at 9:07 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Tue, Jan 21, 2014 at 9:06 AM, Linus Walleij <linus.walleij@linaro.org> 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>
>
> Ping Mike, pls pick this for fixes!
Ping Mike, this needs to go into fixes!
ARM SoC folks: Mike seems to be busy, maybe you can pick
this patch into the ARM SoC tree instead?
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] clk: nomadik: fix multiplatform problem
2014-02-25 21:35 ` Linus Walleij
@ 2014-02-26 8:38 ` Mike Turquette
0 siblings, 0 replies; 5+ messages in thread
From: Mike Turquette @ 2014-02-26 8:38 UTC (permalink / raw)
To: linux-arm-kernel
Quoting Linus Walleij (2014-02-25 13:35:37)
> On Wed, Jan 29, 2014 at 9:07 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> > On Tue, Jan 21, 2014 at 9:06 AM, Linus Walleij <linus.walleij@linaro.org> 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>
> >
> > Ping Mike, pls pick this for fixes!
>
> Ping Mike, this needs to go into fixes!
Taken into clk-fixes for the next batch.
Thanks!
Mike
>
> ARM SoC folks: Mike seems to be busy, maybe you can pick
> this patch into the ARM SoC tree instead?
>
> Yours,
> Linus Walleij
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-02-26 8:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-21 8:06 [PATCH] clk: nomadik: fix multiplatform problem Linus Walleij
2014-01-21 10:52 ` Andrew Lunn
2014-01-29 8:07 ` Linus Walleij
2014-02-25 21:35 ` Linus Walleij
2014-02-26 8:38 ` Mike Turquette
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).