linux/arch/arm/mach-at91
Boris BREZILLON c8a8c63008 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>
2013-12-02 15:22:52 +01:00
..
include/mach ARM: at91: move at91_pmc.h to include/linux/clk/at91_pmc.h 2013-12-02 15:22:15 +01:00
at91_aic.h
at91_rstc.h
at91_shdwc.h
at91_tc.h
at91rm9200_devices.c
at91rm9200_time.c ARM: at91: remove IRQF_DISABLED 2013-09-19 15:36:35 +02:00
at91rm9200.c ARM: at91: move at91_pmc.h to include/linux/clk/at91_pmc.h 2013-12-02 15:22:15 +01:00
at91sam9_alt_reset.S
at91sam9g45_devices.c video: atmel_lcdfb: fix platform data struct 2013-09-27 09:26:19 +03:00
at91sam9g45_reset.S ARM: at91: sam9g45: shutdown ddr1 too when rebooting 2013-09-30 09:58:44 -07:00
at91sam9g45.c ARM: at91: move at91_pmc.h to include/linux/clk/at91_pmc.h 2013-12-02 15:22:15 +01:00
at91sam9n12.c ARM: at91: move at91_pmc.h to include/linux/clk/at91_pmc.h 2013-12-02 15:22:15 +01:00
at91sam9rl_devices.c video: atmel_lcdfb: fix platform data struct 2013-09-27 09:26:19 +03:00
at91sam9rl.c ARM: at91: move at91_pmc.h to include/linux/clk/at91_pmc.h 2013-12-02 15:22:15 +01:00
at91sam9x5.c ARM: at91: move at91_pmc.h to include/linux/clk/at91_pmc.h 2013-12-02 15:22:15 +01:00
at91sam926x_time.c ARM: at91: remove IRQF_DISABLED 2013-09-19 15:36:35 +02:00
at91sam9260_devices.c
at91sam9260.c ARM: at91: move at91_pmc.h to include/linux/clk/at91_pmc.h 2013-12-02 15:22:15 +01:00
at91sam9261_devices.c video: atmel_lcdfb: fix platform data struct 2013-09-27 09:26:19 +03:00
at91sam9261.c ARM: at91: move at91_pmc.h to include/linux/clk/at91_pmc.h 2013-12-02 15:22:15 +01:00
at91sam9263_devices.c video: atmel_lcdfb: fix platform data struct 2013-09-27 09:26:19 +03:00
at91sam9263.c ARM: at91: move at91_pmc.h to include/linux/clk/at91_pmc.h 2013-12-02 15:22:15 +01:00
at91x40_time.c ARM: at91: remove IRQF_DISABLED 2013-09-19 15:36:35 +02:00
at91x40.c ARM: at91: fix at91_extern_irq usage for non-dt boards 2013-06-21 16:35:26 +02:00
board-1arm.c
board-afeb-9260v1.c
board-cam60.c ARM: at91: cam60: fix incorrect placement of __initdata tag 2013-09-30 17:50:51 +02:00
board-carmeva.c
board-cpu9krea.c
board-cpuat91.c
board-csb337.c
board-csb637.c
board-dt-rm9200.c ARM: at91: remove init_machine() as default is suitable 2013-10-16 15:47:08 +02:00
board-dt-sam9.c ARM: at91: remove init_machine() as default is suitable 2013-10-16 15:47:08 +02:00
board-dt-sama5.c phy: micrel: Add definitions for common Micrel PHY registers 2013-08-22 23:20:54 +08:00
board-eb01.c
board-eb9200.c
board-ecbat91.c
board-eco920.c
board-flexibity.c
board-foxg20.c
board-gsia18s.c
board-kafa.c
board-kb9202.c
board-pcontrol-g20.c
board-picotux200.c
board-qil-a9260.c
board-rm9200ek.c
board-rsi-ews.c
board-sam9-l9260.c
board-sam9g20ek.c
board-sam9m10g45ek.c video: atmel_lcdfb: fix platform data struct 2013-09-27 09:26:19 +03:00
board-sam9rlek.c video: atmel_lcdfb: pass the pdata as params 2013-09-27 09:26:20 +03:00
board-sam9260ek.c misc: (at24) move header to linux/platform_data/ 2013-09-30 06:02:34 +02:00
board-sam9261ek.c video: atmel_lcdfb: pass the pdata as params 2013-09-27 09:26:20 +03:00
board-sam9263ek.c Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2013-11-18 15:50:07 -08:00
board-snapper9260.c gpio: (gpio-pca953x) move header to linux/platform_data/ 2013-08-29 12:33:52 -07:00
board-stamp9g20.c
board-yl-9200.c
board.h video: atmel_lcdfb: fix platform data struct 2013-09-27 09:26:19 +03:00
clock.c ARM: at91: move at91_pmc.h to include/linux/clk/at91_pmc.h 2013-12-02 15:22:15 +01:00
clock.h
generic.h ARM: at91: add Kconfig options for common clk support 2013-12-02 15:22:52 +01:00
gpio.c
gsia18s.h
irq.c ARM: at91: fix at91_extern_irq usage for non-dt boards 2013-06-21 16:35:26 +02:00
Kconfig ARM: at91: add Kconfig options for common clk support 2013-12-02 15:22:52 +01:00
Kconfig.non_dt ARM: at91: add Kconfig options for common clk support 2013-12-02 15:22:52 +01:00
leds.c
Makefile ARM: at91: add Kconfig options for common clk support 2013-12-02 15:22:52 +01:00
Makefile.boot
pm_slowclock.S ARM: at91: move at91_pmc.h to include/linux/clk/at91_pmc.h 2013-12-02 15:22:15 +01:00
pm.c ARM: at91: move at91_pmc.h to include/linux/clk/at91_pmc.h 2013-12-02 15:22:15 +01:00
pm.h ARM: AT91: pm: Factorize standby function 2013-10-16 23:51:36 +02:00
sam9_smc.c
sam9_smc.h
sama5d3.c ARM: at91: move at91_pmc.h to include/linux/clk/at91_pmc.h 2013-12-02 15:22:15 +01:00
setup.c ARM: at91: add Kconfig options for common clk support 2013-12-02 15:22:52 +01:00
soc.h ARM: at91: fix at91_extern_irq usage for non-dt boards 2013-06-21 16:35:26 +02:00
stamp9g20.h
sysirq_mask.c ARM: at91: fix hanged boot due to early rtt-interrupt 2013-11-15 12:13:33 +01:00