diff options
author | Pavel Kubelun <be.dissent@gmail.com> | 2016-11-02 22:08:45 +0300 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2016-11-03 08:28:16 +0100 |
commit | 8749fb7894601011811dd7409b48401b3aafe0dd (patch) | |
tree | 14ab1fbcfdd5ccb09b694e474f1eb701559573a4 /target/linux/ipq806x/patches-4.4/140-clk-qcom-Add-support-for-Krait-clocks.patch | |
parent | bf7166e54569266a7d7525742f3216b4e3064825 (diff) | |
download | mtk-20170518-8749fb7894601011811dd7409b48401b3aafe0dd.zip mtk-20170518-8749fb7894601011811dd7409b48401b3aafe0dd.tar.gz mtk-20170518-8749fb7894601011811dd7409b48401b3aafe0dd.tar.bz2 |
ipq806x: update clk-qcom patches
Preparing for cpufreq driver switch to generic cpufreq-dt
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Diffstat (limited to 'target/linux/ipq806x/patches-4.4/140-clk-qcom-Add-support-for-Krait-clocks.patch')
-rw-r--r-- | target/linux/ipq806x/patches-4.4/140-clk-qcom-Add-support-for-Krait-clocks.patch | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/target/linux/ipq806x/patches-4.4/140-clk-qcom-Add-support-for-Krait-clocks.patch b/target/linux/ipq806x/patches-4.4/140-clk-qcom-Add-support-for-Krait-clocks.patch index ecf1ef5..b1720b0 100644 --- a/target/linux/ipq806x/patches-4.4/140-clk-qcom-Add-support-for-Krait-clocks.patch +++ b/target/linux/ipq806x/patches-4.4/140-clk-qcom-Add-support-for-Krait-clocks.patch @@ -50,7 +50,7 @@ drivers/clk/qcom/Kconfig | 4 ++ clk-qcom-$(CONFIG_QCOM_GDSC) += gdsc.o --- /dev/null +++ b/drivers/clk/qcom/clk-krait.c -@@ -0,0 +1,166 @@ +@@ -0,0 +1,167 @@ +/* + * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. + * @@ -128,18 +128,19 @@ drivers/clk/qcom/Kconfig | 4 ++ + return clk_mux_get_parent(hw, sel, mux->parent_map, 0); +} + -+static struct clk_hw *krait_mux_get_safe_parent(struct clk_hw *hw) ++static struct clk_hw *krait_mux_get_safe_parent(struct clk_hw *hw, ++ unsigned long *safe_freq) +{ + int i; + struct krait_mux_clk *mux = to_krait_mux_clk(hw); -+ int num_parents = clk_hw_get_num_parents(hw->clk); ++ int num_parents = clk_hw_get_num_parents(hw); + + i = mux->safe_sel; + for (i = 0; i < num_parents; i++) + if (mux->safe_sel == mux->parent_map[i]) + break; + -+ return __clk_get_hw(clk_hw_get_parent_by_index(hw->clk, i)); ++ return clk_hw_get_parent_by_index(hw, i); +} + +static int krait_mux_enable(struct clk_hw *hw) @@ -172,7 +173,7 @@ drivers/clk/qcom/Kconfig | 4 ++ +static long krait_div2_round_rate(struct clk_hw *hw, unsigned long rate, + unsigned long *parent_rate) +{ -+ *parent_rate = clk_hw_round_rate(clk_hw_get_parent(hw->clk), rate * 2); ++ *parent_rate = clk_hw_round_rate(clk_hw_get_parent(hw), rate * 2); + return DIV_ROUND_UP(*parent_rate, 2); +} + |