blob: 10b7cb5dcb3af1e3553761eb5d2f0dbbc33d8bf4 [file] [log] [blame]
Magnus Damm7f627f02012-05-16 15:44:58 +09001/*
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.
Magnus Damm7f627f02012-05-16 15:44:58 +090014 */
15#include <linux/kernel.h>
16#include <linux/init.h>
Magnus Dammaf164ca2014-06-05 14:32:12 +090017#include <linux/mm.h>
Magnus Damm7f627f02012-05-16 15:44:58 +090018#include <asm/mach-types.h>
19#include <asm/mach/arch.h>
20#include <asm/mach/map.h>
Magnus Dammfd44aa52014-06-17 16:47:37 +090021#include "common.h"
Magnus Damm7f627f02012-05-16 15:44:58 +090022
Magnus Dammbd5a8752012-05-16 15:45:25 +090023static struct map_desc emev2_io_desc[] __initdata = {
24#ifdef CONFIG_SMP
Magnus Dammbd5a8752012-05-16 15:45:25 +090025 /* 2M mapping for SCU + L2 controller */
26 {
27 .virtual = 0xf0000000,
28 .pfn = __phys_to_pfn(0x1e000000),
29 .length = SZ_2M,
30 .type = MT_DEVICE
31 },
32#endif
33};
34
Magnus Damm505891e2014-02-17 16:35:08 +090035static void __init emev2_map_io(void)
Magnus Dammbd5a8752012-05-16 15:45:25 +090036{
37 iotable_init(emev2_io_desc, ARRAY_SIZE(emev2_io_desc));
38}
39
Uwe Kleine-König543c5042015-02-18 21:01:45 +010040static const char *const emev2_boards_compat_dt[] __initconst = {
Magnus Damm3d5de272012-05-16 15:45:54 +090041 "renesas,emev2",
42 NULL,
43};
44
Masahiro Yamada75305272015-11-15 10:39:53 +090045extern const struct smp_operations emev2_smp_ops;
Magnus Damm505891e2014-02-17 16:35:08 +090046
Magnus Damm3d5de272012-05-16 15:45:54 +090047DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)")
Marc Zyngiera62580e2011-09-08 13:15:22 +010048 .smp = smp_ops(emev2_smp_ops),
Magnus Damm0ea2b532013-07-02 18:28:22 +090049 .map_io = emev2_map_io,
Magnus Dammef9026e2014-06-05 14:32:04 +090050 .init_early = shmobile_init_delay,
Magnus Damm3f348e12013-11-07 08:21:20 +090051 .init_late = shmobile_init_late,
Magnus Damm3d5de272012-05-16 15:45:54 +090052 .dt_compat = emev2_boards_compat_dt,
53MACHINE_END