Looks like old prescaler was used when configuring PWM, fix it.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
v &= ~SUNXI_PWM_CTRL_CLK_GATE;
writel(v, ®s->ctrl);
v &= ~SUNXI_PWM_CTRL_PRESCALE0_MASK;
- v |= (priv->prescaler & SUNXI_PWM_CTRL_PRESCALE0_MASK);
+ v |= (prescaler & SUNXI_PWM_CTRL_PRESCALE0_MASK);
writel(v, ®s->ctrl);
v |= SUNXI_PWM_CTRL_CLK_GATE;
writel(v, ®s->ctrl);