linux/drivers/firmware/tegra
Sumit Gupta ea608a01d4 firmware: tegra: Add suspend hook and reset BPMP IPC early on resume
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>
2023-10-13 14:20:27 +02:00
..
bpmp-debugfs.c firmware: tegra: bpmp: Fix error paths in debugfs 2023-04-03 14:29:05 +02:00
bpmp-private.h firmware: tegra: bpmp: Fix Tegra234-only builds 2021-06-11 13:31:51 +02:00
bpmp-tegra186.c firmware: tegra: bpmp: Add support for DRAM MRQ GSCs 2023-06-09 17:17:23 +02:00
bpmp-tegra210.c firmware: tegra: Remove surplus dev_err() when using platform_get_irq_byname() 2022-11-17 23:52:39 +01:00
bpmp.c firmware: tegra: Add suspend hook and reset BPMP IPC early on resume 2023-10-13 14:20:27 +02:00
ivc.c firmware: tegra: bpmp: Use iosys-map helpers 2022-10-24 15:18:11 +02:00
Kconfig tegra: mark BPMP driver as little-endian only 2022-11-23 14:21:23 +01:00
Makefile firmware: tegra: bpmp: Fix Tegra234-only builds 2021-06-11 13:31:51 +02:00