From: Vasily Khoruzhick Date: Wed, 17 Oct 2018 04:56:34 +0000 (-0700) Subject: pwm: sunxi: use new prescaler when configuring PWM X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=ce138cb4294b85975b0c3ac8cf9e15a181462c25;p=u-boot.git pwm: sunxi: use new prescaler when configuring PWM Looks like old prescaler was used when configuring PWM, fix it. Signed-off-by: Vasily Khoruzhick Acked-by: Maxime Ripard Reviewed-by: Jagan Teki --- diff --git a/drivers/pwm/sunxi_pwm.c b/drivers/pwm/sunxi_pwm.c index baee503730..6284409b4f 100644 --- a/drivers/pwm/sunxi_pwm.c +++ b/drivers/pwm/sunxi_pwm.c @@ -97,7 +97,7 @@ static int sunxi_pwm_set_config(struct udevice *dev, uint channel, 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);