linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: rockchip: handle critical clocks after registrering all clocks
@ 2015-08-21 17:51 Heiko Stuebner
  2015-08-22 15:04 ` Michael Niewoehner
  2015-09-10 20:56 ` Stephen Boyd
  0 siblings, 2 replies; 3+ messages in thread
From: Heiko Stuebner @ 2015-08-21 17:51 UTC (permalink / raw)
  To: linux-arm-kernel

Currently the registration of critical clocks is done in the function
shared between rk3066 and rk3188 clock trees. That results in them
getting handled maybe before all of them are registered.

Therefore move the critical clock handling down to the end of the soc-
specific clock registration function, so that all clocks are registered
before they're maybe handled as critical clock.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
It looks like with the recent flexibilization of the gpio clocks in the
pinctrl driver, we're shaking out some oddities from the clock trees.
This is another one that surfaced.

 drivers/clk/rockchip/clk-rk3188.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/rockchip/clk-rk3188.c b/drivers/clk/rockchip/clk-
rk3188.c
index faa6695..bd88542 100644
--- a/drivers/clk/rockchip/clk-rk3188.c
+++ b/drivers/clk/rockchip/clk-rk3188.c
@@ -744,8 +744,6 @@ static void __init rk3188_common_clk_init(struct 
device_node *np)
 
 	rockchip_clk_register_branches(common_clk_branches,
 				  ARRAY_SIZE(common_clk_branches));
-	rockchip_clk_protect_critical(rk3188_critical_clocks,
-				      ARRAY_SIZE(rk3188_critical_clocks));
 
 	rockchip_register_softrst(np, 9, reg_base + RK2928_SOFTRST_CON(0),
 				  ROCKCHIP_SOFTRST_HIWORD_MASK);
@@ -765,6 +763,8 @@ static void __init rk3066a_clk_init(struct device_node 
*np)
 			mux_armclk_p, ARRAY_SIZE(mux_armclk_p),
 			&rk3066_cpuclk_data, rk3066_cpuclk_rates,
 			ARRAY_SIZE(rk3066_cpuclk_rates));
+	rockchip_clk_protect_critical(rk3188_critical_clocks,
+				      ARRAY_SIZE(rk3188_critical_clocks));
 }
 CLK_OF_DECLARE(rk3066a_cru, "rockchip,rk3066a-cru", rk3066a_clk_init);
 
@@ -801,6 +801,9 @@ static void __init rk3188a_clk_init(struct device_node 
*np)
 		pr_warn("%s: missing clocks to reparent aclk_cpu_pre to gpll\n",
 			__func__);
 	}
+
+	rockchip_clk_protect_critical(rk3188_critical_clocks,
+				      ARRAY_SIZE(rk3188_critical_clocks));
 }
 CLK_OF_DECLARE(rk3188a_cru, "rockchip,rk3188a-cru", rk3188a_clk_init);
 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] clk: rockchip: handle critical clocks after registrering all clocks
  2015-08-21 17:51 [PATCH] clk: rockchip: handle critical clocks after registrering all clocks Heiko Stuebner
@ 2015-08-22 15:04 ` Michael Niewoehner
  2015-09-10 20:56 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Niewoehner @ 2015-08-22 15:04 UTC (permalink / raw)
  To: linux-arm-kernel


Am 21.08.2015 um 19:51 schrieb Heiko Stuebner <heiko@sntech.de>:

> Currently the registration of critical clocks is done in the function
> shared between rk3066 and rk3188 clock trees. That results in them
> getting handled maybe before all of them are registered.
> 
> Therefore move the critical clock handling down to the end of the soc-
> specific clock registration function, so that all clocks are registered
> before they're maybe handled as critical clock.
> 
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Michael Niewoehner <linux@mniewoehner.de>
> ---
> It looks like with the recent flexibilization of the gpio clocks in the
> pinctrl driver, we're shaking out some oddities from the clock trees.
> This is another one that surfaced.
> 
> drivers/clk/rockchip/clk-rk3188.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/clk/rockchip/clk-rk3188.c b/drivers/clk/rockchip/clk-
> rk3188.c
> index faa6695..bd88542 100644
> --- a/drivers/clk/rockchip/clk-rk3188.c
> +++ b/drivers/clk/rockchip/clk-rk3188.c
> @@ -744,8 +744,6 @@ static void __init rk3188_common_clk_init(struct 
> device_node *np)
> 
> 	rockchip_clk_register_branches(common_clk_branches,
> 				  ARRAY_SIZE(common_clk_branches));
> -	rockchip_clk_protect_critical(rk3188_critical_clocks,
> -				      ARRAY_SIZE(rk3188_critical_clocks));
> 
> 	rockchip_register_softrst(np, 9, reg_base + RK2928_SOFTRST_CON(0),
> 				  ROCKCHIP_SOFTRST_HIWORD_MASK);
> @@ -765,6 +763,8 @@ static void __init rk3066a_clk_init(struct device_node 
> *np)
> 			mux_armclk_p, ARRAY_SIZE(mux_armclk_p),
> 			&rk3066_cpuclk_data, rk3066_cpuclk_rates,
> 			ARRAY_SIZE(rk3066_cpuclk_rates));
> +	rockchip_clk_protect_critical(rk3188_critical_clocks,
> +				      ARRAY_SIZE(rk3188_critical_clocks));
> }
> CLK_OF_DECLARE(rk3066a_cru, "rockchip,rk3066a-cru", rk3066a_clk_init);
> 
> @@ -801,6 +801,9 @@ static void __init rk3188a_clk_init(struct device_node 
> *np)
> 		pr_warn("%s: missing clocks to reparent aclk_cpu_pre to gpll\n",
> 			__func__);
> 	}
> +
> +	rockchip_clk_protect_critical(rk3188_critical_clocks,
> +				      ARRAY_SIZE(rk3188_critical_clocks));
> }
> CLK_OF_DECLARE(rk3188a_cru, "rockchip,rk3188a-cru", rk3188a_clk_init);
> 
> -- 
> 2.1.4
> 
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] clk: rockchip: handle critical clocks after registrering all clocks
  2015-08-21 17:51 [PATCH] clk: rockchip: handle critical clocks after registrering all clocks Heiko Stuebner
  2015-08-22 15:04 ` Michael Niewoehner
@ 2015-09-10 20:56 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2015-09-10 20:56 UTC (permalink / raw)
  To: linux-arm-kernel

On 08/21, Heiko Stuebner wrote:
> Currently the registration of critical clocks is done in the function
> shared between rk3066 and rk3188 clock trees. That results in them
> getting handled maybe before all of them are registered.
> 
> Therefore move the critical clock handling down to the end of the soc-
> specific clock registration function, so that all clocks are registered
> before they're maybe handled as critical clock.
> 
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---

Applied to clk-fixes

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-10 20:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-21 17:51 [PATCH] clk: rockchip: handle critical clocks after registrering all clocks Heiko Stuebner
2015-08-22 15:04 ` Michael Niewoehner
2015-09-10 20:56 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).