3d55cb421a1ec8ff284a14d63968df39b02fe1c6
[openwrt/openwrt.git] / target / linux / ipq806x / patches-5.15 / 100-v5.18-08-linux-next-clk-qcom-gcc-ipq806x-add-unusued-flag-for-critical-c.patch
1 From 28aa450d38e521de45be951df052d2c49a17fae2 Mon Sep 17 00:00:00 2001
2 From: Ansuel Smith <ansuelsmth@gmail.com>
3 Date: Sat, 26 Feb 2022 14:52:28 +0100
4 Subject: [PATCH 08/14] clk: qcom: gcc-ipq806x: add unusued flag for critical
5 clock
6
7 Some clocks are used by other devices present on the SoC. For example
8 the gsbi4_h_clk is used by RPM and is if disabled cause the RPM to
9 reject any regulator change command. These clock should never be
10 disabled.
11
12 Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
13 Tested-by: Jonathan McDowell <noodles@earth.li>
14 Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
15 Link: https://lore.kernel.org/r/20220226135235.10051-9-ansuelsmth@gmail.com
16 ---
17 drivers/clk/qcom/gcc-ipq806x.c | 9 +++++----
18 1 file changed, 5 insertions(+), 4 deletions(-)
19
20 --- a/drivers/clk/qcom/gcc-ipq806x.c
21 +++ b/drivers/clk/qcom/gcc-ipq806x.c
22 @@ -798,7 +798,7 @@ static struct clk_rcg gsbi4_qup_src = {
23 .parent_data = gcc_pxo_pll8,
24 .num_parents = ARRAY_SIZE(gcc_pxo_pll8),
25 .ops = &clk_rcg_ops,
26 - .flags = CLK_SET_PARENT_GATE,
27 + .flags = CLK_SET_PARENT_GATE | CLK_IGNORE_UNUSED,
28 },
29 },
30 };
31 @@ -816,7 +816,7 @@ static struct clk_branch gsbi4_qup_clk =
32 },
33 .num_parents = 1,
34 .ops = &clk_branch_ops,
35 - .flags = CLK_SET_RATE_PARENT,
36 + .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
37 },
38 },
39 };
40 @@ -900,7 +900,7 @@ static struct clk_rcg gsbi6_qup_src = {
41 .parent_data = gcc_pxo_pll8,
42 .num_parents = ARRAY_SIZE(gcc_pxo_pll8),
43 .ops = &clk_rcg_ops,
44 - .flags = CLK_SET_PARENT_GATE,
45 + .flags = CLK_SET_PARENT_GATE | CLK_IGNORE_UNUSED,
46 },
47 },
48 };
49 @@ -969,7 +969,7 @@ static struct clk_branch gsbi7_qup_clk =
50 },
51 .num_parents = 1,
52 .ops = &clk_branch_ops,
53 - .flags = CLK_SET_RATE_PARENT,
54 + .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
55 },
56 },
57 };
58 @@ -1015,6 +1015,7 @@ static struct clk_branch gsbi4_h_clk = {
59 .hw.init = &(struct clk_init_data){
60 .name = "gsbi4_h_clk",
61 .ops = &clk_branch_ops,
62 + .flags = CLK_IGNORE_UNUSED,
63 },
64 },
65 };