[RAMEN9610-13756] asoc: abox: add delay to ensure that ABOX core is suspended
authorhayoung78.joo <hayoung78.joo@samsung.com>
Fri, 22 Mar 2019 08:39:09 +0000 (17:39 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:23:21 +0000 (20:23 +0300)
Change-Id: I4d9bf28e20973231fa3d4086fe6dd2c39bb29554
Signed-off-by: hayoung78.joo <hayoung78.joo@samsung.com>
sound/soc/samsung/abox/abox.c

index 82e997a6ed1fbd474ae8b62c1d1237224272cdcd..c05db3a8d06bf16fdf0a33af91b27139e5c2f974 100644 (file)
@@ -5605,6 +5605,17 @@ static int abox_disable(struct device *dev)
        if (state != CALLIOPE_DISABLED)
                abox_cpu_pm_ipc(dev, false);
        data->calliope_state = CALLIOPE_DISABLED;
+       {
+         /* Ensure that ABOX Core is suspended
+            ABOX core can be waken up by spurious interrupt.
+          */
+               unsigned int val;
+               udelay(100);
+               exynos_pmu_read(ABOX_CPU_STANDBY, &val);
+               if (!(val & ABOX_CPU_STANDBY_WFI_MASK)) {
+                       dev_warn(dev, "calliope suspend time out during S2R\n");
+               }
+       }
        abox_log_drain_all(dev);
        abox_request_dram_on(pdev, dev, false);
        abox_save_register(data);