[RAMEN9610-14220] asoc: samsung: add checking for SYSMMU status in suspend
authorHyunwoong Kim <khw0178.kim@samsung.com>
Fri, 5 Apr 2019 08:48:18 +0000 (17:48 +0900)
committerhskang <hs1218.kang@samsung.com>
Sat, 6 Apr 2019 08:55:49 +0000 (17:55 +0900)
Change-Id: Ibe0e27bd882f4d31607a291f3915f6c95bcd7404
Signed-off-by: Hyunwoong Kim <khw0178.kim@samsung.com>
sound/soc/samsung/abox/abox.c

index c05db3a8d06bf16fdf0a33af91b27139e5c2f974..78ff15bfb7d26d661da113022b24f3c991d9711c 100644 (file)
@@ -5629,6 +5629,19 @@ static int abox_disable(struct device *dev)
        return 0;
 }
 
+void abox_check_sysmmu_status(struct device *dev)
+{
+       void __iomem *sysmmu_sfr;
+       unsigned int sysmmu_status;
+
+       sysmmu_sfr = ioremap(0x14920000, SZ_4K);
+       sysmmu_status = readl(sysmmu_sfr + 0x8);
+       if (sysmmu_status & 0x1E)
+               dev_warn(dev, "SYSMMU transaction is pending\n");
+       dev_info(dev, "SYSMMU_STATUS = [%08x]\n", sysmmu_status);
+       iounmap(sysmmu_sfr);
+}
+
 void abox_poweroff(void)
 {
        struct platform_device *pdev = p_abox_data->pdev;
@@ -5643,6 +5656,8 @@ void abox_poweroff(void)
 
        abox_disable(dev);
 
+       abox_check_sysmmu_status(dev);
+
        exynos_sysmmu_control(dev, false);
 }