|
@@ -677,3 +677,94 @@ static void r8a7740_i2c_workaround(struct platform_device *pdev)
|
|
|
iounmap(reg);
|
|
|
}
|
|
|
|
|
|
+void __init r8a7740_add_standard_devices(void)
|
|
|
+{
|
|
|
+ /* I2C work-around */
|
|
|
+ r8a7740_i2c_workaround(&i2c0_device);
|
|
|
+ r8a7740_i2c_workaround(&i2c1_device);
|
|
|
+
|
|
|
+ r8a7740_init_pm_domains();
|
|
|
+
|
|
|
+ /* add devices */
|
|
|
+ platform_add_devices(r8a7740_early_devices,
|
|
|
+ ARRAY_SIZE(r8a7740_early_devices));
|
|
|
+ platform_add_devices(r8a7740_late_devices,
|
|
|
+ ARRAY_SIZE(r8a7740_late_devices));
|
|
|
+
|
|
|
+ /* add devices to PM domain */
|
|
|
+
|
|
|
+ rmobile_add_device_to_domain("A3SP", &scif0_device);
|
|
|
+ rmobile_add_device_to_domain("A3SP", &scif1_device);
|
|
|
+ rmobile_add_device_to_domain("A3SP", &scif2_device);
|
|
|
+ rmobile_add_device_to_domain("A3SP", &scif3_device);
|
|
|
+ rmobile_add_device_to_domain("A3SP", &scif4_device);
|
|
|
+ rmobile_add_device_to_domain("A3SP", &scif5_device);
|
|
|
+ rmobile_add_device_to_domain("A3SP", &scif6_device);
|
|
|
+ rmobile_add_device_to_domain("A3SP", &scif7_device);
|
|
|
+ rmobile_add_device_to_domain("A3SP", &scifb_device);
|
|
|
+ rmobile_add_device_to_domain("A3SP", &i2c1_device);
|
|
|
+}
|
|
|
+
|
|
|
+static void __init r8a7740_earlytimer_init(void)
|
|
|
+{
|
|
|
+ r8a7740_clock_init(0);
|
|
|
+ shmobile_earlytimer_init();
|
|
|
+}
|
|
|
+
|
|
|
+void __init r8a7740_add_early_devices(void)
|
|
|
+{
|
|
|
+ early_platform_add_devices(r8a7740_early_devices,
|
|
|
+ ARRAY_SIZE(r8a7740_early_devices));
|
|
|
+
|
|
|
+ /* setup early console here as well */
|
|
|
+ shmobile_setup_console();
|
|
|
+
|
|
|
+ /* override timer setup with soc-specific code */
|
|
|
+ shmobile_timer.init = r8a7740_earlytimer_init;
|
|
|
+}
|
|
|
+
|
|
|
+#ifdef CONFIG_USE_OF
|
|
|
+
|
|
|
+void __init r8a7740_add_early_devices_dt(void)
|
|
|
+{
|
|
|
+ shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */
|
|
|
+
|
|
|
+ early_platform_add_devices(r8a7740_early_devices,
|
|
|
+ ARRAY_SIZE(r8a7740_early_devices));
|
|
|
+
|
|
|
+ /* setup early console here as well */
|
|
|
+ shmobile_setup_console();
|
|
|
+}
|
|
|
+
|
|
|
+static const struct of_dev_auxdata r8a7740_auxdata_lookup[] __initconst = {
|
|
|
+ { }
|
|
|
+};
|
|
|
+
|
|
|
+void __init r8a7740_add_standard_devices_dt(void)
|
|
|
+{
|
|
|
+ /* clocks are setup late during boot in the case of DT */
|
|
|
+ r8a7740_clock_init(0);
|
|
|
+
|
|
|
+ platform_add_devices(r8a7740_early_devices,
|
|
|
+ ARRAY_SIZE(r8a7740_early_devices));
|
|
|
+
|
|
|
+ of_platform_populate(NULL, of_default_bus_match_table,
|
|
|
+ r8a7740_auxdata_lookup, NULL);
|
|
|
+}
|
|
|
+
|
|
|
+static const char *r8a7740_boards_compat_dt[] __initdata = {
|
|
|
+ "renesas,r8a7740",
|
|
|
+ NULL,
|
|
|
+};
|
|
|
+
|
|
|
+DT_MACHINE_START(R8A7740_DT, "Generic R8A7740 (Flattened Device Tree)")
|
|
|
+ .map_io = r8a7740_map_io,
|
|
|
+ .init_early = r8a7740_add_early_devices_dt,
|
|
|
+ .init_irq = r8a7740_init_irq,
|
|
|
+ .handle_irq = shmobile_handle_irq_intc,
|
|
|
+ .init_machine = r8a7740_add_standard_devices_dt,
|
|
|
+ .timer = &shmobile_timer,
|
|
|
+ .dt_compat = r8a7740_boards_compat_dt,
|
|
|
+MACHINE_END
|
|
|
+
|
|
|
+#endif /* CONFIG_USE_OF */
|