diff options
author | Olof Johansson <olof@lixom.net> | 2019-11-03 17:26:32 -0800 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2019-11-03 17:26:33 -0800 |
commit | f5ed5010dfaa1ca67408b7821279c362fa98a16d (patch) | |
tree | a2918d0cf9fb9e06d22e2cec3186ceaef9cc0e8d /drivers/soc/tegra/flowctrl.c | |
parent | 3bd00db6f0ea637b9d4cfe9eea98a2855e4e462c (diff) | |
parent | 91d7ff5aa7e3edd9ab99a424099476ed5667b152 (diff) |
Merge tag 'tegra-for-5.5-arm-core' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/soc
ARM: tegra: Core changes for v5.5-rc1
Contains two fixes for CPU idle and suspend/resume on early Tegra SoCs.
* tag 'tegra-for-5.5-arm-core' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
ARM: tegra: Use WFE for power-gating on Tegra30
ARM: tegra: Fix FLOW_CTLR_HALT register clobbering by tegra_resume()
Link: https://lore.kernel.org/r/20191102144521.3863321-5-thierry.reding@gmail.com
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/soc/tegra/flowctrl.c')
-rw-r--r-- | drivers/soc/tegra/flowctrl.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/soc/tegra/flowctrl.c b/drivers/soc/tegra/flowctrl.c index b6bdeef33db1..eb96a3086d6d 100644 --- a/drivers/soc/tegra/flowctrl.c +++ b/drivers/soc/tegra/flowctrl.c @@ -91,8 +91,23 @@ void flowctrl_cpu_suspend_enter(unsigned int cpuid) reg &= ~TEGRA30_FLOW_CTRL_CSR_WFE_BITMAP; /* clear wfi bitmap */ reg &= ~TEGRA30_FLOW_CTRL_CSR_WFI_BITMAP; - /* pwr gating on wfi */ - reg |= TEGRA30_FLOW_CTRL_CSR_WFI_CPU0 << cpuid; + + if (tegra_get_chip_id() == TEGRA30) { + /* + * The wfi doesn't work well on Tegra30 because + * CPU hangs under some odd circumstances after + * power-gating (like memory running off PLLP), + * hence use wfe that is working perfectly fine. + * Note that Tegra30 TRM doc clearly stands that + * wfi should be used for the "Cluster Switching", + * while wfe for the power-gating, just like it + * is done on Tegra20. + */ + reg |= TEGRA20_FLOW_CTRL_CSR_WFE_CPU0 << cpuid; + } else { + /* pwr gating on wfi */ + reg |= TEGRA30_FLOW_CTRL_CSR_WFI_CPU0 << cpuid; + } break; } reg |= FLOW_CTRL_CSR_INTR_FLAG; /* clear intr flag */ |