OSDN Git Service

ARM: at91: prepare sama5 dt boards transition to common clk
authorBoris BREZILLON <b.brezillon@overkiz.com>
Fri, 11 Oct 2013 12:43:31 +0000 (14:43 +0200)
committerNicolas Ferre <nicolas.ferre@atmel.com>
Mon, 2 Dec 2013 14:31:27 +0000 (15:31 +0100)
commitd4d24c1b4f74e055905db6e677a2ba05f55de30a
treef7607ceeb45ab33079117acced7866114a4fbd27
parentc59b631517e91300f6a4838f593ebca5ebde8742
ARM: at91: prepare sama5 dt boards transition to common clk

This patch prepare the transition to common clk for sama5 dt boards by
replacing the timer init callback.

Clocks registration cannot be done in early init callback (as formerly done
by the old clk implementation) because it requires dynamic allocation
which is not ready yet during early init.

In the other hand, at91 clocks must be registered before
at91sam926x_pit_init is called because PIT (Periodic Interval Timer) driver
request the master clk (mck).

A new function (at91sama5_dt_timer_init) is created to fullfil these needs.
This function registers all at91 clks using the dt definition before
calling the PIT init function.
The device tree clock registration is enabled only if common clk is
selected. Else the old clk registration is been done during
at91_dt_initialize call.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
arch/arm/mach-at91/board-dt-sama5.c