summaryrefslogtreecommitdiff
path: root/drivers/pwm
diff options
context:
space:
mode:
authorVasily Khoruzhick <anarsoul@gmail.com>2018-10-16 21:56:34 -0700
committerJagan Teki <jagan@amarulasolutions.com>2018-10-24 21:57:05 +0530
commitce138cb4294b85975b0c3ac8cf9e15a181462c25 (patch)
tree6a3348ecaca7eb01a5e5dd6e8659284a17c247a9 /drivers/pwm
parenta877d4b1aef70bbae556e156e6802b7d917546ab (diff)
downloadu-boot-ce138cb4294b85975b0c3ac8cf9e15a181462c25.tar.gz
pwm: sunxi: use new prescaler when configuring PWM
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>
Diffstat (limited to 'drivers/pwm')
-rw-r--r--drivers/pwm/sunxi_pwm.c2
1 files changed, 1 insertions, 1 deletions
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, &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);