linux/drivers/clk/bcm
Alex Elder b12151ca5c clk: bcm281xx: initialize CCU structures statically
We know up front how many CCU's we'll support, so there's no need to
allocate their data structures dynamically.  Define a macro
KONA_CCU_COMMON() to simplify the initialization of many of the
fields in a ccu_data structure.  Pass the address of a statically
defined CCU structure to kona_dt_ccu_setup() rather than having that
function allocate one.

We also know at build time how many clocks a given CCU will provide,
though the number of of them for each CCU is different.  Record the
number of clocks we need in the CCU's clk_onecell_data struct
(which is used when we register the CCU with the common clock code
as a clock provider).  Rename that struct field "clk_data" (because
"data" alone gets a little confusing).

Use the known clock count to move the allocation of each CCU's
clocks array into ccu_clks_setup() rather than having each CCU's
setup callback function do it.

(The real motivation behind all of this is that we'll be doing some
static initialization of some additional CCU-specific data soon.)

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2014-04-30 11:51:33 -07:00
..
clk-bcm281xx.c clk: bcm281xx: initialize CCU structures statically 2014-04-30 11:51:33 -07:00
clk-kona-setup.c clk: bcm281xx: initialize CCU structures statically 2014-04-30 11:51:33 -07:00
clk-kona.c clk: bcm281xx: initialize CCU structures statically 2014-04-30 11:51:33 -07:00
clk-kona.h clk: bcm281xx: initialize CCU structures statically 2014-04-30 11:51:33 -07:00
Kconfig clk: bcm281xx: add initial clock framework support 2014-02-24 13:43:46 -05:00
Makefile clk: bcm281xx: add initial clock framework support 2014-02-24 13:43:46 -05:00