OpenCloudOS-Kernel/include/soc/tegra
Sumit Gupta 9c9312fccd firmware: tegra: Add suspend hook and reset BPMP IPC early on resume
[ Upstream commit ea608a01d4ee66f8b51070e623f9adb8684c0dd4 ]

Add suspend hook and a 'suspended' field in the 'struct tegra_bpmp'
to mark if BPMP is suspended. Also, add a 'flags' field in the
'struct tegra_bpmp_message' whose 'TEGRA_BPMP_MESSAGE_RESET' bit can be
set from the Tegra MC driver to signal that the reset of BPMP IPC
channels is required before sending MRQ to the BPMP FW. Together both
the fields allow us to handle any requests that might be sent too soon
as they can cause hang during system resume.

One case where we see BPMP requests being sent before the BPMP driver
has resumed is the memory bandwidth requests which are triggered by
onlining the CPUs during system resume. The CPUs are onlined before the
BPMP has resumed and we need to reset the BPMP IPC channels to handle
these requests.

The additional check for 'flags' is done to avoid any un-intended BPMP
IPC reset if the tegra_bpmp_transfer*() API gets called during suspend
sequence after the BPMP driver is suspended.

Fixes: f41e1442ac ("cpufreq: tegra194: add OPP support and set bandwidth")
Co-developed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 11:59:16 +01:00
..
ahb.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
bpmp-abi.h firmware: tegra: Update BPMP ABI 2022-11-17 23:34:17 +01:00
bpmp.h firmware: tegra: Add suspend hook and reset BPMP IPC early on resume 2023-11-20 11:59:16 +01:00
common.h soc/tegra: Add devm_tegra_core_dev_init_opp_table_common() 2021-12-16 14:03:38 +01:00
cpuidle.h cpuidle: Refactor and move out NVIDIA Tegra20 driver into drivers/cpuidle 2020-03-13 11:31:58 +01:00
flowctrl.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 399 2019-06-05 17:37:12 +02:00
fuse.h soc/tegra: fuse: Add support for Tegra264 2023-05-16 10:58:50 +02:00
irq.h soc/tegra: irq: Add stubs needed for compile testing 2021-10-04 21:27:21 +02:00
ivc.h firmware: tegra: Changes for v6.2-rc1 2022-11-22 22:14:39 +01:00
mc.h memory: tegra: Add dummy implementation on Tegra194 2023-07-10 12:04:56 +02:00
pm.h soc/tegra: pm: Make stubs usable for compile testing 2021-10-04 21:27:40 +02:00
pmc.h soc/tegra: pmc: Add I/O pad table for Tegra234 2022-11-10 02:21:12 +01:00
tegra-cbb.h soc/tegra: cbb: Add CBB 1.0 driver for Tegra194 2022-09-15 12:41:36 +02:00