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/mach/arch.h>
20 #include <mach/spear.h>
22 /* DMAC platform data's slave info */
23 struct pl08x_channel_data spear300_dma_info
[] = {
29 .periph_buses
= PL08X_AHB1
,
35 .periph_buses
= PL08X_AHB1
,
41 .periph_buses
= PL08X_AHB1
,
47 .periph_buses
= PL08X_AHB1
,
53 .periph_buses
= PL08X_AHB1
,
59 .periph_buses
= PL08X_AHB1
,
65 .periph_buses
= PL08X_AHB1
,
71 .periph_buses
= PL08X_AHB1
,
77 .periph_buses
= PL08X_AHB1
,
79 .bus_id
= "from_jpeg",
83 .periph_buses
= PL08X_AHB1
,
89 .periph_buses
= PL08X_AHB1
,
95 .periph_buses
= PL08X_AHB1
,
101 .periph_buses
= PL08X_AHB1
,
107 .periph_buses
= PL08X_AHB1
,
113 .periph_buses
= PL08X_AHB1
,
119 .periph_buses
= PL08X_AHB1
,
125 .periph_buses
= PL08X_AHB1
,
131 .periph_buses
= PL08X_AHB1
,
137 .periph_buses
= PL08X_AHB1
,
143 .periph_buses
= PL08X_AHB1
,
149 .periph_buses
= PL08X_AHB1
,
155 .periph_buses
= PL08X_AHB1
,
161 .periph_buses
= PL08X_AHB1
,
167 .periph_buses
= PL08X_AHB1
,
173 .periph_buses
= PL08X_AHB1
,
179 .periph_buses
= PL08X_AHB1
,
183 /* Add SPEAr300 auxdata to pass platform data */
184 static struct of_dev_auxdata spear300_auxdata_lookup
[] __initdata
= {
185 OF_DEV_AUXDATA("arm,pl022", SPEAR3XX_ICM1_SSP_BASE
, NULL
,
187 OF_DEV_AUXDATA("arm,pl080", SPEAR_ICM3_DMA_BASE
, NULL
,
192 static void __init
spear300_dt_init(void)
194 pl080_plat_data
.slave_channels
= spear300_dma_info
;
195 pl080_plat_data
.num_slave_channels
= ARRAY_SIZE(spear300_dma_info
);
197 of_platform_populate(NULL
, of_default_bus_match_table
,
198 spear300_auxdata_lookup
, NULL
);
201 static const char * const spear300_dt_board_compat
[] = {
207 static void __init
spear300_map_io(void)
212 DT_MACHINE_START(SPEAR300_DT
, "ST SPEAr300 SoC with Flattened Device Tree")
213 .map_io
= spear300_map_io
,
214 .init_time
= spear3xx_timer_init
,
215 .init_machine
= spear300_dt_init
,
216 .restart
= spear_restart
,
217 .dt_compat
= spear300_dt_board_compat
,