From: Dinh Nguyen <dinguyen@kernel.org>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>,
Vladimir Zapolskiy <vz@mleia.com>,
Michael Turquette <mturquette@baylibre.com>,
linux-clk@vger.kernel.org,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: commit 5146e0b05963 is causing a kernel crash on SoCFPGA
Date: Tue, 9 Feb 2016 04:11:13 -0600 [thread overview]
Message-ID: <56B9BB41.3080001@kernel.org> (raw)
In-Reply-To: <CAK7LNASSex+Nfpzp-=FGbo7eKCteamvyX_DyZaeRenhpF72ZdQ@mail.gmail.com>
Hi Masahiro,
On 02/08/2016 10:00 PM, Masahiro Yamada wrote:
> Hi Dinh,
>
> Thanks for your report.
>
>
> 2016-02-09 11:35 GMT+09:00 Dinh Nguyen <dinguyen@kernel.org>:
>> Hi Stephen,
>>
>> It appears that commit 5146e0b05966 "clk: simplify __clk_init_parent()"
>> that is currently in linux-next is causing the following kernel crash on
>> SoCFGPA[1].
>>
>> I have bisected to this commit and doing a revert of the commit fixes
>> the issue.
>
>
> Could you check if the following simple patch fixes your problem?
>
>
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -1662,7 +1662,7 @@ static struct clk_core *__clk_init_parent(struct
> clk_core *core)
> {
> u8 index = 0;
>
> - if (core->ops->get_parent)
> + if (core->num_parents > 1 && core->ops->get_parent)
> index = core->ops->get_parent(core->hw);
>
> return clk_core_get_parent_by_index(core, index);
>
>
Yes, the above patch fixes the problem and the SoCFPGA board is able to
boot.
>
>
> Let me ask one more question.
>
> Do SoCFPGA clocks define .get_parent callback even if num_parents <= 1 ?
>
>
> I just skimmed over driver/clk/socfpga/clk-gate.c
> and found it defines .get_parent().
>
> I think a gating clock is usually single-parent (so not need to have
> .get_parent),
> but I am not sure if this is the case.
>
Yes, .get_parent call back is define when num_parents = 1. If you take a
look at socfpga.dtsi, the main_pll of type "altr,socfpga-pll-clk" only
has 1 parent, osc1. But the periph_pll and sdram_pll, also of type
"altr,socfpga-pll-clk" has > 1 parents.
Dinh
next prev parent reply other threads:[~2016-02-09 10:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-09 2:35 commit 5146e0b05963 is causing a kernel crash on SoCFPGA Dinh Nguyen
2016-02-09 4:00 ` Masahiro Yamada
2016-02-09 10:11 ` Dinh Nguyen [this message]
2016-02-09 11:21 ` Masahiro Yamada
2016-02-09 18:18 ` Stephen Boyd
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=56B9BB41.3080001@kernel.org \
--to=dinguyen@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@codeaurora.org \
--cc=vz@mleia.com \
--cc=yamada.masahiro@socionext.com \
/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).