From: Dmitry Osipenko <digetx@gmail.com>
To: Rob Herring <robh+dt@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Joseph Lo <josephl@nvidia.com>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Peter De Schrijver <pdeschrijver@nvidia.com>,
Prashant Gaikwad <pgaikwad@nvidia.com>,
Stephen Boyd <sboyd@kernel.org>
Cc: devicetree@vger.kernel.org, linux-clk@vger.kernel.org,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v6 14/15] ARM: tegra30: cpuidle: Don't enter LP2 on CPU0 when EMC runs off PLLP
Date: Mon, 1 Jul 2019 00:00:18 +0300 [thread overview]
Message-ID: <20190630210019.26914-15-digetx@gmail.com> (raw)
In-Reply-To: <20190630210019.26914-1-digetx@gmail.com>
Machine hangs after entering LP2 if EMC clock is running off the PLLP.
Either hardware is touching PLLP during LP2, making it unstable, or there
is a software bug somewhere around PLLP programming. Real reason is
unknown, hence let's simply avoid LP2 for CPU0 for now to workaround the
problem. Note that LP2 works fine when EMC is running off any other parent
clock, LP1 is totally unaffected. Also note that there is no hang on LP2
if memory timing is set up for a higher rate (600MHz) when on PLLP, which
makes this extra suspicious.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
arch/arm/mach-tegra/cpuidle-tegra30.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-tegra/cpuidle-tegra30.c b/arch/arm/mach-tegra/cpuidle-tegra30.c
index c6128526877d..0f8da69ba5be 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra30.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra30.c
@@ -60,10 +60,15 @@ static bool tegra30_cpu_cluster_power_down(struct cpuidle_device *dev,
struct cpuidle_driver *drv,
int index)
{
- /* All CPUs entering LP2 is not working.
+ /*
+ * All CPUs entering LP2 is not working.
* Don't let CPU0 enter LP2 when any secondary CPU is online.
+ *
+ * Machine hangs after entering LP2 if EMC is running off PLLP,
+ * reason is unknown.
*/
- if (num_online_cpus() > 1 || !tegra_cpu_rail_off_ready()) {
+ if (num_online_cpus() > 1 || !tegra_cpu_rail_off_ready() ||
+ tegra20_clk_emc_on_pllp()) {
cpu_do_idle();
return false;
}
--
2.22.0
next prev parent reply other threads:[~2019-06-30 21:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-30 21:00 [PATCH v6 00/15] memory: tegra: Introduce Tegra30 EMC driver Dmitry Osipenko
2019-06-30 21:00 ` [PATCH v6 01/15] clk: tegra20/30: Add custom EMC clock implementation Dmitry Osipenko
2019-06-30 21:00 ` [PATCH v6 02/15] memory: tegra20-emc: Drop setting EMC rate to max on probe Dmitry Osipenko
2019-06-30 21:00 ` [PATCH v6 03/15] memory: tegra20-emc: Adapt for clock driver changes Dmitry Osipenko
2019-06-30 21:00 ` [PATCH v6 04/15] memory: tegra20-emc: Include io.h instead of iopoll.h Dmitry Osipenko
2019-06-30 21:00 ` [PATCH v6 05/15] memory: tegra20-emc: Pre-configure debug register Dmitry Osipenko
2019-06-30 21:00 ` [PATCH v6 06/15] memory: tegra20-emc: Print a brief info message about the timings Dmitry Osipenko
2019-06-30 21:00 ` [PATCH v6 07/15] dt-bindings: memory: tegra30: Convert to Tegra124 YAML Dmitry Osipenko
2019-07-01 19:11 ` Rob Herring
2019-07-01 19:30 ` Dmitry Osipenko
2019-07-03 0:48 ` Dmitry Osipenko
2019-07-03 13:22 ` Rob Herring
2019-07-03 14:05 ` Dmitry Osipenko
2019-06-30 21:00 ` [PATCH v6 08/15] dt-bindings: memory: Add binding for NVIDIA Tegra30 Memory Controller Dmitry Osipenko
2019-06-30 21:00 ` [PATCH v6 09/15] dt-bindings: memory: Add binding for NVIDIA Tegra30 External " Dmitry Osipenko
2019-06-30 21:00 ` [PATCH v6 10/15] memory: tegra: Introduce Tegra30 EMC driver Dmitry Osipenko
2019-06-30 21:00 ` [PATCH v6 11/15] memory: tegra: Ensure timing control debug features are disabled Dmitry Osipenko
2019-06-30 21:00 ` [PATCH v6 12/15] memory: tegra: Consolidate registers definition into common header Dmitry Osipenko
2019-06-30 21:00 ` [PATCH v6 13/15] clk: tegra20: emc: Add tegra20_clk_emc_on_pllp() Dmitry Osipenko
2019-06-30 21:00 ` Dmitry Osipenko [this message]
2019-06-30 21:00 ` [PATCH v6 15/15] ARM: dts: tegra30: Add External Memory Controller node 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=20190630210019.26914-15-digetx@gmail.com \
--to=digetx@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=jonathanh@nvidia.com \
--cc=josephl@nvidia.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=pdeschrijver@nvidia.com \
--cc=pgaikwad@nvidia.com \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.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;
as well as URLs for NNTP newsgroup(s).