From 46247a9428026c731d387344e96d0d14058d3bd8 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Fri, 6 Sep 2019 13:43:57 +0200 Subject: [PATCH] ARM: exynos: Fix boot with CONFIG_SUSPEND disabled Exynos SMP code relies on PMU registers to be mapped via pmu_base_addr. Those mapping is done in suspend.c:exynos_pmu_irq_init(), which is not called if CONFIG_SUSPEND is disabled. Fix this by moving PMU mapping creation to exynos.c:exynos_map_pmu(), which is called in all cases. Reported-by: Seung-Woo Kim Signed-off-by: Marek Szyprowski Change-Id: Ic9dc37b18b63827b612fbc91e0f84509d4e8723b --- arch/arm/mach-exynos/exynos.c | 11 +++++++---- arch/arm/mach-exynos/suspend.c | 12 +----------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 1067d2f..2026be5 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -129,13 +129,16 @@ void exynos_set_delayed_reset_assertion(bool enable) } /* - * Apparently, these SoCs are not able to wake-up from suspend using - * the PMU. Too bad. Should they suddenly become capable of such a - * feat, the matches below should be moved to suspend.c. + * Map PMU registers for smp code */ static const struct of_device_id exynos_dt_pmu_match[] = { - { .compatible = "samsung,exynos5260-pmu" }, + { .compatible = "samsung,exynos3250-pmu" }, + { .compatible = "samsung,exynos4210-pmu" }, + { .compatible = "samsung,exynos4412-pmu" }, { .compatible = "samsung,exynos5410-pmu" }, + { .compatible = "samsung,exynos5250-pmu" }, + { .compatible = "samsung,exynos5260-pmu" }, + { .compatible = "samsung,exynos5420-pmu" }, { /*sentinel*/ }, }; diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c index 49bb921..ae5a67d 100644 --- a/arch/arm/mach-exynos/suspend.c +++ b/arch/arm/mach-exynos/suspend.c @@ -208,21 +208,11 @@ static int __init exynos_pmu_irq_init(struct device_node *node, return -ENXIO; } - pmu_base_addr = of_iomap(node, 0); - - if (!pmu_base_addr) { - pr_err("%pOF: failed to find exynos pmu register\n", node); - return -ENOMEM; - } - domain = irq_domain_add_hierarchy(parent_domain, 0, 0, node, &exynos_pmu_domain_ops, NULL); - if (!domain) { - iounmap(pmu_base_addr); - pmu_base_addr = NULL; + if (!domain) return -ENOMEM; - } /* * Clear the OF_POPULATED flag set in of_irq_init so that -- 2.7.4