diff options
author | Boris BREZILLON <b.brezillon@overkiz.com> | 2013-10-11 09:37:46 +0200 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2013-12-02 15:22:52 +0100 |
commit | c8a8c6300866a51ba41fb41b95800e5982dcf96a (patch) | |
tree | 6507955bb6c5c569ee9211540416e9b087b430e4 /arch/arm/mach-at91/Makefile | |
parent | ARM: at91: move at91_pmc.h to include/linux/clk/at91_pmc.h (diff) | |
download | linux-c8a8c6300866a51ba41fb41b95800e5982dcf96a.tar.xz linux-c8a8c6300866a51ba41fb41b95800e5982dcf96a.zip |
ARM: at91: add Kconfig options for common clk support
This patch adds the following Kconfig options to prepare the transition to
common clk framework:
- AT91_USE_OLD_CLK: this option is selected by every SoC which does not
support new at91 clks based on common clk framework (SoC which does not
define the clock tree in its device tree).
This options is also selected when the user choose non dt boards support
(new at91 clks can only be registered from a device tree definition).
- COMMON_CLK_AT91: this option cannot be selected directly. Instead it is
enabled if these 3 conditions are met:
* at least one of the selected SoCs have a PMC (Power Management
Controller) Unit
* device tree support is enabled
* the old at91 clk implementation is disabled (every selected SoC define
its clks in its device tree and non dt boards support is disabled)
- OLD_CLK_AT91: this option cannot be selected directly. Instead it is
enabled if these 2 conditions are met:
* at least one of the selected SoCs have a PMC (Power Management
Controller) Unit
* at least one of the selected SoCs does not define its clks in its
device tree or non dt-boards support is enabled
This patch selects AT91_USE_OLD_CLK in all currently supported SoCs. These
selects will be removed after clk definitions are properly added in each
soc's device tree.
It also selects AT91_USE_OLD_CLK in all non-dt boards support.
AT91_PMC_UNIT references are replaced by OLD_CLK_AT91, because PMC Unit is
enabled for both old and common clk implementations, and old clk
implementation should not be compiled if COMMON_CLK is enabled.
To avoid future link errors, a new stub is created for at91_dt_clock_init
function if OLD_CLK_AT91 is disabled.
A new check is added in dt init functions (setup.c) to prepare for SoCs
supporting new clk implementation. These SoCs won't setup the
register_clocks callback (clk registration is done using of_clk_init).
Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91/Makefile')
-rw-r--r-- | arch/arm/mach-at91/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index 90aab2d5a07f..705b38a179ec 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile @@ -7,7 +7,7 @@ obj-m := obj-n := obj- := -obj-$(CONFIG_AT91_PMC_UNIT) += clock.o +obj-$(CONFIG_OLD_CLK_AT91) += clock.o obj-$(CONFIG_AT91_SAM9_ALT_RESET) += at91sam9_alt_reset.o obj-$(CONFIG_AT91_SAM9G45_RESET) += at91sam9g45_reset.o obj-$(CONFIG_AT91_SAM9_TIME) += at91sam926x_time.o |