aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-marzen-reference.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-shmobile/board-marzen-reference.c')
-rw-r--r--arch/arm/mach-shmobile/board-marzen-reference.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c
index 94bd57203ff5..21b3e1ca2261 100644
--- a/arch/arm/mach-shmobile/board-marzen-reference.c
+++ b/arch/arm/mach-shmobile/board-marzen-reference.c
@@ -19,19 +19,42 @@
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */ 20 */
21 21
22#include <mach/r8a7779.h> 22#include <linux/clk/shmobile.h>
23#include <linux/clocksource.h>
24#include <linux/of_platform.h>
25
23#include <asm/irq.h> 26#include <asm/irq.h>
24#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
28
29#include "clock.h"
25#include "common.h" 30#include "common.h"
26#include "irqs.h" 31#include "irqs.h"
32#include "r8a7779.h"
33
34static void __init marzen_init_timer(void)
35{
36 r8a7779_clocks_init(r8a7779_read_mode_pins());
37 clocksource_of_init();
38}
39
40/*
41 * This is a really crude hack to provide clkdev support to platform
42 * devices until they get moved to DT.
43 */
44static const struct clk_name clk_names[] __initconst = {
45 { "tmu0", "fck", "sh-tmu.0" },
46};
27 47
28static void __init marzen_init(void) 48static void __init marzen_init(void)
29{ 49{
50 shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
30 r8a7779_add_standard_devices_dt(); 51 r8a7779_add_standard_devices_dt();
52 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
31 r8a7779_init_irq_extpin_dt(1); /* IRQ1 as individual interrupt */ 53 r8a7779_init_irq_extpin_dt(1); /* IRQ1 as individual interrupt */
32} 54}
33 55
34static const char *marzen_boards_compat_dt[] __initdata = { 56static const char *marzen_boards_compat_dt[] __initdata = {
57 "renesas,marzen",
35 "renesas,marzen-reference", 58 "renesas,marzen-reference",
36 NULL, 59 NULL,
37}; 60};
@@ -39,7 +62,8 @@ static const char *marzen_boards_compat_dt[] __initdata = {
39DT_MACHINE_START(MARZEN, "marzen") 62DT_MACHINE_START(MARZEN, "marzen")
40 .smp = smp_ops(r8a7779_smp_ops), 63 .smp = smp_ops(r8a7779_smp_ops),
41 .map_io = r8a7779_map_io, 64 .map_io = r8a7779_map_io,
42 .init_early = r8a7779_init_delay, 65 .init_early = shmobile_init_delay,
66 .init_time = marzen_init_timer,
43 .nr_irqs = NR_IRQS_LEGACY, 67 .nr_irqs = NR_IRQS_LEGACY,
44 .init_irq = r8a7779_init_irq_dt, 68 .init_irq = r8a7779_init_irq_dt,
45 .init_machine = marzen_init, 69 .init_machine = marzen_init,