Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pmdomain: samsung: Rework legacy splash-screen handover workaround

Limit the workaround for the lack of the proper splash-screen handover
handling to the legacy ARM 32bit systems and replace forcing a sync_state
by explicite power domain shutdown. This approach lets compiler to
optimize it out on newer ARM 64bit systems.

Suggested-by: Ulf Hansson <ulf.hansson@linaro.org>
Fixes: 0745658aebbe ("pmdomain: samsung: Fix splash-screen handover by enforcing a sync_state")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Marek Szyprowski and committed by
Ulf Hansson
fccac54b 7458f72c

+9 -9
+9 -9
drivers/pmdomain/samsung/exynos-pm-domains.c
··· 128 128 pd->pd.power_on = exynos_pd_power_on; 129 129 pd->local_pwr_cfg = pm_domain_cfg->local_pwr_cfg; 130 130 131 + /* 132 + * Some Samsung platforms with bootloaders turning on the splash-screen 133 + * and handing it over to the kernel, requires the power-domains to be 134 + * reset during boot. 135 + */ 136 + if (IS_ENABLED(CONFIG_ARM) && 137 + of_device_is_compatible(np, "samsung,exynos4210-pd")) 138 + exynos_pd_power_off(&pd->pd); 139 + 131 140 on = readl_relaxed(pd->base + 0x4) & pd->local_pwr_cfg; 132 141 133 142 pm_genpd_init(&pd->pd, NULL, !on); ··· 154 145 pr_info("%pOF has as child subdomain: %pOF.\n", 155 146 parent.np, child.np); 156 147 } 157 - 158 - /* 159 - * Some Samsung platforms with bootloaders turning on the splash-screen 160 - * and handing it over to the kernel, requires the power-domains to be 161 - * reset during boot. As a temporary hack to manage this, let's enforce 162 - * a sync_state. 163 - */ 164 - if (!ret) 165 - of_genpd_sync_state(np); 166 148 167 149 pm_runtime_enable(dev); 168 150 return ret;