diff options
author | Alex Elder <elder@linaro.org> | 2013-12-19 17:28:11 -0600 |
---|---|---|
committer | Alex Elder <elder@linaro.org> | 2014-03-31 08:01:15 -0500 |
commit | 7cada01445ebce61b4bc524225ae4d945f9b5251 (patch) | |
tree | 97aec18593176810a31c6d942859e7bffa211d75 /drivers/clk/clk-wm831x.c | |
parent | 1f629d0bc59fc921c1b30571358d8c3cf9f6b088 (diff) |
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>
Diffstat (limited to 'drivers/clk/clk-wm831x.c')
0 files changed, 0 insertions, 0 deletions