From ce138cb4294b85975b0c3ac8cf9e15a181462c25 Mon Sep 17 00:00:00 2001 From: Vasily Khoruzhick Date: Tue, 16 Oct 2018 21:56:34 -0700 Subject: [PATCH] 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 --- drivers/pwm/sunxi_pwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.5