Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+20 -7
+1 -7
arch/arm/mach-at91/board-dt.c
··· 30 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 33 static const struct of_device_id irq_of_match[] __initconst = { 40 34 41 35 { .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init }, ··· 59 65 /* Maintainer: Atmel */ 60 66 .timer = &at91sam926x_timer, 61 67 .map_io = at91_map_io, 62 - .init_early = ek_init_early, 68 + .init_early = at91_dt_initialize, 63 69 .init_irq = at91_dt_init_irq, 64 70 .init_machine = at91_dt_device_init, 65 71 .dt_compat = at91_dt_board_compat,
+1
arch/arm/mach-at91/generic.h
··· 20 20 extern void __init at91rm9200_set_type(int type); 21 21 extern void __init at91_initialize(unsigned long main_clock); 22 22 extern void __init at91x40_initialize(unsigned long main_clock); 23 + extern void __init at91_dt_initialize(void); 23 24 24 25 /* Interrupts */ 25 26 extern void __init at91_init_irq_default(void);
+18
arch/arm/mach-at91/setup.c
··· 9 9 #include <linux/io.h> 10 10 #include <linux/mm.h> 11 11 #include <linux/pm.h> 12 + #include <linux/of_address.h> 12 13 13 14 #include <asm/mach/map.h> 14 15 ··· 285 284 if (!at91_matrix_base) 286 285 panic("Impossible to ioremap at91_matrix_base\n"); 287 286 } 287 + 288 + #if defined(CONFIG_OF) 289 + void __init at91_dt_initialize(void) 290 + { 291 + /* temporary until have the ramc binding*/ 292 + at91_boot_soc.ioremap_registers(); 293 + 294 + /* temporary until have the pmc binding */ 295 + /* Init clock subsystem */ 296 + at91_clock_init(12000000); 297 + 298 + /* Register the processor-specific clocks */ 299 + at91_boot_soc.register_clocks(); 300 + 301 + at91_boot_soc.init(); 302 + } 303 + #endif 288 304 289 305 void __init at91_initialize(unsigned long main_clock) 290 306 {