[PATCH 1/2] clk: mxs: get base address from device tree

Michał Mirosław mirqus at gmail.com
Tue Mar 26 11:12:35 EDT 2013


2013/3/26 Shawn Guo <shawn.guo at linaro.org>:
> Instead of using the static definitions, get clkctrl and digctl base
> addresses with mapping from device tree.
>
> Use macro on variable is not nice, but it's done here to save huge
> pointless diff stat.
>
[...]
> @@ -100,6 +105,14 @@ int __init mx23_clocks_init(void)
>         struct device_node *np;
>         u32 i;
>
> +       np = of_find_compatible_node(NULL, NULL, "fsl,imx23-digctl");
> +       digctrl = of_iomap(np, 0);
> +       WARN_ON(!digctrl);
> +
> +       np = of_find_compatible_node(NULL, NULL, "fsl,imx23-clkctrl");
> +       clkctrl = of_iomap(np, 0);
> +       WARN_ON(!clkctrl);
> +

WARN? Won't the system die soon anyway if the addresses cannot be found?

Best Regards,
Michał Mirosław



More information about the linux-arm-kernel mailing list