aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/setup-emev2.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2012-05-16 02:45:54 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2012-05-17 18:14:03 -0400
commit3d5de27174955702bc874302ba9e72d71d5acd58 (patch)
treea2dc7e5fc0a818fb718f2353b74ca98aa45c8738 /arch/arm/mach-shmobile/setup-emev2.c
parent0c73f7bc124e1657a583d9dfb0d168a69005e2d3 (diff)
mach-shmobile: Emma Mobile EV2 DT support V3
This is EMEV2 DT support V3. The support is limited to whatever devices that are complied in the kernel. At this point we have UARTs handled by "em-uart" and a timer handled by "em-sti". Clocks and SMP are not supported. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'arch/arm/mach-shmobile/setup-emev2.c')
-rw-r--r--arch/arm/mach-shmobile/setup-emev2.c47
1 files changed, 46 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c
index d40fede8c9b3..dae9aa68bb09 100644
--- a/arch/arm/mach-shmobile/setup-emev2.c
+++ b/arch/arm/mach-shmobile/setup-emev2.c
@@ -22,9 +22,11 @@
22#include <linux/irq.h> 22#include <linux/irq.h>
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24#include <linux/platform_data/gpio-em.h> 24#include <linux/platform_data/gpio-em.h>
25#include <linux/of_platform.h>
25#include <linux/delay.h> 26#include <linux/delay.h>
26#include <linux/input.h> 27#include <linux/input.h>
27#include <linux/io.h> 28#include <linux/io.h>
29#include <linux/of_irq.h>
28#include <mach/hardware.h> 30#include <mach/hardware.h>
29#include <mach/common.h> 31#include <mach/common.h>
30#include <mach/emev2.h> 32#include <mach/emev2.h>
@@ -381,9 +383,14 @@ void __init emev2_add_standard_devices(void)
381 ARRAY_SIZE(emev2_late_devices)); 383 ARRAY_SIZE(emev2_late_devices));
382} 384}
383 385
384void __init emev2_add_early_devices(void) 386void __init emev2_init_delay(void)
385{ 387{
386 shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */ 388 shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */
389}
390
391void __init emev2_add_early_devices(void)
392{
393 emev2_init_delay();
387 394
388 early_platform_add_devices(emev2_early_devices, 395 early_platform_add_devices(emev2_early_devices,
389 ARRAY_SIZE(emev2_early_devices)); 396 ARRAY_SIZE(emev2_early_devices));
@@ -405,3 +412,41 @@ void __init emev2_init_irq(void)
405 /* Use GIC to handle interrupts */ 412 /* Use GIC to handle interrupts */
406 gic_init(0, 29, gic_dist_base, gic_cpu_base); 413 gic_init(0, 29, gic_dist_base, gic_cpu_base);
407} 414}
415
416#ifdef CONFIG_USE_OF
417static const struct of_dev_auxdata emev2_auxdata_lookup[] __initconst = {
418 { }
419};
420
421void __init emev2_add_standard_devices_dt(void)
422{
423 of_platform_populate(NULL, of_default_bus_match_table,
424 emev2_auxdata_lookup, NULL);
425}
426
427static const struct of_device_id emev2_dt_irq_match[] = {
428 { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
429 {},
430};
431
432static const char *emev2_boards_compat_dt[] __initdata = {
433 "renesas,emev2",
434 NULL,
435};
436
437void __init emev2_init_irq_dt(void)
438{
439 of_irq_init(emev2_dt_irq_match);
440}
441
442DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)")
443 .init_early = emev2_init_delay,
444 .nr_irqs = NR_IRQS_LEGACY,
445 .init_irq = emev2_init_irq_dt,
446 .handle_irq = gic_handle_irq,
447 .init_machine = emev2_add_standard_devices_dt,
448 .timer = &shmobile_timer,
449 .dt_compat = emev2_boards_compat_dt,
450MACHINE_END
451
452#endif /* CONFIG_USE_OF */