提交 58d3d5e7 编写于 作者: J Justin Chen 提交者: Alexandre Belloni

rtc: brcmstb-waketimer: Set wktmr prescaler

The HW default is one tick per second, however instead of assuming this,
lets make sure the waketimer is actually one tick per second before
arming the alarm.
Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NJustin Chen <justinpopo6@gmail.com>
Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com>
上级 f18046c5
...@@ -60,6 +60,9 @@ static void brcmstb_waketmr_set_alarm(struct brcmstb_waketmr *timer, ...@@ -60,6 +60,9 @@ static void brcmstb_waketmr_set_alarm(struct brcmstb_waketmr *timer,
{ {
brcmstb_waketmr_clear_alarm(timer); brcmstb_waketmr_clear_alarm(timer);
/* Make sure we are actually counting in seconds */
writel_relaxed(timer->rate, timer->base + BRCMSTB_WKTMR_PRESCALER);
writel_relaxed(secs + 1, timer->base + BRCMSTB_WKTMR_ALARM); writel_relaxed(secs + 1, timer->base + BRCMSTB_WKTMR_ALARM);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册