x86, efi: Set runtime_version to the EFI spec revision
[linux/fpc-iii.git] / arch / arm / mach-spear3xx / spear300.c
bloba69cbfdb07ee42c17451bf9cfa52952b5ca1382b
1 /*
2 * arch/arm/mach-spear3xx/spear300.c
4 * SPEAr300 machine source file
6 * Copyright (C) 2009-2012 ST Microelectronics
7 * Viresh Kumar <viresh.linux@gmail.com>
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.
14 #define pr_fmt(fmt) "SPEAr300: " fmt
16 #include <linux/amba/pl08x.h>
17 #include <linux/of_platform.h>
18 #include <asm/hardware/vic.h>
19 #include <asm/mach/arch.h>
20 #include <mach/generic.h>
21 #include <mach/spear.h>
23 /* DMAC platform data's slave info */
24 struct pl08x_channel_data spear300_dma_info[] = {
26 .bus_id = "uart0_rx",
27 .min_signal = 2,
28 .max_signal = 2,
29 .muxval = 0,
30 .periph_buses = PL08X_AHB1,
31 }, {
32 .bus_id = "uart0_tx",
33 .min_signal = 3,
34 .max_signal = 3,
35 .muxval = 0,
36 .periph_buses = PL08X_AHB1,
37 }, {
38 .bus_id = "ssp0_rx",
39 .min_signal = 8,
40 .max_signal = 8,
41 .muxval = 0,
42 .periph_buses = PL08X_AHB1,
43 }, {
44 .bus_id = "ssp0_tx",
45 .min_signal = 9,
46 .max_signal = 9,
47 .muxval = 0,
48 .periph_buses = PL08X_AHB1,
49 }, {
50 .bus_id = "i2c_rx",
51 .min_signal = 10,
52 .max_signal = 10,
53 .muxval = 0,
54 .periph_buses = PL08X_AHB1,
55 }, {
56 .bus_id = "i2c_tx",
57 .min_signal = 11,
58 .max_signal = 11,
59 .muxval = 0,
60 .periph_buses = PL08X_AHB1,
61 }, {
62 .bus_id = "irda",
63 .min_signal = 12,
64 .max_signal = 12,
65 .muxval = 0,
66 .periph_buses = PL08X_AHB1,
67 }, {
68 .bus_id = "adc",
69 .min_signal = 13,
70 .max_signal = 13,
71 .muxval = 0,
72 .periph_buses = PL08X_AHB1,
73 }, {
74 .bus_id = "to_jpeg",
75 .min_signal = 14,
76 .max_signal = 14,
77 .muxval = 0,
78 .periph_buses = PL08X_AHB1,
79 }, {
80 .bus_id = "from_jpeg",
81 .min_signal = 15,
82 .max_signal = 15,
83 .muxval = 0,
84 .periph_buses = PL08X_AHB1,
85 }, {
86 .bus_id = "ras0_rx",
87 .min_signal = 0,
88 .max_signal = 0,
89 .muxval = 1,
90 .periph_buses = PL08X_AHB1,
91 }, {
92 .bus_id = "ras0_tx",
93 .min_signal = 1,
94 .max_signal = 1,
95 .muxval = 1,
96 .periph_buses = PL08X_AHB1,
97 }, {
98 .bus_id = "ras1_rx",
99 .min_signal = 2,
100 .max_signal = 2,
101 .muxval = 1,
102 .periph_buses = PL08X_AHB1,
103 }, {
104 .bus_id = "ras1_tx",
105 .min_signal = 3,
106 .max_signal = 3,
107 .muxval = 1,
108 .periph_buses = PL08X_AHB1,
109 }, {
110 .bus_id = "ras2_rx",
111 .min_signal = 4,
112 .max_signal = 4,
113 .muxval = 1,
114 .periph_buses = PL08X_AHB1,
115 }, {
116 .bus_id = "ras2_tx",
117 .min_signal = 5,
118 .max_signal = 5,
119 .muxval = 1,
120 .periph_buses = PL08X_AHB1,
121 }, {
122 .bus_id = "ras3_rx",
123 .min_signal = 6,
124 .max_signal = 6,
125 .muxval = 1,
126 .periph_buses = PL08X_AHB1,
127 }, {
128 .bus_id = "ras3_tx",
129 .min_signal = 7,
130 .max_signal = 7,
131 .muxval = 1,
132 .periph_buses = PL08X_AHB1,
133 }, {
134 .bus_id = "ras4_rx",
135 .min_signal = 8,
136 .max_signal = 8,
137 .muxval = 1,
138 .periph_buses = PL08X_AHB1,
139 }, {
140 .bus_id = "ras4_tx",
141 .min_signal = 9,
142 .max_signal = 9,
143 .muxval = 1,
144 .periph_buses = PL08X_AHB1,
145 }, {
146 .bus_id = "ras5_rx",
147 .min_signal = 10,
148 .max_signal = 10,
149 .muxval = 1,
150 .periph_buses = PL08X_AHB1,
151 }, {
152 .bus_id = "ras5_tx",
153 .min_signal = 11,
154 .max_signal = 11,
155 .muxval = 1,
156 .periph_buses = PL08X_AHB1,
157 }, {
158 .bus_id = "ras6_rx",
159 .min_signal = 12,
160 .max_signal = 12,
161 .muxval = 1,
162 .periph_buses = PL08X_AHB1,
163 }, {
164 .bus_id = "ras6_tx",
165 .min_signal = 13,
166 .max_signal = 13,
167 .muxval = 1,
168 .periph_buses = PL08X_AHB1,
169 }, {
170 .bus_id = "ras7_rx",
171 .min_signal = 14,
172 .max_signal = 14,
173 .muxval = 1,
174 .periph_buses = PL08X_AHB1,
175 }, {
176 .bus_id = "ras7_tx",
177 .min_signal = 15,
178 .max_signal = 15,
179 .muxval = 1,
180 .periph_buses = PL08X_AHB1,
184 /* Add SPEAr300 auxdata to pass platform data */
185 static struct of_dev_auxdata spear300_auxdata_lookup[] __initdata = {
186 OF_DEV_AUXDATA("arm,pl022", SPEAR3XX_ICM1_SSP_BASE, NULL,
187 &pl022_plat_data),
188 OF_DEV_AUXDATA("arm,pl080", SPEAR3XX_ICM3_DMA_BASE, NULL,
189 &pl080_plat_data),
193 static void __init spear300_dt_init(void)
195 pl080_plat_data.slave_channels = spear300_dma_info;
196 pl080_plat_data.num_slave_channels = ARRAY_SIZE(spear300_dma_info);
198 of_platform_populate(NULL, of_default_bus_match_table,
199 spear300_auxdata_lookup, NULL);
202 static const char * const spear300_dt_board_compat[] = {
203 "st,spear300",
204 "st,spear300-evb",
205 NULL,
208 static void __init spear300_map_io(void)
210 spear3xx_map_io();
213 DT_MACHINE_START(SPEAR300_DT, "ST SPEAr300 SoC with Flattened Device Tree")
214 .map_io = spear300_map_io,
215 .init_irq = spear3xx_dt_init_irq,
216 .handle_irq = vic_handle_irq,
217 .timer = &spear3xx_timer,
218 .init_machine = spear300_dt_init,
219 .restart = spear_restart,
220 .dt_compat = spear300_dt_board_compat,
221 MACHINE_END