Commit 04ffc960 authored by Alexandre Belloni's avatar Alexandre Belloni Committed by Nicolas Ferre

ARM: at91: rm9200: fix clock registration

Actually register clocks from device tree when using the common clock
framework.
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
[nicolas.ferre@atmel.com: add at91 to function name]
Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
parent 650ca015
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_irq.h> #include <linux/of_irq.h>
#include <linux/clk-provider.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -35,13 +36,21 @@ static void __init at91rm9200_dt_init_irq(void) ...@@ -35,13 +36,21 @@ static void __init at91rm9200_dt_init_irq(void)
of_irq_init(irq_of_match); of_irq_init(irq_of_match);
} }
static void __init at91rm9200_dt_timer_init(void)
{
#if defined(CONFIG_COMMON_CLK)
of_clk_init(NULL);
#endif
at91rm9200_timer_init();
}
static const char *at91rm9200_dt_board_compat[] __initdata = { static const char *at91rm9200_dt_board_compat[] __initdata = {
"atmel,at91rm9200", "atmel,at91rm9200",
NULL NULL
}; };
DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200 (Device Tree)") DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200 (Device Tree)")
.init_time = at91rm9200_timer_init, .init_time = at91rm9200_dt_timer_init,
.map_io = at91_map_io, .map_io = at91_map_io,
.handle_irq = at91_aic_handle_irq, .handle_irq = at91_aic_handle_irq,
.init_early = at91rm9200_dt_initialize, .init_early = at91rm9200_dt_initialize,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment