clk: qcom: ipq8074: set BRANCH_HALT_DELAY flag for UBI clocks
authorRobert Marko <robimarko@gmail.com>
Sun, 15 May 2022 21:00:43 +0000 (23:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:47 +0000 (14:23 +0200)
[ Upstream commit 2bd357e698207e2e65db03007e4be65bf9d6a7b3 ]

Currently, attempting to enable the UBI clocks will cause the stuck at
off warning to be printed and clk_enable will fail.

[   14.936694] gcc_ubi1_ahb_clk status stuck at 'off'

Downstream 5.4 QCA kernel has fixed this by seting the BRANCH_HALT_DELAY
flag on UBI clocks, so lets do the same.

Fixes: 5736294aef83 ("clk: qcom: ipq8074: add NSS clocks")
Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220515210048.483898-6-robimarko@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/qcom/gcc-ipq8074.c

index f1017f2..2c2ecfc 100644 (file)
@@ -3354,6 +3354,7 @@ static struct clk_branch gcc_nssnoc_ubi1_ahb_clk = {
 
 static struct clk_branch gcc_ubi0_ahb_clk = {
        .halt_reg = 0x6820c,
+       .halt_check = BRANCH_HALT_DELAY,
        .clkr = {
                .enable_reg = 0x6820c,
                .enable_mask = BIT(0),
@@ -3371,6 +3372,7 @@ static struct clk_branch gcc_ubi0_ahb_clk = {
 
 static struct clk_branch gcc_ubi0_axi_clk = {
        .halt_reg = 0x68200,
+       .halt_check = BRANCH_HALT_DELAY,
        .clkr = {
                .enable_reg = 0x68200,
                .enable_mask = BIT(0),
@@ -3388,6 +3390,7 @@ static struct clk_branch gcc_ubi0_axi_clk = {
 
 static struct clk_branch gcc_ubi0_nc_axi_clk = {
        .halt_reg = 0x68204,
+       .halt_check = BRANCH_HALT_DELAY,
        .clkr = {
                .enable_reg = 0x68204,
                .enable_mask = BIT(0),
@@ -3405,6 +3408,7 @@ static struct clk_branch gcc_ubi0_nc_axi_clk = {
 
 static struct clk_branch gcc_ubi0_core_clk = {
        .halt_reg = 0x68210,
+       .halt_check = BRANCH_HALT_DELAY,
        .clkr = {
                .enable_reg = 0x68210,
                .enable_mask = BIT(0),
@@ -3422,6 +3426,7 @@ static struct clk_branch gcc_ubi0_core_clk = {
 
 static struct clk_branch gcc_ubi0_mpt_clk = {
        .halt_reg = 0x68208,
+       .halt_check = BRANCH_HALT_DELAY,
        .clkr = {
                .enable_reg = 0x68208,
                .enable_mask = BIT(0),
@@ -3439,6 +3444,7 @@ static struct clk_branch gcc_ubi0_mpt_clk = {
 
 static struct clk_branch gcc_ubi1_ahb_clk = {
        .halt_reg = 0x6822c,
+       .halt_check = BRANCH_HALT_DELAY,
        .clkr = {
                .enable_reg = 0x6822c,
                .enable_mask = BIT(0),
@@ -3456,6 +3462,7 @@ static struct clk_branch gcc_ubi1_ahb_clk = {
 
 static struct clk_branch gcc_ubi1_axi_clk = {
        .halt_reg = 0x68220,
+       .halt_check = BRANCH_HALT_DELAY,
        .clkr = {
                .enable_reg = 0x68220,
                .enable_mask = BIT(0),
@@ -3473,6 +3480,7 @@ static struct clk_branch gcc_ubi1_axi_clk = {
 
 static struct clk_branch gcc_ubi1_nc_axi_clk = {
        .halt_reg = 0x68224,
+       .halt_check = BRANCH_HALT_DELAY,
        .clkr = {
                .enable_reg = 0x68224,
                .enable_mask = BIT(0),
@@ -3490,6 +3498,7 @@ static struct clk_branch gcc_ubi1_nc_axi_clk = {
 
 static struct clk_branch gcc_ubi1_core_clk = {
        .halt_reg = 0x68230,
+       .halt_check = BRANCH_HALT_DELAY,
        .clkr = {
                .enable_reg = 0x68230,
                .enable_mask = BIT(0),
@@ -3507,6 +3516,7 @@ static struct clk_branch gcc_ubi1_core_clk = {
 
 static struct clk_branch gcc_ubi1_mpt_clk = {
        .halt_reg = 0x68228,
+       .halt_check = BRANCH_HALT_DELAY,
        .clkr = {
                .enable_reg = 0x68228,
                .enable_mask = BIT(0),