Skip to content

Commit

Permalink
ARM: EXYNOS: apply S5P_CENTRAL_SEQ_OPTION fix only when necessary
Browse files Browse the repository at this point in the history
Commit c2dd114 ("ARM: EXYNOS: fix register setup for AFTR mode
code") added S5P_CENTRAL_SEQ_OPTION register setup fix for all
Exynos SoCs to AFTR mode code-path.  It turned out that for coupled
cpuidle AFTR mode on Exynos4210 (added by the next patch) applying
this fix causes lockup so enable it in the AFTR mode code-path only
on SoCs that require it (in the suspend code-path it can be always
applied like it was before commit c2dd114 ("ARM: EXYNOS: fix
register setup for AFTR mode code")

Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Colin Cross <ccross@google.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
  • Loading branch information
Bartlomiej Zolnierkiewicz authored and Kukjin Kim committed Jan 29, 2015
1 parent 97bf6af commit 865e8b7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 7 additions & 4 deletions arch/arm/mach-exynos/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ void exynos_pm_central_suspend(void)
tmp = pmu_raw_readl(S5P_CENTRAL_SEQ_CONFIGURATION);
tmp &= ~S5P_CENTRAL_LOWPWR_CFG;
pmu_raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION);

/* Setting SEQ_OPTION register */
pmu_raw_writel(S5P_USE_STANDBY_WFI0 | S5P_USE_STANDBY_WFE0,
S5P_CENTRAL_SEQ_OPTION);
}

int exynos_pm_central_resume(void)
Expand Down Expand Up @@ -164,6 +160,13 @@ void exynos_enter_aftr(void)

exynos_pm_central_suspend();

if (of_machine_is_compatible("samsung,exynos4212") ||
of_machine_is_compatible("samsung,exynos4412")) {
/* Setting SEQ_OPTION register */
pmu_raw_writel(S5P_USE_STANDBY_WFI0 | S5P_USE_STANDBY_WFE0,
S5P_CENTRAL_SEQ_OPTION);
}

cpu_suspend(0, exynos_aftr_finisher);

if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) {
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/mach-exynos/suspend.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,10 @@ static int exynos_pm_suspend(void)
{
exynos_pm_central_suspend();

/* Setting SEQ_OPTION register */
pmu_raw_writel(S5P_USE_STANDBY_WFI0 | S5P_USE_STANDBY_WFE0,
S5P_CENTRAL_SEQ_OPTION);

if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9)
exynos_cpu_save_register();

Expand Down

0 comments on commit 865e8b7

Please sign in to comment.