aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/setup-sh7372.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-shmobile/setup-sh7372.c')
-rw-r--r--arch/arm/mach-shmobile/setup-sh7372.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
index 2fe8f83ca124..4c7fece5ef92 100644
--- a/arch/arm/mach-shmobile/setup-sh7372.c
+++ b/arch/arm/mach-shmobile/setup-sh7372.c
@@ -22,6 +22,7 @@
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/irq.h> 23#include <linux/irq.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/of_platform.h>
25#include <linux/uio_driver.h> 26#include <linux/uio_driver.h>
26#include <linux/delay.h> 27#include <linux/delay.h>
27#include <linux/input.h> 28#include <linux/input.h>
@@ -1092,3 +1093,50 @@ void __init sh7372_add_early_devices(void)
1092 /* override timer setup with soc-specific code */ 1093 /* override timer setup with soc-specific code */
1093 shmobile_timer.init = sh7372_earlytimer_init; 1094 shmobile_timer.init = sh7372_earlytimer_init;
1094} 1095}
1096
1097#ifdef CONFIG_USE_OF
1098
1099void __init sh7372_add_early_devices_dt(void)
1100{
1101 shmobile_setup_delay(800, 1, 3); /* Cortex-A8 @ 800MHz */
1102
1103 early_platform_add_devices(sh7372_early_devices,
1104 ARRAY_SIZE(sh7372_early_devices));
1105
1106 /* setup early console here as well */
1107 shmobile_setup_console();
1108}
1109
1110static const struct of_dev_auxdata sh7372_auxdata_lookup[] __initconst = {
1111 { }
1112};
1113
1114void __init sh7372_add_standard_devices_dt(void)
1115{
1116 /* clocks are setup late during boot in the case of DT */
1117 sh7372_clock_init();
1118
1119 platform_add_devices(sh7372_early_devices,
1120 ARRAY_SIZE(sh7372_early_devices));
1121
1122 of_platform_populate(NULL, of_default_bus_match_table,
1123 sh7372_auxdata_lookup, NULL);
1124}
1125
1126static const char *sh7372_boards_compat_dt[] __initdata = {
1127 "renesas,sh7372",
1128 NULL,
1129};
1130
1131DT_MACHINE_START(SH7372_DT, "Generic SH7372 (Flattened Device Tree)")
1132 .map_io = sh7372_map_io,
1133 .init_early = sh7372_add_early_devices_dt,
1134 .nr_irqs = NR_IRQS_LEGACY,
1135 .init_irq = sh7372_init_irq,
1136 .handle_irq = shmobile_handle_irq_intc,
1137 .init_machine = sh7372_add_standard_devices_dt,
1138 .timer = &shmobile_timer,
1139 .dt_compat = sh7372_boards_compat_dt,
1140MACHINE_END
1141
1142#endif /* CONFIG_USE_OF */