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: Kejia Hu <kejia.hu@codethink.co.uk>
Fixes: fce5430f6a ("reset: qcom-pon: Add support for gen2 pon")
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
Kejia Hu 2020-04-28 08:04:37 +01:00 committed by Sebastian Reichel
parent 164eaf6b43
commit fc5be29f9b

View File

@ -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");