#include <linux/dma/dma-pl330.h>
+#ifdef CONFIG_ARM64_EXYNOS_CPUIDLE
+#include <soc/samsung/exynos-powermode.h>
+#endif
#ifdef CONFIG_CPU_IDLE
#include <soc/samsung/exynos-pm.h>
#include <soc/samsung/exynos-cpupm.h>
sdd->is_probed = 0;
sdd->ops = NULL;
+#ifdef CONFIG_ARM64_EXYNOS_CPUIDLE
sdd->idle_ip_index = exynos_get_idle_ip_index(dev_name(&pdev->dev));
+#endif
if (pdev->dev.of_node) {
ret = of_alias_get_id(pdev->dev.of_node, "spi");
}
}
#else
+#ifdef CONFIG_ARM64_EXYNOS_CPUIDLE
exynos_update_ip_idle_status(sdd->idle_ip_index, 0);
+#endif
if (clk_prepare_enable(sdd->clk)) {
dev_err(&pdev->dev, "Couldn't enable clock 'spi'\n");
clk_disable_unprepare(sdd->clk);
+#ifdef CONFIG_ARM64_EXYNOS_CPUIDLE
exynos_update_ip_idle_status(sdd->idle_ip_index, 1);
+#endif
platform_set_drvdata(pdev, NULL);
spi_master_put(master);
if (__clk_get_enable_count(sdd->src_clk))
clk_disable_unprepare(sdd->src_clk);
+#ifdef CONFIG_ARM64_EXYNOS_CPUIDLE
exynos_update_ip_idle_status(sdd->idle_ip_index, 1);
+#endif
/* Free DMA channels */
if (sci->dma_mode == DMA_MODE && sdd->is_probed && sdd->ops != NULL) {
}
if (sci->domain == DOMAIN_TOP) {
+#ifdef CONFIG_ARM64_EXYNOS_CPUIDLE
exynos_update_ip_idle_status(sdd->idle_ip_index, 0);
+#endif
clk_prepare_enable(sdd->src_clk);
clk_prepare_enable(sdd->clk);
}
#if defined(CONFIG_VIDEO_EXYNOS_FIMC_IS) || defined(CONFIG_VIDEO_EXYNOS_FIMC_IS2)
else if (sci->domain == DOMAIN_CAM1 || sci->domain == DOMAIN_ISP) {
+#ifdef CONFIG_ARM64_EXYNOS_CPUIDLE
exynos_update_ip_idle_status(sdd->idle_ip_index, 0);
+#endif
clk_prepare_enable(sdd->src_clk);
clk_prepare_enable(sdd->clk);
/* Disable the clock */
clk_disable_unprepare(sdd->src_clk);
clk_disable_unprepare(sdd->clk);
+#ifdef CONFIG_ARM64_EXYNOS_CPUIDLE
exynos_update_ip_idle_status(sdd->idle_ip_index, 1);
+#endif
}
#endif
if (!pm_runtime_status_suspended(dev))
if (sci->domain == DOMAIN_TOP) {
/* Enable the clock */
+#ifdef CONFIG_ARM64_EXYNOS_CPUIDLE
exynos_update_ip_idle_status(sdd->idle_ip_index, 0);
+#endif
clk_prepare_enable(sdd->src_clk);
clk_prepare_enable(sdd->clk);
/* Disable the clock */
clk_disable_unprepare(sdd->src_clk);
clk_disable_unprepare(sdd->clk);
+#ifdef CONFIG_ARM64_EXYNOS_CPUIDLE
exynos_update_ip_idle_status(sdd->idle_ip_index, 1);
+#endif
#endif
}