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

soc: rockchip: power-domain: Fix wrong value when power up pd with writemask

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>

authored by

Finley Xiao and committed by
Heiko Stuebner
9e59c5f6 60cc43fc

+1 -1
+1 -1
drivers/soc/rockchip/pm_domains.c
··· 255 255 return; 256 256 else if (pd->info->pwr_w_mask) 257 257 regmap_write(pmu->regmap, pmu->info->pwr_offset, 258 - on ? pd->info->pwr_mask : 258 + on ? pd->info->pwr_w_mask : 259 259 (pd->info->pwr_mask | pd->info->pwr_w_mask)); 260 260 else 261 261 regmap_update_bits(pmu->regmap, pmu->info->pwr_offset,