Magnus Damm | 7f627f0 | 2012-05-16 15:44:58 +0900 | [diff] [blame] | 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. |
Magnus Damm | 7f627f0 | 2012-05-16 15:44:58 +0900 | [diff] [blame] | 14 | */ |
| 15 | #include <linux/kernel.h> |
| 16 | #include <linux/init.h> |
Magnus Damm | af164ca | 2014-06-05 14:32:12 +0900 | [diff] [blame] | 17 | #include <linux/mm.h> |
Magnus Damm | 7f627f0 | 2012-05-16 15:44:58 +0900 | [diff] [blame] | 18 | #include <asm/mach-types.h> |
| 19 | #include <asm/mach/arch.h> |
| 20 | #include <asm/mach/map.h> |
Magnus Damm | fd44aa5 | 2014-06-17 16:47:37 +0900 | [diff] [blame] | 21 | #include "common.h" |
Magnus Damm | 7f627f0 | 2012-05-16 15:44:58 +0900 | [diff] [blame] | 22 | |
Magnus Damm | bd5a875 | 2012-05-16 15:45:25 +0900 | [diff] [blame] | 23 | static struct map_desc emev2_io_desc[] __initdata = { |
| 24 | #ifdef CONFIG_SMP |
Magnus Damm | bd5a875 | 2012-05-16 15:45:25 +0900 | [diff] [blame] | 25 | /* 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 Damm | 505891e | 2014-02-17 16:35:08 +0900 | [diff] [blame] | 35 | static void __init emev2_map_io(void) |
Magnus Damm | bd5a875 | 2012-05-16 15:45:25 +0900 | [diff] [blame] | 36 | { |
| 37 | iotable_init(emev2_io_desc, ARRAY_SIZE(emev2_io_desc)); |
| 38 | } |
| 39 | |
Uwe Kleine-König | 543c504 | 2015-02-18 21:01:45 +0100 | [diff] [blame] | 40 | static const char *const emev2_boards_compat_dt[] __initconst = { |
Magnus Damm | 3d5de27 | 2012-05-16 15:45:54 +0900 | [diff] [blame] | 41 | "renesas,emev2", |
| 42 | NULL, |
| 43 | }; |
| 44 | |
Masahiro Yamada | 7530527 | 2015-11-15 10:39:53 +0900 | [diff] [blame] | 45 | extern const struct smp_operations emev2_smp_ops; |
Magnus Damm | 505891e | 2014-02-17 16:35:08 +0900 | [diff] [blame] | 46 | |
Magnus Damm | 3d5de27 | 2012-05-16 15:45:54 +0900 | [diff] [blame] | 47 | DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)") |
Marc Zyngier | a62580e | 2011-09-08 13:15:22 +0100 | [diff] [blame] | 48 | .smp = smp_ops(emev2_smp_ops), |
Magnus Damm | 0ea2b53 | 2013-07-02 18:28:22 +0900 | [diff] [blame] | 49 | .map_io = emev2_map_io, |
Magnus Damm | ef9026e | 2014-06-05 14:32:04 +0900 | [diff] [blame] | 50 | .init_early = shmobile_init_delay, |
Magnus Damm | 3f348e1 | 2013-11-07 08:21:20 +0900 | [diff] [blame] | 51 | .init_late = shmobile_init_late, |
Magnus Damm | 3d5de27 | 2012-05-16 15:45:54 +0900 | [diff] [blame] | 52 | .dt_compat = emev2_boards_compat_dt, |
| 53 | MACHINE_END |