Commit | Line | Data |
---|---|---|
73d6a69e SH |
1 | /* |
2 | * marzen board support - Reference DT implementation | |
3 | * | |
4 | * Copyright (C) 2011 Renesas Solutions Corp. | |
5 | * Copyright (C) 2011 Magnus Damm | |
6 | * Copyright (C) 2013 Simon Horman | |
7 | * | |
8 | * This program is free software; you can redistribute it and/or modify | |
9 | * it under the terms of the GNU General Public License as published by | |
10 | * the Free Software Foundation; version 2 of the License. | |
11 | * | |
12 | * This program is distributed in the hope that it will be useful, | |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | * GNU General Public License for more details. | |
73d6a69e SH |
16 | */ |
17 | ||
a92fbd07 SH |
18 | #include <linux/clk/shmobile.h> |
19 | #include <linux/clocksource.h> | |
f8fba0ce | 20 | #include <linux/of_platform.h> |
1b55353c | 21 | |
73d6a69e SH |
22 | #include <asm/irq.h> |
23 | #include <asm/mach/arch.h> | |
1b55353c | 24 | |
fd44aa5e | 25 | #include "common.h" |
b6bab126 | 26 | #include "irqs.h" |
1b55353c | 27 | #include "r8a7779.h" |
73d6a69e | 28 | |
a92fbd07 | 29 | static void __init marzen_init_timer(void) |
73d6a69e | 30 | { |
a92fbd07 | 31 | r8a7779_clocks_init(r8a7779_read_mode_pins()); |
a92fbd07 SH |
32 | clocksource_of_init(); |
33 | } | |
34 | ||
35 | static void __init marzen_init(void) | |
36 | { | |
f8fba0ce | 37 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
7d4bde88 | 38 | r8a7779_init_irq_extpin_dt(1); /* IRQ1 as individual interrupt */ |
73d6a69e SH |
39 | } |
40 | ||
41 | static const char *marzen_boards_compat_dt[] __initdata = { | |
04d3e8a0 | 42 | "renesas,marzen", |
73d6a69e SH |
43 | "renesas,marzen-reference", |
44 | NULL, | |
45 | }; | |
46 | ||
47 | DT_MACHINE_START(MARZEN, "marzen") | |
48 | .smp = smp_ops(r8a7779_smp_ops), | |
49 | .map_io = r8a7779_map_io, | |
17ed9efd | 50 | .init_early = shmobile_init_delay, |
a92fbd07 | 51 | .init_time = marzen_init_timer, |
73d6a69e SH |
52 | .init_irq = r8a7779_init_irq_dt, |
53 | .init_machine = marzen_init, | |
b9c92813 | 54 | .init_late = shmobile_init_late, |
73d6a69e SH |
55 | .dt_compat = marzen_boards_compat_dt, |
56 | MACHINE_END |