summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJay Buddhabhatti <jay.buddhabhatti@amd.com>2026-07-29 05:25:21 -0700
committerMichal Simek <michal.simek@amd.com>2026-08-10 09:30:44 +0200
commit84dbfa5519cf6583d09ee0123ac580542b144553 (patch)
treea8665ab522e9f078e61f3e07f152cca714cb8102 /include/linux
parent00bee072c8ae394b029ed4ce6fc8def3e5627e1c (diff)
firmware: xilinx: Release all peripheral devices from firmware
During a kexec restart, only the kernel is reloaded while devices allocated in firmware persist, causing state mismatches between the kernel and firmware. Introduce PM_DEV_ALL_PERIPH node ID (0x18224FFFU) to release all peripheral devices during kexec. On graceful restarts, this happens in zynqmp_firmware_shutdown(). On crash kernel restarts, it happens in zynqmp_firmware_probe() of the reloaded kernel. Releasing all peripherals depends on firmware support for the PM_DEV_ALL_PERIPH node ID. On firmware that does not implement it (the feature check reports a version below PM_API_VERSION_3) the release is skipped and a warning such as "Bulk device release is not supported by firmware" is logged, e.g. on Versal NET firmware that predates this API. Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com> Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com> Reviewed-by: Prasanna Kumar T S M <ptsm@linux.microsoft.com> Link: https://patch.msgid.link/20260729122522.3732875-3-jay.buddhabhatti@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/firmware/xlnx-zynqmp.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h
index baaa88b0b197..ac39e5492961 100644
--- a/include/linux/firmware/xlnx-zynqmp.h
+++ b/include/linux/firmware/xlnx-zynqmp.h
@@ -50,6 +50,7 @@
/* PM API versions */
#define PM_API_VERSION_1 1
#define PM_API_VERSION_2 2
+#define PM_API_VERSION_3 3
#define PM_PINCTRL_PARAM_SET_VERSION 2
@@ -145,6 +146,9 @@
#define XPM_EVENT_ERROR_MASK_NOC_NCR BIT(13)
#define XPM_EVENT_ERROR_MASK_NOC_CR BIT(12)
+/* Node ID for all peripheral devices */
+#define PM_DEV_ALL_PERIPH 0x18224FFFU
+
enum pm_module_id {
PM_MODULE_ID = 0x0,
XPM_MODULE_ID = 0x2,