]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
pwm: sunxi: use new prescaler when configuring PWM
authorVasily Khoruzhick <anarsoul@gmail.com>
Wed, 17 Oct 2018 04:56:34 +0000 (21:56 -0700)
committerJagan Teki <jagan@amarulasolutions.com>
Wed, 24 Oct 2018 16:27:05 +0000 (21:57 +0530)
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>
drivers/pwm/sunxi_pwm.c

index baee503730672558662de07e9980af629ab2df74..6284409b4fdaa04c9915d424b5970ca0a14157a7 100644 (file)
@@ -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);