clk: mediatek: fix PWM clock source by adding a fixed-factor clock
authorSean Wang <sean.wang@mediatek.com>
Thu, 1 Mar 2018 03:27:51 +0000 (11:27 +0800)
committerStephen Boyd <sboyd@kernel.org>
Mon, 19 Mar 2018 20:25:30 +0000 (13:25 -0700)
commit89cd7aec21af26fd0c117bfc4bfc781724f201de
tree2e3eea097df5ae00cd2a1e4bd14252702dcf1673
parent55a5fcafe3a94e8a0777bb993d09107d362258d2
clk: mediatek: fix PWM clock source by adding a fixed-factor clock

The clock for which all PWM devices on MT7623 or MT2701 actually depending
on has to be divided by four from its parent clock axi_sel in the clock
path prior to PWM devices.

Consequently, adding a fixed-factor clock axisel_d4 as one-fourth of
clock axi_sel allows that PWM devices can have the correct resolution
calculation.

Cc: stable@vger.kernel.org
Fixes: e9862118272a ("clk: mediatek: Add MT2701 clock support")
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/mediatek/clk-mt2701.c