[PATCH v2 08/14] clk: hs: add clock support

Arnd Bergmann arnd at arndb.de
Tue Mar 12 15:00:19 EDT 2013


On Tuesday 12 March 2013, Haojian Zhuang wrote:
> +void __init hs_init_clocks(void)
> +{
> +       struct device_node *node;
> +
> +       /* map pmctrl registers */
> +       node = of_find_compatible_node(NULL, NULL, "hisilicon,pmctrl");
> +       hs_clk.pmctrl = of_iomap(node, 0);
> +       WARN_ON(!hs_clk.pmctrl);
> +
> +       node = of_find_compatible_node(NULL, NULL, "hisilicon,sctrl");
> +       hs_clk.sctrl = of_iomap(node, 0);
> +
> +       of_clk_init(hs_clk_match);
> +}

You should be able to just use CLK_OF_DECLARE() with each member of
hs_clk_match[] now and call of_clk_init(NULL) from platform code.

This requires moving the of_iomap() calls somewhere else, but it
could be a function that gets called by whichever setup function
gets run first.

	Arnd



More information about the linux-arm-kernel mailing list