]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
soc: rockchip: power-domain: Fix wrong value when power up pd with writemask
authorFinley Xiao <finley.xiao@rock-chips.com>
Mon, 14 May 2018 03:29:38 +0000 (11:29 +0800)
committerHeiko Stuebner <heiko@sntech.de>
Mon, 14 May 2018 09:53:26 +0000 (11:53 +0200)
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 <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
drivers/soc/rockchip/pm_domains.c

index 53efc386b1ada8cf8821403aa0eb7a333535cd30..df7f30a425c6f3e032ce68ee25a73fb2f7dc4ba3 100644 (file)
@@ -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,