]>
Commit | Line | Data |
---|---|---|
7f627f03 MD |
1 | /* |
2 | * Emma Mobile EV2 processor support | |
3 | * | |
4 | * Copyright (C) 2012 Magnus Damm | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation; version 2 of the License. | |
9 | * | |
10 | * This program is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | * GNU General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU General Public License | |
16 | * along with this program; if not, write to the Free Software | |
17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
18 | */ | |
a3153e6c | 19 | #include <linux/clk-provider.h> |
7f627f03 MD |
20 | #include <linux/kernel.h> |
21 | #include <linux/init.h> | |
3d5de271 | 22 | #include <linux/of_platform.h> |
7f627f03 MD |
23 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | |
25 | #include <asm/mach/map.h> | |
fd44aa5e | 26 | #include "common.h" |
7f627f03 | 27 | |
bd5a875d MD |
28 | static struct map_desc emev2_io_desc[] __initdata = { |
29 | #ifdef CONFIG_SMP | |
bd5a875d MD |
30 | /* 2M mapping for SCU + L2 controller */ |
31 | { | |
32 | .virtual = 0xf0000000, | |
33 | .pfn = __phys_to_pfn(0x1e000000), | |
34 | .length = SZ_2M, | |
35 | .type = MT_DEVICE | |
36 | }, | |
37 | #endif | |
38 | }; | |
39 | ||
505891ec | 40 | static void __init emev2_map_io(void) |
bd5a875d MD |
41 | { |
42 | iotable_init(emev2_io_desc, ARRAY_SIZE(emev2_io_desc)); | |
43 | } | |
44 | ||
505891ec | 45 | static void __init emev2_init_delay(void) |
7f627f03 MD |
46 | { |
47 | shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */ | |
3d5de271 MD |
48 | } |
49 | ||
a3153e6c MD |
50 | static void __init emev2_add_standard_devices_dt(void) |
51 | { | |
a3153e6c | 52 | of_clk_init(NULL); |
a3153e6c MD |
53 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
54 | } | |
55 | ||
d24d1780 | 56 | static const char *emev2_boards_compat_dt[] __initconst = { |
3d5de271 MD |
57 | "renesas,emev2", |
58 | NULL, | |
59 | }; | |
60 | ||
505891ec MD |
61 | extern struct smp_operations emev2_smp_ops; |
62 | ||
3d5de271 | 63 | DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)") |
a62580e5 | 64 | .smp = smp_ops(emev2_smp_ops), |
0ea2b538 | 65 | .map_io = emev2_map_io, |
3d5de271 | 66 | .init_early = emev2_init_delay, |
a3153e6c | 67 | .init_machine = emev2_add_standard_devices_dt, |
3f348e1c | 68 | .init_late = shmobile_init_late, |
3d5de271 MD |
69 | .dt_compat = emev2_boards_compat_dt, |
70 | MACHINE_END |