ARM: tegra: Core changes for v5.5-rc1
Contains two fixes for CPU idle and suspend/resume on early Tegra SoCs. -----BEGIN PGP SIGNATURE----- iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAl29jncTHHRyZWRpbmdA bnZpZGlhLmNvbQAKCRDdI6zXfz6zoUUVD/9QbdQ+AKy5cfOee7tvTwF2KVYqIIC5 tSh7bmi/ZVmXwmgOxljhd7iuNSXCFZHho5izxklzwPtR+gvKzxqiIpHyS2tiYTc8 C9FGTrh+FHuF7mh4RRf885uCuatpILo0wNYNf5TmZcBAjr1674gQdd3yL6Ev9LLh Hv3VETFaFlOoGA3R3/a9bd+WgJQURN0XoMSeKH4iAxSBAmAu+n292tQQtAQgufLE T2SlROk7KSHn4MxJMLXiH+OomwYSVjZr9sVZrmwcJGBj1ymhbqyk+/c24cJzKqq1 OtZlUtHwICjqZONGjGFtRxYoYNERHRBjDR4jdLAZtqononKvyKCiHiFf+wqyI8sq HWPVsXzmmCyrIeEnstunGwVTimKoqAGDhLqhY2ujunuriLLIljygQSrjJ7giwRbg uJAc9mfJBmiYP1Wx+Rqg/fgZTpa3pLBRnGfz4mzx3CbPzLM5zKixA4wpQlcnZ/fo ELvkO1eOxqDgtAD1PSWWzD8Ksp+LawwEoxjmYzdRJTZ6Yg2+LRRT2ixXgWQStJd4 0yKWGjHtRVxN1qGe+sN4WuRksK6/pwlYVyAP7EYWW1U50V8+Ip6UbMyIyxTNcjdC /fFi3Gc3OnugD7rJ0xlIaqDnMctzaiq+AeFnR+gTAYZPtxSpSF8oxKAcNIkMFW6T brm1w90JCaDD5Q== =QeJo -----END PGP SIGNATURE----- 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>
This commit is contained in:
Коммит
f5ed5010df
|
@ -44,16 +44,16 @@ ENTRY(tegra_resume)
|
|||
cmp r6, #TEGRA20
|
||||
beq 1f @ Yes
|
||||
/* Clear the flow controller flags for this CPU. */
|
||||
cpu_to_csr_reg r1, r0
|
||||
cpu_to_csr_reg r3, r0
|
||||
mov32 r2, TEGRA_FLOW_CTRL_BASE
|
||||
ldr r1, [r2, r1]
|
||||
ldr r1, [r2, r3]
|
||||
/* Clear event & intr flag */
|
||||
orr r1, r1, \
|
||||
#FLOW_CTRL_CSR_INTR_FLAG | FLOW_CTRL_CSR_EVENT_FLAG
|
||||
movw r0, #0x3FFD @ enable, cluster_switch, immed, bitmaps
|
||||
@ & ext flags for CPU power mgnt
|
||||
bic r1, r1, r0
|
||||
str r1, [r2]
|
||||
str r1, [r2, r3]
|
||||
1:
|
||||
|
||||
mov32 r9, 0xc09
|
||||
|
|
|
@ -682,10 +682,12 @@ tegra30_enter_sleep:
|
|||
dsb
|
||||
ldr r0, [r6, r2] /* memory barrier */
|
||||
|
||||
cmp r10, #TEGRA30
|
||||
halted:
|
||||
isb
|
||||
dsb
|
||||
wfi /* CPU should be power gated here */
|
||||
wfine /* CPU should be power gated here */
|
||||
wfeeq
|
||||
|
||||
/* !!!FIXME!!! Implement halt failure handler */
|
||||
b halted
|
||||
|
|
|
@ -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 */
|
||||
|
|
Загрузка…
Ссылка в новой задаче