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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Apr 2018 07:36:33 +0000 (09:36 +0200)
commitdc7a428ae26f7711be24c484b9b793853734b44a
treeb0cb7d4ad950d0a2964ce33ba1dbf76119a716aa
parentd8b6fdbe513d2f68d93dd07af4df1b65254408e1
clk: mediatek: fix PWM clock source by adding a fixed-factor clock

commit 89cd7aec21af26fd0c117bfc4bfc781724f201de upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clk/mediatek/clk-mt2701.c