clk: mediatek: Add new clkmux register API
authorOwen Chen <owen.chen@mediatek.com>
Tue, 5 Mar 2019 05:05:39 +0000 (13:05 +0800)
committerStephen Boyd <sboyd@kernel.org>
Thu, 11 Apr 2019 20:12:40 +0000 (13:12 -0700)
commita3ae549917f1634f85c62984617521801505eb1e
tree7066835deb691fe6f0ed6a83fd1f2ed00188e766
parentbe17ca6ac76a5cfd07cc3a0397dd05d6929fcbbb
clk: mediatek: Add new clkmux register API

On both MT8183 & MT6765, there add "set/clr" register for
each clkmux setting, and one update register to trigger value change.
It is designed to prevent read-modify-write racing issue.
The sw design need to add a new API to handle this hw change with
a new mtk_clk_mux/mtk_mux struct in new file "clk-mux.c", "clk-mux.h".

Signed-off-by: Owen Chen <owen.chen@mediatek.com>
Signed-off-by: Weiyi Lu <weiyi.lu@mediatek.com>
Reviewed-by: James Liao <jamesjj.liao@mediatek.com>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
[sboyd@kernel.org: Squash in flags=0 to silence warning]
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/mediatek/Makefile
drivers/clk/mediatek/clk-mux.c [new file with mode: 0644]
drivers/clk/mediatek/clk-mux.h [new file with mode: 0644]