From 39fffe552fb04028de750e6080d9a8ba46e89b8c Mon Sep 17 00:00:00 2001 From: Jay Buddhabhatti Date: Thu, 29 Dec 2022 21:54:44 -0800 Subject: [PATCH] fix(versal-net): enable wake interrupt during client suspend Wakeup interrupt should be set during power down sequence to wake processor. So enable wakeup interrupt during power down sequence. Signed-off-by: Jay Buddhabhatti Change-Id: I1154495c25e0468496f6e112996fd182aa516d88 --- plat/xilinx/versal_net/pm_service/pm_client.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plat/xilinx/versal_net/pm_service/pm_client.c b/plat/xilinx/versal_net/pm_service/pm_client.c index b42b46651..f543193e4 100644 --- a/plat/xilinx/versal_net/pm_service/pm_client.c +++ b/plat/xilinx/versal_net/pm_service/pm_client.c @@ -170,6 +170,12 @@ void pm_client_suspend(const struct pm_proc *proc, uint32_t state) /* Enable power down interrupt */ mmio_write_32(APU_PCIL_CORE_X_IEN_POWER_REG(cpu_id), APU_PCIL_CORE_X_IEN_POWER_MASK); + /* Clear wakeup interrupt status before enabling */ + mmio_write_32(APU_PCIL_CORE_X_ISR_WAKE_REG(cpu_id), + APU_PCIL_CORE_X_ISR_WAKE_MASK); + /* Enable wake interrupt */ + mmio_write_32(APU_PCIL_CORE_X_IEN_WAKE_REG(cpu_id), + APU_PCIL_CORE_X_IEN_WAKE_MASK); bakery_lock_release(&pm_client_secure_lock); }