Commit ce138cb4 authored by Vasily Khoruzhick's avatar Vasily Khoruzhick Committed by Jagan Teki

pwm: sunxi: use new prescaler when configuring PWM

Looks like old prescaler was used when configuring PWM, fix it.
Signed-off-by: default avatarVasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Maxime Ripard's avatarMaxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: default avatarJagan Teki <jagan@openedev.com>
parent a877d4b1
......@@ -97,7 +97,7 @@ static int sunxi_pwm_set_config(struct udevice *dev, uint channel,
v &= ~SUNXI_PWM_CTRL_CLK_GATE;
writel(v, &regs->ctrl);
v &= ~SUNXI_PWM_CTRL_PRESCALE0_MASK;
v |= (priv->prescaler & SUNXI_PWM_CTRL_PRESCALE0_MASK);
v |= (prescaler & SUNXI_PWM_CTRL_PRESCALE0_MASK);
writel(v, &regs->ctrl);
v |= SUNXI_PWM_CTRL_CLK_GATE;
writel(v, &regs->ctrl);
......
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