|
| 1 | +From 28a3cea6641607c7fd717516c38351d891d3e5cb Mon Sep 17 00:00:00 2001 |
| 2 | +From: Robert Marko < [email protected]> |
| 3 | +Date: Sun, 13 Mar 2022 13:01:55 +0100 |
| 4 | +Subject: [PATCH] clk: qcom: ipq8074: set BRANCH_HALT_DELAY flag for UBI clocks |
| 5 | + |
| 6 | +Currently, attempting to enable the UBI clocks will cause the stuck at |
| 7 | +off warning to be printed and clk_enable will fail. |
| 8 | + |
| 9 | +[ 14.936694] gcc_ubi1_ahb_clk status stuck at 'off' |
| 10 | + |
| 11 | +Downstream 5.4 QCA kernel has fixed this by seting the BRANCH_HALT_DELAY |
| 12 | +flag on UBI clocks, so lets do the same. |
| 13 | + |
| 14 | +Signed-off-by: Robert Marko < [email protected]> |
| 15 | +--- |
| 16 | + drivers/clk/qcom/gcc-ipq8074.c | 10 ++++++++++ |
| 17 | + 1 file changed, 10 insertions(+) |
| 18 | + |
| 19 | +diff --git a/drivers/clk/qcom/gcc-ipq8074.c b/drivers/clk/qcom/gcc-ipq8074.c |
| 20 | +index 6ece246f54a9..25859c4cdeea 100644 |
| 21 | +--- a/drivers/clk/qcom/gcc-ipq8074.c |
| 22 | ++++ b/drivers/clk/qcom/gcc-ipq8074.c |
| 23 | +@@ -3372,6 +3372,7 @@ static struct clk_branch gcc_nssnoc_ubi1_ahb_clk = { |
| 24 | + |
| 25 | + static struct clk_branch gcc_ubi0_ahb_clk = { |
| 26 | + .halt_reg = 0x6820c, |
| 27 | ++ .halt_check = BRANCH_HALT_DELAY, |
| 28 | + .clkr = { |
| 29 | + .enable_reg = 0x6820c, |
| 30 | + .enable_mask = BIT(0), |
| 31 | +@@ -3389,6 +3390,7 @@ static struct clk_branch gcc_ubi0_ahb_clk = { |
| 32 | + |
| 33 | + static struct clk_branch gcc_ubi0_axi_clk = { |
| 34 | + .halt_reg = 0x68200, |
| 35 | ++ .halt_check = BRANCH_HALT_DELAY, |
| 36 | + .clkr = { |
| 37 | + .enable_reg = 0x68200, |
| 38 | + .enable_mask = BIT(0), |
| 39 | +@@ -3406,6 +3408,7 @@ static struct clk_branch gcc_ubi0_axi_clk = { |
| 40 | + |
| 41 | + static struct clk_branch gcc_ubi0_nc_axi_clk = { |
| 42 | + .halt_reg = 0x68204, |
| 43 | ++ .halt_check = BRANCH_HALT_DELAY, |
| 44 | + .clkr = { |
| 45 | + .enable_reg = 0x68204, |
| 46 | + .enable_mask = BIT(0), |
| 47 | +@@ -3423,6 +3426,7 @@ static struct clk_branch gcc_ubi0_nc_axi_clk = { |
| 48 | + |
| 49 | + static struct clk_branch gcc_ubi0_core_clk = { |
| 50 | + .halt_reg = 0x68210, |
| 51 | ++ .halt_check = BRANCH_HALT_DELAY, |
| 52 | + .clkr = { |
| 53 | + .enable_reg = 0x68210, |
| 54 | + .enable_mask = BIT(0), |
| 55 | +@@ -3440,6 +3444,7 @@ static struct clk_branch gcc_ubi0_core_clk = { |
| 56 | + |
| 57 | + static struct clk_branch gcc_ubi0_mpt_clk = { |
| 58 | + .halt_reg = 0x68208, |
| 59 | ++ .halt_check = BRANCH_HALT_DELAY, |
| 60 | + .clkr = { |
| 61 | + .enable_reg = 0x68208, |
| 62 | + .enable_mask = BIT(0), |
| 63 | +@@ -3457,6 +3462,7 @@ static struct clk_branch gcc_ubi0_mpt_clk = { |
| 64 | + |
| 65 | + static struct clk_branch gcc_ubi1_ahb_clk = { |
| 66 | + .halt_reg = 0x6822c, |
| 67 | ++ .halt_check = BRANCH_HALT_DELAY, |
| 68 | + .clkr = { |
| 69 | + .enable_reg = 0x6822c, |
| 70 | + .enable_mask = BIT(0), |
| 71 | +@@ -3474,6 +3480,7 @@ static struct clk_branch gcc_ubi1_ahb_clk = { |
| 72 | + |
| 73 | + static struct clk_branch gcc_ubi1_axi_clk = { |
| 74 | + .halt_reg = 0x68220, |
| 75 | ++ .halt_check = BRANCH_HALT_DELAY, |
| 76 | + .clkr = { |
| 77 | + .enable_reg = 0x68220, |
| 78 | + .enable_mask = BIT(0), |
| 79 | +@@ -3491,6 +3498,7 @@ static struct clk_branch gcc_ubi1_axi_clk = { |
| 80 | + |
| 81 | + static struct clk_branch gcc_ubi1_nc_axi_clk = { |
| 82 | + .halt_reg = 0x68224, |
| 83 | ++ .halt_check = BRANCH_HALT_DELAY, |
| 84 | + .clkr = { |
| 85 | + .enable_reg = 0x68224, |
| 86 | + .enable_mask = BIT(0), |
| 87 | +@@ -3508,6 +3516,7 @@ static struct clk_branch gcc_ubi1_nc_axi_clk = { |
| 88 | + |
| 89 | + static struct clk_branch gcc_ubi1_core_clk = { |
| 90 | + .halt_reg = 0x68230, |
| 91 | ++ .halt_check = BRANCH_HALT_DELAY, |
| 92 | + .clkr = { |
| 93 | + .enable_reg = 0x68230, |
| 94 | + .enable_mask = BIT(0), |
| 95 | +@@ -3525,6 +3534,7 @@ static struct clk_branch gcc_ubi1_core_clk = { |
| 96 | + |
| 97 | + static struct clk_branch gcc_ubi1_mpt_clk = { |
| 98 | + .halt_reg = 0x68228, |
| 99 | ++ .halt_check = BRANCH_HALT_DELAY, |
| 100 | + .clkr = { |
| 101 | + .enable_reg = 0x68228, |
| 102 | + .enable_mask = BIT(0), |
| 103 | +-- |
| 104 | +2.35.1 |
| 105 | + |
0 commit comments