diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-02-28 00:57:51 -0500 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-03-15 11:30:05 -0400 |
commit | 2b11ea5bf2fe4b79f9388d2eaf5d84713eb44a4c (patch) | |
tree | 706fb6d2d0782d09ec47b6138390d3c14853eb78 | |
parent | 8bf7ec6508cdd6e068d42b9acee1ea439543ebe7 (diff) |
ARM: at91/dt: add specific DT soc init
This will allow to have static Device mapping and DT probe mapping for the
System Controller.
Temporary keep the call to ioremap_registers() until we have the binding
for the SDRAM/DDR Controller.
Temporary keep the main clock hardcoded to 12MHz until we have the binding
for the PMC.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
-rw-r--r-- | arch/arm/mach-at91/board-dt.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-at91/generic.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-at91/setup.c | 18 |
3 files changed, 20 insertions, 7 deletions
diff --git a/arch/arm/mach-at91/board-dt.c b/arch/arm/mach-at91/board-dt.c index 9f729d6c8942..c18d4d307801 100644 --- a/arch/arm/mach-at91/board-dt.c +++ b/arch/arm/mach-at91/board-dt.c | |||
@@ -30,12 +30,6 @@ | |||
30 | #include "generic.h" | 30 | #include "generic.h" |
31 | 31 | ||
32 | 32 | ||
33 | static void __init ek_init_early(void) | ||
34 | { | ||
35 | /* Initialize processor: 12.000 MHz crystal */ | ||
36 | at91_initialize(12000000); | ||
37 | } | ||
38 | |||
39 | static const struct of_device_id irq_of_match[] __initconst = { | 33 | static const struct of_device_id irq_of_match[] __initconst = { |
40 | 34 | ||
41 | { .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init }, | 35 | { .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init }, |
@@ -65,7 +59,7 @@ DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM (Device Tree)") | |||
65 | /* Maintainer: Atmel */ | 59 | /* Maintainer: Atmel */ |
66 | .timer = &at91sam926x_timer, | 60 | .timer = &at91sam926x_timer, |
67 | .map_io = at91_map_io, | 61 | .map_io = at91_map_io, |
68 | .init_early = ek_init_early, | 62 | .init_early = at91_dt_initialize, |
69 | .init_irq = at91_dt_init_irq, | 63 | .init_irq = at91_dt_init_irq, |
70 | .init_machine = at91_dt_device_init, | 64 | .init_machine = at91_dt_device_init, |
71 | .dt_compat = at91_dt_board_compat, | 65 | .dt_compat = at91_dt_board_compat, |
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index 459f01a4a546..d5f5083880f1 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h | |||
@@ -20,6 +20,7 @@ extern void __init at91_init_sram(int bank, unsigned long base, | |||
20 | extern void __init at91rm9200_set_type(int type); | 20 | extern void __init at91rm9200_set_type(int type); |
21 | extern void __init at91_initialize(unsigned long main_clock); | 21 | extern void __init at91_initialize(unsigned long main_clock); |
22 | extern void __init at91x40_initialize(unsigned long main_clock); | 22 | extern void __init at91x40_initialize(unsigned long main_clock); |
23 | extern void __init at91_dt_initialize(void); | ||
23 | 24 | ||
24 | /* Interrupts */ | 25 | /* Interrupts */ |
25 | extern void __init at91_init_irq_default(void); | 26 | extern void __init at91_init_irq_default(void); |
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index 372396c2ecb6..c0bd5a625695 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/io.h> | 9 | #include <linux/io.h> |
10 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
11 | #include <linux/pm.h> | 11 | #include <linux/pm.h> |
12 | #include <linux/of_address.h> | ||
12 | 13 | ||
13 | #include <asm/mach/map.h> | 14 | #include <asm/mach/map.h> |
14 | 15 | ||
@@ -285,6 +286,23 @@ void __init at91_ioremap_matrix(u32 base_addr) | |||
285 | panic("Impossible to ioremap at91_matrix_base\n"); | 286 | panic("Impossible to ioremap at91_matrix_base\n"); |
286 | } | 287 | } |
287 | 288 | ||
289 | #if defined(CONFIG_OF) | ||
290 | void __init at91_dt_initialize(void) | ||
291 | { | ||
292 | /* temporary until have the ramc binding*/ | ||
293 | at91_boot_soc.ioremap_registers(); | ||
294 | |||
295 | /* temporary until have the pmc binding */ | ||
296 | /* Init clock subsystem */ | ||
297 | at91_clock_init(12000000); | ||
298 | |||
299 | /* Register the processor-specific clocks */ | ||
300 | at91_boot_soc.register_clocks(); | ||
301 | |||
302 | at91_boot_soc.init(); | ||
303 | } | ||
304 | #endif | ||
305 | |||
288 | void __init at91_initialize(unsigned long main_clock) | 306 | void __init at91_initialize(unsigned long main_clock) |
289 | { | 307 | { |
290 | at91_boot_soc.ioremap_registers(); | 308 | at91_boot_soc.ioremap_registers(); |