From: Dmitry Osipenko <digetx@gmail.com>
To: Jon Hunter <jonathanh@nvidia.com>,
Peter De Schrijver <pdeschrijver@nvidia.com>,
Prashant Gaikwad <pgaikwad@nvidia.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@codeaurora.org>,
Thierry Reding <thierry.reding@gmail.com>
Cc: linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH] clk: tegra: Mark APB clock as critical
Date: Wed, 29 Nov 2017 03:09:24 +0300 [thread overview]
Message-ID: <f940d9f1-aaec-cf25-24d2-956df63bbbd1@gmail.com> (raw)
In-Reply-To: <18f57c1f-add0-908a-6a26-7cc81f29d7d9@gmail.com>
On 29.11.2017 02:30, Dmitry Osipenko wrote:
> On 23.10.2017 14:12, Jon Hunter wrote:
>> Commit a140614373ae ("clk: tegra: Correct parent of the APBDMA clock")
>> fixed the parent clock for APBDMA, but the consequence of this that
>> after probing the APBDMA device, the APB Clock (or PCLK) is now
>> disabled. Disabling the APB clock causes accesses to any other device
>> on the APB to hang and prevent Tegra from booting.
>>
>> Currently, the APB clock is registered with the flag "CLK_IGNORE_UNUSED"
>> to prevent the clock being disabled if unused on boot. However, even
>> if it is used, it still needs to be always kept enabled and so update
>> the flag for the APB clock to be "CLK_IS_CRITICAL".
>>
>> Fixes: a140614373ae ("clk: tegra: Correct parent of the APBDMA clock")
>>
>> Suggested-by: Peter De Schrijver <pdeschrijver@nvidia.com>
>> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
>> ---
>> drivers/clk/tegra/clk-tegra-super-gen4.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/clk/tegra/clk-tegra-super-gen4.c b/drivers/clk/tegra/clk-tegra-super-gen4.c
>> index 4f6fd307cb70..10047107c1dc 100644
>> --- a/drivers/clk/tegra/clk-tegra-super-gen4.c
>> +++ b/drivers/clk/tegra/clk-tegra-super-gen4.c
>> @@ -166,7 +166,7 @@ static void __init tegra_sclk_init(void __iomem *clk_base,
>> clk_base + SYSTEM_CLK_RATE, 0, 2, 0,
>> &sysrate_lock);
>> clk = clk_register_gate(NULL, "pclk", "pclk_div", CLK_SET_RATE_PARENT |
>> - CLK_IGNORE_UNUSED, clk_base + SYSTEM_CLK_RATE,
>> + CLK_IS_CRITICAL, clk_base + SYSTEM_CLK_RATE,
>> 3, CLK_GATE_SET_TO_DISABLE, &sysrate_lock);
>> *dt_clk = clk;
>> }
>>
>
> Unfortunately this patch somehow breaks Tegra20, getting a hang during boot. For
> now I don't know what's the cause of the issue, may take a more detailed look
> soon. If you have any suggestions, please tell.
>
It looks like that with CLK_IS_CRITICAL flag, pclk is getting enabled before
clock rate is setup and in result it is enabled with some invalid rate config.
next prev parent reply other threads:[~2017-11-29 0:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-23 11:12 [PATCH] clk: tegra: Mark APB clock as critical Jon Hunter
2017-10-23 11:57 ` Peter De Schrijver
2017-11-28 23:30 ` Dmitry Osipenko
2017-11-29 0:09 ` Dmitry Osipenko [this message]
2017-11-29 10:12 ` Jon Hunter
2017-11-29 15:08 ` Dmitry Osipenko
2017-11-29 22:55 ` Jon Hunter
2017-11-29 23:13 ` Dmitry Osipenko
2017-11-30 11:31 ` Jon Hunter
2017-11-30 13:24 ` Dmitry Osipenko
2017-11-30 16:39 ` Jon Hunter
2017-11-30 16:45 ` Dmitry Osipenko
2017-11-30 16:51 ` Jon Hunter
2017-11-30 16:53 ` Dmitry Osipenko
2017-11-30 17:22 ` Jon Hunter
2017-11-30 17:49 ` Dmitry Osipenko
2017-12-01 8:48 ` Peter De Schrijver
2017-12-02 12:47 ` Dmitry Osipenko
2017-12-05 9:06 ` Peter De Schrijver
2017-12-05 18:22 ` Dmitry Osipenko
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=f940d9f1-aaec-cf25-24d2-956df63bbbd1@gmail.com \
--to=digetx@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=pdeschrijver@nvidia.com \
--cc=pgaikwad@nvidia.com \
--cc=sboyd@codeaurora.org \
--cc=thierry.reding@gmail.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