@@ -24,6 +24,7 @@
#include <linux/kernel.h>
#include <linux/gpio.h>
#include <linux/io.h>
+#include <mach/clock.h>
#include <mach/common.h>
#include <mach/r8a7740.h>
#include <asm/mach/arch.h>
@@ -118,6 +119,7 @@
* usbhsf_power_ctrl()
*/
+#ifndef CONFIG_COMMON_CLK
static void __init eva_clock_init(void)
{
struct clk *system = clk_get(NULL, "system_clk");
@@ -152,14 +154,34 @@ clock_error:
if (!IS_ERR(fsibck))
clk_put(fsibck);
}
+#else
+static const struct clk_name clk_names[] __initconst = {
+ { "cmt1", NULL, "sh_cmt.10" },
+ { "iic0", NULL, "fff20000.i2c" },
+ { "mmc", NULL, "e6bd0000.mmc" },
+ { "scifa0", NULL, "sh-sci.0" },
+ { "scifa1", NULL, "sh-sci.1" },
+ { "scifa2", NULL, "sh-sci.2" },
+ { "scifa3", NULL, "sh-sci.3" },
+ { "scifa4", NULL, "sh-sci.4" },
+ { "scifa5", NULL, "sh-sci.5" },
+ { "scifa6", NULL, "sh-sci.6" },
+ { "scifa7", NULL, "sh-sci.7" },
+ { "scifb", NULL, "sh-sci.8" },
+ { "sdhi0", NULL, "e6850000.sd" },
+ { "tpu0", NULL, "e6600000.pwm" },
+};
+#endif
/*
* board init
*/
static void __init eva_init(void)
{
+#ifndef CONFIG_COMMON_CLK
r8a7740_clock_init(MD_CK0 | MD_CK2);
eva_clock_init();
+#endif
r8a7740_meram_workaround();
@@ -167,6 +189,9 @@ static void __init eva_init(void)
/* Early BRESP enable, Shared attribute override enable, 32K*8way */
l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff);
#endif
+#ifdef CONFIG_COMMON_CLK
+ shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
+#endif
r8a7740_add_standard_devices_dt();
@@ -913,7 +913,9 @@ void __init r8a7740_init_irq_of(void)
static void __init r8a7740_generic_init(void)
{
+#ifndef CONFIG_COMMON_CLK
r8a7740_clock_init(0);
+#endif
r8a7740_add_standard_devices_dt();
}