]> git.baikalelectronics.ru Git - uboot.git/commit
timer: mtk_timer: initialize the timer before use
authorWeijie Gao <weijie.gao@mediatek.com>
Tue, 12 Jan 2021 05:44:02 +0000 (13:44 +0800)
committerTom Rini <trini@konsulko.com>
Mon, 18 Jan 2021 20:23:06 +0000 (15:23 -0500)
commitf1b6772e6a282e08211dcb97520b007aca5d6d9e
tree8f124e249c4e52a70e8d4940c0f0099f65425b47
parentf65b91d00224e1213c79dfc427d7b642f1abb8be
timer: mtk_timer: initialize the timer before use

The timer being used by this driver may have already been used by first
stage bootloader (e.g. ATF/preloader), and it's settings may differ from
what this driver is going to use.

This may cause issues, such as inaccurate timer frequency due to
incorrect clock divider.

This patch adds the initialization code to avoid them.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
drivers/timer/mtk_timer.c