linux/drivers/clk/bcm
Alex Elder 03548ec06a clk: bcm281xx: define CCU clock data statically
Rather than "manually" setting up each CCU's clock entries at run
time, define a flexible array of generic Kona clock structures
within the CCU structure itself.  Each of these entries contains
generic kona clock information (like its CCU pointer and clock
framework initialization data).  Each also has a pointer to a
structure contianing clock type-dependent initialization data
(like register definitions).

Since we'll iterate over these arrays we need to be sure they have
slots for all potential clock index values.  (E.g. for the root CCU
we must have at least BCM281XX_ROOT_CCU_CLOCK_COUNT slots.)  To
ensure this we always define an extra entry and fill it using the
special initializer LAST_KONA_CLK.

Just about everything we need to know about a clock can be defined
statically.  As a result, kona_clk_setup() can be changed to take
just a kona_clk structure as its argument, and peri_clk_setup() can
be simplified.  With the information pre-defined we are also able
to handle most clock setup genericially.  We can do away with the
CCU-specific callback functions that previously were needed to set
up the entries in CCU's clock array.

Move the definition of the ccu_data structure down in "clk-kona.h"
to avoid a forward dependency.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2014-04-30 11:51:35 -07:00
..
clk-bcm281xx.c clk: bcm281xx: define CCU clock data statically 2014-04-30 11:51:35 -07:00
clk-kona-setup.c clk: bcm281xx: define CCU clock data statically 2014-04-30 11:51:35 -07:00
clk-kona.c clk: bcm281xx: initialize CCU structures statically 2014-04-30 11:51:33 -07:00
clk-kona.h clk: bcm281xx: define CCU clock data statically 2014-04-30 11:51:35 -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