1 // SPDX-License-Identifier: GPL-2.0-only
3 * arch/arm/mach-spear3xx/spear300.c
5 * SPEAr300 machine source file
7 * Copyright (C) 2009-2012 ST Microelectronics
8 * Viresh Kumar <vireshk@kernel.org>
11 #define pr_fmt(fmt) "SPEAr300: " fmt
13 #include <linux/amba/pl08x.h>
14 #include <linux/of_platform.h>
15 #include <asm/mach/arch.h>
19 /* DMAC platform data's slave info */
20 struct pl08x_channel_data spear300_dma_info
[] = {
26 .periph_buses
= PL08X_AHB1
,
32 .periph_buses
= PL08X_AHB1
,
38 .periph_buses
= PL08X_AHB1
,
44 .periph_buses
= PL08X_AHB1
,
50 .periph_buses
= PL08X_AHB1
,
56 .periph_buses
= PL08X_AHB1
,
62 .periph_buses
= PL08X_AHB1
,
68 .periph_buses
= PL08X_AHB1
,
74 .periph_buses
= PL08X_AHB1
,
76 .bus_id
= "from_jpeg",
80 .periph_buses
= PL08X_AHB1
,
86 .periph_buses
= PL08X_AHB1
,
92 .periph_buses
= PL08X_AHB1
,
98 .periph_buses
= PL08X_AHB1
,
104 .periph_buses
= PL08X_AHB1
,
110 .periph_buses
= PL08X_AHB1
,
116 .periph_buses
= PL08X_AHB1
,
122 .periph_buses
= PL08X_AHB1
,
128 .periph_buses
= PL08X_AHB1
,
134 .periph_buses
= PL08X_AHB1
,
140 .periph_buses
= PL08X_AHB1
,
146 .periph_buses
= PL08X_AHB1
,
152 .periph_buses
= PL08X_AHB1
,
158 .periph_buses
= PL08X_AHB1
,
164 .periph_buses
= PL08X_AHB1
,
170 .periph_buses
= PL08X_AHB1
,
176 .periph_buses
= PL08X_AHB1
,
180 /* Add SPEAr300 auxdata to pass platform data */
181 static struct of_dev_auxdata spear300_auxdata_lookup
[] __initdata
= {
182 OF_DEV_AUXDATA("arm,pl022", SPEAR3XX_ICM1_SSP_BASE
, NULL
,
184 OF_DEV_AUXDATA("arm,pl080", SPEAR_ICM3_DMA_BASE
, NULL
,
189 static void __init
spear300_dt_init(void)
191 pl080_plat_data
.slave_channels
= spear300_dma_info
;
192 pl080_plat_data
.num_slave_channels
= ARRAY_SIZE(spear300_dma_info
);
194 of_platform_default_populate(NULL
, spear300_auxdata_lookup
, NULL
);
197 static const char * const spear300_dt_board_compat
[] = {
203 static void __init
spear300_map_io(void)
208 DT_MACHINE_START(SPEAR300_DT
, "ST SPEAr300 SoC with Flattened Device Tree")
209 .map_io
= spear300_map_io
,
210 .init_time
= spear3xx_timer_init
,
211 .init_machine
= spear300_dt_init
,
212 .restart
= spear_restart
,
213 .dt_compat
= spear300_dt_board_compat
,