Commit | Line | Data |
---|---|---|
e3978dc7 VK |
1 | /* |
2 | * arch/arm/mach-spear13xx/spear1310.c | |
3 | * | |
4 | * SPEAr1310 machine source file | |
5 | * | |
6 | * Copyright (C) 2012 ST Microelectronics | |
da89947b | 7 | * Viresh Kumar <vireshk@kernel.org> |
e3978dc7 VK |
8 | * |
9 | * This file is licensed under the terms of the GNU General Public | |
10 | * License version 2. This program is licensed "as is" without any | |
11 | * warranty of any kind, whether express or implied. | |
12 | */ | |
13 | ||
14 | #define pr_fmt(fmt) "SPEAr1310: " fmt | |
15 | ||
16 | #include <linux/amba/pl022.h> | |
300a6856 | 17 | #include <linux/pata_arasan_cf_data.h> |
e3978dc7 VK |
18 | #include <asm/mach/arch.h> |
19 | #include <asm/mach/map.h> | |
2b9c613c | 20 | #include "generic.h" |
e3978dc7 VK |
21 | #include <mach/spear.h> |
22 | ||
23 | /* Base addresses */ | |
07e812a0 VKS |
24 | #define SPEAR1310_RAS_GRP1_BASE UL(0xD8000000) |
25 | #define VA_SPEAR1310_RAS_GRP1_BASE UL(0xFA000000) | |
07e812a0 | 26 | |
e3978dc7 VK |
27 | static void __init spear1310_dt_init(void) |
28 | { | |
2449d33a | 29 | platform_device_register_simple("spear-cpufreq", -1, NULL, 0); |
e3978dc7 VK |
30 | } |
31 | ||
32 | static const char * const spear1310_dt_board_compat[] = { | |
33 | "st,spear1310", | |
34 | "st,spear1310-evb", | |
35 | NULL, | |
36 | }; | |
37 | ||
38 | /* | |
39 | * Following will create 16MB static virtual/physical mappings | |
40 | * PHYSICAL VIRTUAL | |
41 | * 0xD8000000 0xFA000000 | |
42 | */ | |
17681ff2 | 43 | static struct map_desc spear1310_io_desc[] __initdata = { |
e3978dc7 VK |
44 | { |
45 | .virtual = VA_SPEAR1310_RAS_GRP1_BASE, | |
46 | .pfn = __phys_to_pfn(SPEAR1310_RAS_GRP1_BASE), | |
47 | .length = SZ_16M, | |
48 | .type = MT_DEVICE | |
49 | }, | |
50 | }; | |
51 | ||
52 | static void __init spear1310_map_io(void) | |
53 | { | |
54 | iotable_init(spear1310_io_desc, ARRAY_SIZE(spear1310_io_desc)); | |
55 | spear13xx_map_io(); | |
56 | } | |
57 | ||
58 | DT_MACHINE_START(SPEAR1310_DT, "ST SPEAr1310 SoC with Flattened Device Tree") | |
2d8b21d9 | 59 | .smp = smp_ops(spear13xx_smp_ops), |
e3978dc7 | 60 | .map_io = spear1310_map_io, |
6bb27d73 | 61 | .init_time = spear13xx_timer_init, |
e3978dc7 VK |
62 | .init_machine = spear1310_dt_init, |
63 | .restart = spear_restart, | |
64 | .dt_compat = spear1310_dt_board_compat, | |
65 | MACHINE_END |