[PATCH 11/20] i.MX: Add VF610 clock tree initialization code

Sascha Hauer s.hauer at pengutronix.de
Mon Oct 3 23:58:11 PDT 2016


On Mon, Oct 03, 2016 at 07:40:48AM -0700, Andrey Smirnov wrote:
> Based on analogous code from Linux kernel
> 
> Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
> ---
>  drivers/clk/imx/Makefile    |    1 +
>  drivers/clk/imx/clk-vf610.c | 1224 +++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 1225 insertions(+)
>  create mode 100644 drivers/clk/imx/clk-vf610.c
> 
> diff --git a/drivers/clk/imx/Makefile b/drivers/clk/imx/Makefile
> index 0303c0b..2665f49 100644
> --- a/drivers/clk/imx/Makefile
> +++ b/drivers/clk/imx/Makefile
> @@ -1 +1,2 @@
>  obj-y += clk.o
> +obj-$(CONFIG_ARCH_VF610) += clk-vf610.o
> +static struct clk *clk[VF610_CLK_END];
> +struct clk_onecell_data clk_data;
> +
> +static struct clk * __init vf610_get_fixed_clock(struct device_node *np,
> +						 const char *name)
> +{
> +	struct clk *clk = of_clk_get_by_name(np, name);
> +
> +	/* Backward compatibility if device tree is missing clks assignments */
> +	if (IS_ERR(clk))
> +		clk = imx_obtain_fixed_clock(name, 0);

Ah, that explains it. No, we don't need this since we are compiling the
device trees into barebox and can make sure they are compatible with our
code.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list