diff options
| author | Lukas Funke <[email protected]> | 2024-06-07 11:26:08 +0200 |
|---|---|---|
| committer | Michal Simek <[email protected]> | 2024-06-17 16:02:30 +0200 |
| commit | 081f3a19912174018f55c854c7b258cb2d511ce1 (patch) | |
| tree | dc73424deae0906c398b5d0af37e34565675d1df | |
| parent | d67558b358963be5e8e39a80b3d27ba9325df72f (diff) | |
xilinx: zynqmp: Enable reset_cpu() in SPL
This commit enables SPL to reset the CPU via PMU-firmware. The usual
reset mechanism requires bl31 to be loaded which may not be the case in
SPL.
Signed-off-by: Lukas Funke <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Michal Simek <[email protected]>
| -rw-r--r-- | board/xilinx/zynqmp/zynqmp.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index 63cc6b862e9..b4c15b041cc 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -285,6 +285,18 @@ int dram_init(void) #if !CONFIG_IS_ENABLED(SYSRESET) void reset_cpu(void) { + if (!IS_ENABLED(CONFIG_ZYNQMP_FIRMWARE)) { + log_warning("reset failed: ZYNQMP_FIRMWARE disabled"); + return; + } + + /* In case of !CONFIG_ZYNQMP_FIRMWARE the call to 'xilinx_pm_request()' + * will be removed by the compiler due to the early return. + * If CONFIG_ZYNQMP_FIRMWARE is defined in SPL 'xilinx_pm_request()' + * will send command over IPI and requires pmufw to be present. + */ + xilinx_pm_request(PM_RESET_ASSERT, ZYNQMP_PM_RESET_SOFT, + PM_RESET_ACTION_ASSERT, 0, 0, NULL); } #endif |
