[PATCH v2 2/2] clk: rockchip: Make uartpll a child of the gpll on rk3036

Stephen Boyd sboyd at codeaurora.org
Wed Mar 1 11:08:53 PST 2017


On 02/28, Heiko Stuebner wrote:
> @@ -480,6 +481,19 @@ static void __init rk3036_clk_init(struct device_node *np)
>  
>  	rockchip_register_restart_notifier(ctx, RK2928_GLB_SRST_FST, NULL);
>  
> +	clk = __clk_lookup("uart_pll_clk");
> +	clk2 = __clk_lookup("gpll");

Can we do the register writes directly? Or call the appropriate
function to twiddle some bits to change the parent before
registering the clks? It's nice to avoid using clk API in
provider drivers when we're getting clks from the provider
itself, plus I'd like to get rid of __clk_lookup() one day.

> +	if (clk && clk2) {
> +		int ret = clk_set_parent(clk, clk2);
> +
> +		if (ret < 0)
> +			pr_warn("%s: could not reparent uart_pll_clk to gpll\n",
> +				__func__);
> +	} else {
> +		pr_warn("%s: missing clocks to reparent uart_pll_clk to gpll\n",
> +			__func__);
> +	}
> +
>  	rockchip_clk_of_add_provider(np, ctx);
>  }

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



More information about the Linux-rockchip mailing list