Commit | Line | Data |
---|---|---|
6d9598e2 MD |
1 | /* |
2 | * sh73a0 processor support | |
3 | * | |
4 | * Copyright (C) 2010 Takashi Yoshii | |
5 | * Copyright (C) 2010 Magnus Damm | |
6 | * Copyright (C) 2008 Yoshihiro Shimoda | |
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. | |
6d9598e2 MD |
16 | */ |
17 | #include <linux/kernel.h> | |
18 | #include <linux/init.h> | |
19 | #include <linux/interrupt.h> | |
20 | #include <linux/irq.h> | |
48609533 | 21 | #include <linux/of_platform.h> |
6d9598e2 MD |
22 | #include <linux/delay.h> |
23 | #include <linux/input.h> | |
24 | #include <linux/io.h> | |
ded59d6d | 25 | |
0b52b250 | 26 | #include <asm/hardware/cache-l2x0.h> |
50e15c34 | 27 | #include <asm/mach/map.h> |
6d9598e2 | 28 | #include <asm/mach/arch.h> |
3be26fdb | 29 | #include <asm/mach/time.h> |
ded59d6d | 30 | |
fd44aa5e | 31 | #include "common.h" |
ded59d6d | 32 | #include "sh73a0.h" |
6d9598e2 | 33 | |
50e15c34 | 34 | static struct map_desc sh73a0_io_desc[] __initdata = { |
178a2b07 | 35 | /* create a 1:1 identity mapping for 0xe6xxxxxx |
50e15c34 MD |
36 | * used by CPGA, INTC and PFC. |
37 | */ | |
38 | { | |
39 | .virtual = 0xe6000000, | |
40 | .pfn = __phys_to_pfn(0xe6000000), | |
41 | .length = 256 << 20, | |
42 | .type = MT_DEVICE_NONSHARED | |
43 | }, | |
44 | }; | |
45 | ||
9a986398 | 46 | static void __init sh73a0_map_io(void) |
50e15c34 | 47 | { |
7a2071c5 | 48 | debug_ll_io_init(); |
50e15c34 MD |
49 | iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc)); |
50 | } | |
51 | ||
0b52b250 MD |
52 | static void __init sh73a0_generic_init(void) |
53 | { | |
54 | #ifdef CONFIG_CACHE_L2X0 | |
55 | /* Shared attribute override enable, 64K*8way */ | |
56 | l2x0_init(IOMEM(0xf0100000), 0x00400000, 0xc20f0fff); | |
57 | #endif | |
58 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | |
59 | } | |
60 | ||
19c233b7 | 61 | static const char *const sh73a0_boards_compat_dt[] __initconst = { |
48609533 SH |
62 | "renesas,sh73a0", |
63 | NULL, | |
64 | }; | |
65 | ||
66 | DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)") | |
f9989507 | 67 | .smp = smp_ops(sh73a0_smp_ops), |
48609533 | 68 | .map_io = sh73a0_map_io, |
dac95365 | 69 | .init_early = shmobile_init_delay, |
0b52b250 | 70 | .init_machine = sh73a0_generic_init, |
e604d809 | 71 | .init_late = shmobile_init_late, |
48609533 SH |
72 | .dt_compat = sh73a0_boards_compat_dt, |
73 | MACHINE_END |