diff options
author | Vasily Khoruzhick <anarsoul@gmail.com> | 2018-10-16 21:56:34 -0700 |
---|---|---|
committer | Jagan Teki <jagan@amarulasolutions.com> | 2018-10-24 21:57:05 +0530 |
commit | ce138cb4294b85975b0c3ac8cf9e15a181462c25 (patch) | |
tree | 6a3348ecaca7eb01a5e5dd6e8659284a17c247a9 /drivers/pwm/sunxi_pwm.c | |
parent | a877d4b1aef70bbae556e156e6802b7d917546ab (diff) | |
download | u-boot-ce138cb4294b85975b0c3ac8cf9e15a181462c25.tar.gz u-boot-ce138cb4294b85975b0c3ac8cf9e15a181462c25.tar.bz2 u-boot-ce138cb4294b85975b0c3ac8cf9e15a181462c25.zip |
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/sunxi_pwm.c')
-rw-r--r-- | drivers/pwm/sunxi_pwm.c | 2 |
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, ®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); |