static void exynos_pm_prepare(void) { exynos_set_delayed_reset_assertion(false); /* Set wake-up mask registers */ exynos_pm_set_wakeup_mask(); exynos_pm_enter_sleep_mode(); /* ensure at least INFORM0 has the resume address */ pmu_raw_writel(virt_to_phys(exynos_cpu_resume), S5P_INFORM0); }
static void exynos3250_pm_prepare(void) { unsigned int tmp; /* Set wake-up mask registers */ exynos_pm_set_wakeup_mask(); tmp = pmu_raw_readl(EXYNOS3_ARM_L2_OPTION); tmp &= ~EXYNOS5_OPTION_USE_RETENTION; pmu_raw_writel(tmp, EXYNOS3_ARM_L2_OPTION); exynos_pm_enter_sleep_mode(); /* ensure at least INFORM0 has the resume address */ pmu_raw_writel(virt_to_phys(exynos_cpu_resume), S5P_INFORM0); }
static void exynos5420_pm_prepare(void) { unsigned int tmp; /* Set wake-up mask registers */ exynos_pm_set_wakeup_mask(); s3c_pm_do_save(exynos_core_save, ARRAY_SIZE(exynos_core_save)); exynos_pmu_spare3 = pmu_raw_readl(S5P_PMU_SPARE3); /* * The cpu state needs to be saved and restored so that the * secondary CPUs will enter low power start. Though the U-Boot * is setting the cpu state with low power flag, the kernel * needs to restore it back in case, the primary cpu fails to * suspend for any reason. */ exynos5420_cpu_state = __raw_readl(sysram_base_addr + EXYNOS5420_CPU_STATE); exynos_pm_enter_sleep_mode(); /* ensure at least INFORM0 has the resume address */ if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM)) pmu_raw_writel(virt_to_phys(mcpm_entry_point), S5P_INFORM0); tmp = pmu_raw_readl(EXYNOS5_ARM_L2_OPTION); tmp &= ~EXYNOS5_USE_RETENTION; pmu_raw_writel(tmp, EXYNOS5_ARM_L2_OPTION); tmp = pmu_raw_readl(EXYNOS5420_SFR_AXI_CGDIS1); tmp |= EXYNOS5420_UFS; pmu_raw_writel(tmp, EXYNOS5420_SFR_AXI_CGDIS1); tmp = pmu_raw_readl(EXYNOS5420_ARM_COMMON_OPTION); tmp &= ~EXYNOS5420_L2RSTDISABLE_VALUE; pmu_raw_writel(tmp, EXYNOS5420_ARM_COMMON_OPTION); tmp = pmu_raw_readl(EXYNOS5420_FSYS2_OPTION); tmp |= EXYNOS5420_EMULATION; pmu_raw_writel(tmp, EXYNOS5420_FSYS2_OPTION); tmp = pmu_raw_readl(EXYNOS5420_PSGEN_OPTION); tmp |= EXYNOS5420_EMULATION; pmu_raw_writel(tmp, EXYNOS5420_PSGEN_OPTION); }
static void exynos_pm_prepare(void) { exynos_set_delayed_reset_assertion(false); /* Set wake-up mask registers */ exynos_pm_set_wakeup_mask(); s3c_pm_do_save(exynos_core_save, ARRAY_SIZE(exynos_core_save)); if (pm_data->extra_save) s3c_pm_do_save(pm_data->extra_save, pm_data->num_extra_save); exynos_pm_enter_sleep_mode(); /* ensure at least INFORM0 has the resume address */ pmu_raw_writel(virt_to_phys(exynos_cpu_resume), S5P_INFORM0); }