]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
fix(versal-net): enable wake interrupt during client suspend
authorJay Buddhabhatti <jay.buddhabhatti@amd.com>
Fri, 30 Dec 2022 05:54:44 +0000 (21:54 -0800)
committerJay Buddhabhatti <jay.buddhabhatti@amd.com>
Tue, 10 Jan 2023 10:19:33 +0000 (02:19 -0800)
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 <jay.buddhabhatti@amd.com>
Change-Id: I1154495c25e0468496f6e112996fd182aa516d88

plat/xilinx/versal_net/pm_service/pm_client.c

index b42b466511c50ae4fdb64a2ec0473e139ac7b410..f543193e4083aaa2781e3745a21e4d49fd6377a7 100644 (file)
@@ -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);
 }