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
[] = {
30 .periph_buses
= PL08X_AHB1
,
36 .periph_buses
= PL08X_AHB1
,
42 .periph_buses
= PL08X_AHB1
,
48 .periph_buses
= PL08X_AHB1
,
54 .periph_buses
= PL08X_AHB1
,
60 .periph_buses
= PL08X_AHB1
,
66 .periph_buses
= PL08X_AHB1
,
72 .periph_buses
= PL08X_AHB1
,
78 .periph_buses
= PL08X_AHB1
,
80 .bus_id
= "from_jpeg",
84 .periph_buses
= PL08X_AHB1
,
90 .periph_buses
= PL08X_AHB1
,
96 .periph_buses
= PL08X_AHB1
,
102 .periph_buses
= PL08X_AHB1
,
108 .periph_buses
= PL08X_AHB1
,
114 .periph_buses
= PL08X_AHB1
,
120 .periph_buses
= PL08X_AHB1
,
126 .periph_buses
= PL08X_AHB1
,
132 .periph_buses
= PL08X_AHB1
,
138 .periph_buses
= PL08X_AHB1
,
144 .periph_buses
= PL08X_AHB1
,
150 .periph_buses
= PL08X_AHB1
,
156 .periph_buses
= PL08X_AHB1
,
162 .periph_buses
= PL08X_AHB1
,
168 .periph_buses
= PL08X_AHB1
,
174 .periph_buses
= PL08X_AHB1
,
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
,
188 OF_DEV_AUXDATA("arm,pl080", SPEAR3XX_ICM3_DMA_BASE
, NULL
,
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
[] = {
208 static void __init
spear300_map_io(void)
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
,