Commit fc5be29f authored by Kejia Hu's avatar Kejia Hu Committed by Sebastian Reichel

power: reset: qcom-pon: reg write mask depends on pon generation

Instead of hardcode the mask, it should be depends
on which generation of pon it was.
Signed-off-by: default avatarKejia Hu <kejia.hu@codethink.co.uk>
Fixes: fce5430f ("reset: qcom-pon: Add support for gen2 pon")
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 164eaf6b
......@@ -34,7 +34,8 @@ static int pm8916_reboot_mode_write(struct reboot_mode_driver *reboot,
ret = regmap_update_bits(pon->regmap,
pon->baseaddr + PON_SOFT_RB_SPARE,
0xfc, magic << pon->reason_shift);
GENMASK(7, pon->reason_shift),
magic << pon->reason_shift);
if (ret < 0)
dev_err(pon->dev, "update reboot mode bits failed\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment