]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - arch/arm/mach-spear/spear1310.c
perf/x86: Fix uncore PCI fixed counter handling
[mirror_ubuntu-bionic-kernel.git] / arch / arm / mach-spear / spear1310.c
CommitLineData
e3978dc7
VK
1/*
2 * arch/arm/mach-spear13xx/spear1310.c
3 *
4 * SPEAr1310 machine source file
5 *
6 * Copyright (C) 2012 ST Microelectronics
10d8935f 7 * Viresh Kumar <viresh.linux@gmail.com>
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>
17#include <linux/of_platform.h>
300a6856 18#include <linux/pata_arasan_cf_data.h>
e3978dc7
VK
19#include <asm/mach/arch.h>
20#include <asm/mach/map.h>
2b9c613c 21#include "generic.h"
e3978dc7
VK
22#include <mach/spear.h>
23
24/* Base addresses */
07e812a0
VKS
25#define SPEAR1310_RAS_GRP1_BASE UL(0xD8000000)
26#define VA_SPEAR1310_RAS_GRP1_BASE UL(0xFA000000)
07e812a0 27
e3978dc7
VK
28static void __init spear1310_dt_init(void)
29{
6e8887f6 30 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
e3978dc7
VK
31}
32
33static const char * const spear1310_dt_board_compat[] = {
34 "st,spear1310",
35 "st,spear1310-evb",
36 NULL,
37};
38
39/*
40 * Following will create 16MB static virtual/physical mappings
41 * PHYSICAL VIRTUAL
42 * 0xD8000000 0xFA000000
43 */
44struct map_desc spear1310_io_desc[] __initdata = {
45 {
46 .virtual = VA_SPEAR1310_RAS_GRP1_BASE,
47 .pfn = __phys_to_pfn(SPEAR1310_RAS_GRP1_BASE),
48 .length = SZ_16M,
49 .type = MT_DEVICE
50 },
51};
52
53static void __init spear1310_map_io(void)
54{
55 iotable_init(spear1310_io_desc, ARRAY_SIZE(spear1310_io_desc));
56 spear13xx_map_io();
57}
58
59DT_MACHINE_START(SPEAR1310_DT, "ST SPEAr1310 SoC with Flattened Device Tree")
2d8b21d9 60 .smp = smp_ops(spear13xx_smp_ops),
e3978dc7 61 .map_io = spear1310_map_io,
6bb27d73 62 .init_time = spear13xx_timer_init,
e3978dc7
VK
63 .init_machine = spear1310_dt_init,
64 .restart = spear_restart,
65 .dt_compat = spear1310_dt_board_compat,
66MACHINE_END