firmware: tegra: reset BPMP IPC channels early during resume
PATCH 1/1 firmware: tegra: reset BPMP IPC channels early during resume
Add 'tegra_bpmp_reset()' function to reset the IPC channels for BPMP on first call to tegra_bpmp_transfer() API after system resumes. This allows 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.
Fixes f41e1442ac5b ("cpufreq: tegra194: add OPP support and set bandwidth")
Signed-off-by Jonathan Hunter <[email protected]>
Signed-off-by Sumit Gupta <[email protected]>
--- drivers/firmware/tegra/bpmp-private.h | 2 +- drivers/firmware/tegra/bpmp-tegra186.c | 4 +-- drivers/firmware/tegra/bpmp.c | 45 ++++++++++++++++++++++---- include/soc/tegra/bpmp.h | 2 ++ 4 files changed, 44 insertions(+), 9 deletions(-)
drivers/firmware/tegra/bpmp-private.h +1 -1
@@ -20,7 +20,7 @@ struct tegra_bpmp_ops {int (*post_response)(struct tegra_bpmp_channel *channel);int (*post_request)(struct tegra_bpmp_channel *channel);int (*ring_doorbell)(struct tegra_bpmp *bpmp); -int (*resume)(struct tegra_bpmp *bpmp); +int (*reset)(struct tegra_bpmp *bpmp); }; #if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) || \
drivers/firmware/tegra/bpmp-tegra186.c +2 -2
@@ -366,7 +366,7 @@ static void tegra186_bpmp_deinit(struct tegra_bpmp *bpmp)tegra186_bpmp_teardown_channels (bpmp); } -static int tegra186_bpmp_resume (struct tegra_bpmp *bpmp) +static int tegra186_bpmp_reset (struct tegra_bpmp *bpmp) {tegra186_bpmp_reset_channels (bpmp);
@@ -385,5 +385,5 @@ const struct tegra_bpmp_ops tegra186_bpmp_ops = { .post_response = tegra186_bpmp_post_message, .post_request = tegra186_bpmp_post_message, .ring_doorbell = tegra186_bpmp_ring_doorbell, - .resume = tegra186_bpmp_resume, + .reset = tegra186_bpmp_reset, };
drivers/firmware/tegra/bpmp.c +39 -6
81 lines not on this page · raw message
include/soc/tegra/bpmp.h +2 -0
@@ -102,6 +102,8 @@ struct tegra_bpmp {#ifdef CONFIG_DEBUG_FS struct dentry *debugfs_mirror;#endif + +bool needs_reset; };struct tegra_bpmp_message {
Signature · 1 line
2.17.1