ARM: exynos: Fix boot with CONFIG_SUSPEND disabled 47/213547/1
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 6 Sep 2019 11:43:57 +0000 (13:43 +0200)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 6 Sep 2019 11:44:31 +0000 (13:44 +0200)
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 <sw0312.kim@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ic9dc37b18b63827b612fbc91e0f84509d4e8723b

arch/arm/mach-exynos/exynos.c
arch/arm/mach-exynos/suspend.c

index 1067d2f5425f236ee6b74a8cb32018ea16b8612d..2026be578e4a107433059828ae8a677d018a9be4 100644 (file)
@@ -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*/ },
 };
 
index 49bb92152fc36d96282ed77148a7c88b86c519ae..ae5a67d7bfed2d09b9cb92e2f9395047294a1274 100644 (file)
@@ -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