From: Finley Xiao Date: Mon, 14 May 2018 03:29:38 +0000 (+0800) Subject: soc: rockchip: power-domain: Fix wrong value when power up pd with writemask X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=971a55574b4789c64d43c6d34f5549c337567731;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git soc: rockchip: power-domain: Fix wrong value when power up pd with writemask commit 9e59c5f66c624b43c766a9fe3b2430e0e976bf0e upstream. Solve the pd could only ever turn off but never turn them on again, if the pd registers have the writemask bits. So far this affects the rk3328 only. Fixes: 79bb17ce8edb ("soc: rockchip: power-domain: Support domain control in hiword-registers") Cc: stable@vger.kernel.org Signed-off-by: Finley Xiao Signed-off-by: Elaine Zhang Reviewed-by: Ulf Hansson Signed-off-by: Heiko Stuebner Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c index 40b75748835f..ba009bb9d82b 100644 --- a/drivers/soc/rockchip/pm_domains.c +++ b/drivers/soc/rockchip/pm_domains.c @@ -255,7 +255,7 @@ static void rockchip_do_pmu_set_power_domain(struct rockchip_pm_domain *pd, return; else if (pd->info->pwr_w_mask) regmap_write(pmu->regmap, pmu->info->pwr_offset, - on ? pd->info->pwr_mask : + on ? pd->info->pwr_w_mask : (pd->info->pwr_mask | pd->info->pwr_w_mask)); else regmap_update_bits(pmu->regmap, pmu->info->pwr_offset,