summaryrefslogtreecommitdiff
path: root/target/linux/ipq806x/patches-5.10/097-3-clk-qcom-krait-add-missing-enable-disable.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ipq806x/patches-5.10/097-3-clk-qcom-krait-add-missing-enable-disable.patch')
-rw-r--r--target/linux/ipq806x/patches-5.10/097-3-clk-qcom-krait-add-missing-enable-disable.patch57
1 files changed, 0 insertions, 57 deletions
diff --git a/target/linux/ipq806x/patches-5.10/097-3-clk-qcom-krait-add-missing-enable-disable.patch b/target/linux/ipq806x/patches-5.10/097-3-clk-qcom-krait-add-missing-enable-disable.patch
deleted file mode 100644
index 78068f359c..0000000000
--- a/target/linux/ipq806x/patches-5.10/097-3-clk-qcom-krait-add-missing-enable-disable.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From f8fdbecdaca97f0f2eebd77256e2eca4a8da6c39 Mon Sep 17 00:00:00 2001
-From: Ansuel Smith <ansuelsmth@gmail.com>
-Date: Sun, 7 Feb 2021 17:08:16 +0100
-Subject: [PATCH 3/4] clk: qcom: krait: add missing enable disable
-
-Add missing enable disable mux function. Add extra check to
-div2_round_rate.
-
-Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
----
- drivers/clk/qcom/clk-krait.c | 27 +++++++++++++++++++++++++--
- 1 file changed, 25 insertions(+), 2 deletions(-)
-
---- a/drivers/clk/qcom/clk-krait.c
-+++ b/drivers/clk/qcom/clk-krait.c
-@@ -73,7 +73,25 @@ static u8 krait_mux_get_parent(struct cl
- return clk_mux_val_to_index(hw, mux->parent_map, 0, sel);
- }
-
-+static int krait_mux_enable(struct clk_hw *hw)
-+{
-+ struct krait_mux_clk *mux = to_krait_mux_clk(hw);
-+
-+ __krait_mux_set_sel(mux, mux->en_mask);
-+
-+ return 0;
-+}
-+
-+static void krait_mux_disable(struct clk_hw *hw)
-+{
-+ struct krait_mux_clk *mux = to_krait_mux_clk(hw);
-+
-+ __krait_mux_set_sel(mux, mux->safe_sel);
-+}
-+
- const struct clk_ops krait_mux_clk_ops = {
-+ .enable = krait_mux_enable,
-+ .disable = krait_mux_disable,
- .set_parent = krait_mux_set_parent,
- .get_parent = krait_mux_get_parent,
- .determine_rate = __clk_mux_determine_rate_closest,
-@@ -84,8 +102,13 @@ EXPORT_SYMBOL_GPL(krait_mux_clk_ops);
- 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), rate * 2);
-- return DIV_ROUND_UP(*parent_rate, 2);
-+ struct clk_hw *hw_parent = clk_hw_get_parent(hw);
-+
-+ if (hw_parent) {
-+ *parent_rate = clk_hw_round_rate(hw_parent, rate * 2);
-+ return DIV_ROUND_UP(*parent_rate, 2);
-+ } else
-+ return -1;
- }
-
- static int krait_div2_set_rate(struct clk_hw *hw, unsigned long rate,