ARM: SPEAr13xx: Remove fields not required for ssp controller
[linux-2.6-block.git] / arch / arm / mach-spear13xx / 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>
18#include <asm/hardware/gic.h>
19#include <asm/mach/arch.h>
20#include <asm/mach/map.h>
21#include <mach/generic.h>
22#include <mach/spear.h>
23
24/* Base addresses */
25#define SPEAR1310_SSP1_BASE UL(0x5D400000)
26#define SPEAR1310_SATA0_BASE UL(0xB1000000)
27#define SPEAR1310_SATA1_BASE UL(0xB1800000)
28#define SPEAR1310_SATA2_BASE UL(0xB4000000)
29
07e812a0
VKS
30#define SPEAR1310_RAS_GRP1_BASE UL(0xD8000000)
31#define VA_SPEAR1310_RAS_GRP1_BASE UL(0xFA000000)
32#define SPEAR1310_RAS_BASE UL(0xD8400000)
33#define VA_SPEAR1310_RAS_BASE IOMEM(UL(0xFA400000))
34
e3978dc7
VK
35/* ssp device registration */
36static struct pl022_ssp_controller ssp1_plat_data = {
e3978dc7 37 .enable_dma = 0,
e3978dc7
VK
38};
39
40/* Add SPEAr1310 auxdata to pass platform data */
41static struct of_dev_auxdata spear1310_auxdata_lookup[] __initdata = {
42 OF_DEV_AUXDATA("arasan,cf-spear1340", MCIF_CF_BASE, NULL, &cf_dma_priv),
43 OF_DEV_AUXDATA("snps,dma-spear1340", DMAC0_BASE, NULL, &dmac_plat_data),
44 OF_DEV_AUXDATA("snps,dma-spear1340", DMAC1_BASE, NULL, &dmac_plat_data),
45 OF_DEV_AUXDATA("arm,pl022", SSP_BASE, NULL, &pl022_plat_data),
46
47 OF_DEV_AUXDATA("arm,pl022", SPEAR1310_SSP1_BASE, NULL, &ssp1_plat_data),
48 {}
49};
50
51static void __init spear1310_dt_init(void)
52{
53 of_platform_populate(NULL, of_default_bus_match_table,
54 spear1310_auxdata_lookup, NULL);
55}
56
57static const char * const spear1310_dt_board_compat[] = {
58 "st,spear1310",
59 "st,spear1310-evb",
60 NULL,
61};
62
63/*
64 * Following will create 16MB static virtual/physical mappings
65 * PHYSICAL VIRTUAL
66 * 0xD8000000 0xFA000000
67 */
68struct map_desc spear1310_io_desc[] __initdata = {
69 {
70 .virtual = VA_SPEAR1310_RAS_GRP1_BASE,
71 .pfn = __phys_to_pfn(SPEAR1310_RAS_GRP1_BASE),
72 .length = SZ_16M,
73 .type = MT_DEVICE
74 },
75};
76
77static void __init spear1310_map_io(void)
78{
79 iotable_init(spear1310_io_desc, ARRAY_SIZE(spear1310_io_desc));
80 spear13xx_map_io();
81}
82
83DT_MACHINE_START(SPEAR1310_DT, "ST SPEAr1310 SoC with Flattened Device Tree")
2d8b21d9 84 .smp = smp_ops(spear13xx_smp_ops),
e3978dc7
VK
85 .map_io = spear1310_map_io,
86 .init_irq = spear13xx_dt_init_irq,
87 .handle_irq = gic_handle_irq,
88 .timer = &spear13xx_timer,
89 .init_machine = spear1310_dt_init,
90 .restart = spear_restart,
91 .dt_compat = spear1310_dt_board_compat,
92MACHINE_END