]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
fix(versal-net): disable wakeup interrupt during client wakeup
authorJay Buddhabhatti <jay.buddhabhatti@amd.com>
Fri, 30 Dec 2022 06:21:00 +0000 (22:21 -0800)
committerJay Buddhabhatti <jay.buddhabhatti@amd.com>
Tue, 10 Jan 2023 10:19:33 +0000 (02:19 -0800)
Clear and disable wakeup interrupt during client wakeup to avoid
multiple wakeup events.

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Change-Id: Iebc644ae582da03001830b96e3190fce10dbac42

plat/xilinx/versal_net/include/versal_net_def.h
plat/xilinx/versal_net/pm_service/pm_client.c

index bcf8315543590b57184e52d9636967cce0e86594..929186aaed37b13b335494dacd24c9595b49c420 100644 (file)
 /* Firmware Image Package */
 #define VERSAL_NET_PRIMARY_CPU         U(0)
 
+#define CORE_0_ISR_WAKE_OFFSET                 (0x00000020ULL)
+#define APU_PCIL_CORE_X_ISR_WAKE_REG(cpu_id)   (APU_PCLI + (CORE_0_ISR_WAKE_OFFSET + \
+                                                (APU_PCLI_CPU_STEP * (cpu_id))))
+#define APU_PCIL_CORE_X_ISR_WAKE_MASK          (0x00000001U)
+#define CORE_0_IEN_WAKE_OFFSET                 (0x00000028ULL)
+#define APU_PCIL_CORE_X_IEN_WAKE_REG(cpu_id)   (APU_PCLI + (CORE_0_IEN_WAKE_OFFSET + \
+                                                (APU_PCLI_CPU_STEP * (cpu_id))))
+#define APU_PCIL_CORE_X_IEN_WAKE_MASK          (0x00000001U)
+#define CORE_0_IDS_WAKE_OFFSET                 (0x0000002CULL)
+#define APU_PCIL_CORE_X_IDS_WAKE_REG(cpu_id)   (APU_PCLI + (CORE_0_IDS_WAKE_OFFSET + \
+                                                (APU_PCLI_CPU_STEP * (cpu_id))))
+#define APU_PCIL_CORE_X_IDS_WAKE_MASK          (0x00000001U)
 #define CORE_0_ISR_POWER_OFFSET                        (0x00000010ULL)
 #define APU_PCIL_CORE_X_ISR_POWER_REG(cpu_id)  (APU_PCLI + (CORE_0_ISR_POWER_OFFSET + \
                                                 (APU_PCLI_CPU_STEP * (cpu_id))))
index 0142f335872ff003979c701696d5281fc3039b40..b42b466511c50ae4fdb64a2ec0473e139ac7b410 100644 (file)
@@ -219,6 +219,12 @@ void pm_client_wakeup(const struct pm_proc *proc)
        /* Disabled power down interrupt */
        mmio_write_32(APU_PCIL_CORE_X_IDS_POWER_REG(cpuid),
                        APU_PCIL_CORE_X_IDS_POWER_MASK);
+       /* Clear wakeup interrupt status before disabling */
+       mmio_write_32(APU_PCIL_CORE_X_ISR_WAKE_REG(cpuid),
+                     APU_PCIL_CORE_X_ISR_WAKE_MASK);
+       /* Disable wake interrupt */
+       mmio_write_32(APU_PCIL_CORE_X_IDS_WAKE_REG(cpuid),
+                     APU_PCIL_CORE_X_IDS_WAKE_MASK);
 
        bakery_lock_release(&pm_client_secure_lock);
 }