2010-04-01 13:30:58 +02:00
|
|
|
/*
|
|
|
|
* arch/arm/mach-spear3xx/spear320_evb.c
|
|
|
|
*
|
|
|
|
* SPEAr320 evaluation board source file
|
|
|
|
*
|
|
|
|
* Copyright (C) 2009 ST Microelectronics
|
|
|
|
* Viresh Kumar<viresh.kumar@st.com>
|
|
|
|
*
|
|
|
|
* This file is licensed under the terms of the GNU General Public
|
|
|
|
* License version 2. This program is licensed "as is" without any
|
|
|
|
* warranty of any kind, whether express or implied.
|
|
|
|
*/
|
|
|
|
|
2011-09-27 21:35:14 +02:00
|
|
|
#include <asm/hardware/vic.h>
|
2010-04-01 13:30:58 +02:00
|
|
|
#include <asm/mach/arch.h>
|
|
|
|
#include <asm/mach-types.h>
|
|
|
|
#include <mach/generic.h>
|
2011-03-07 05:57:02 +01:00
|
|
|
#include <mach/hardware.h>
|
2010-04-01 13:30:58 +02:00
|
|
|
|
2010-04-01 13:31:29 +02:00
|
|
|
/* padmux devices to enable */
|
|
|
|
static struct pmx_dev *pmx_devs[] = {
|
|
|
|
/* spear3xx specific devices */
|
2011-05-20 09:34:22 +02:00
|
|
|
&spear3xx_pmx_i2c,
|
|
|
|
&spear3xx_pmx_ssp,
|
|
|
|
&spear3xx_pmx_mii,
|
|
|
|
&spear3xx_pmx_uart0,
|
2010-04-01 13:31:29 +02:00
|
|
|
|
|
|
|
/* spear320 specific devices */
|
2011-05-20 09:34:22 +02:00
|
|
|
&spear320_pmx_fsmc,
|
|
|
|
&spear320_pmx_sdhci,
|
|
|
|
&spear320_pmx_i2s,
|
|
|
|
&spear320_pmx_uart1,
|
|
|
|
&spear320_pmx_uart2,
|
|
|
|
&spear320_pmx_can,
|
|
|
|
&spear320_pmx_pwm0,
|
|
|
|
&spear320_pmx_pwm1,
|
|
|
|
&spear320_pmx_pwm2,
|
|
|
|
&spear320_pmx_mii1,
|
2010-04-01 13:31:29 +02:00
|
|
|
};
|
|
|
|
|
2010-04-01 13:30:58 +02:00
|
|
|
static struct amba_device *amba_devs[] __initdata = {
|
|
|
|
/* spear3xx specific devices */
|
2011-05-20 09:34:23 +02:00
|
|
|
&spear3xx_gpio_device,
|
|
|
|
&spear3xx_uart_device,
|
2010-04-01 13:30:58 +02:00
|
|
|
|
|
|
|
/* spear320 specific devices */
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device *plat_devs[] __initdata = {
|
|
|
|
/* spear3xx specific devices */
|
|
|
|
|
|
|
|
/* spear320 specific devices */
|
|
|
|
};
|
|
|
|
|
|
|
|
static void __init spear320_evb_init(void)
|
|
|
|
{
|
|
|
|
unsigned int i;
|
|
|
|
|
2011-02-16 07:40:30 +01:00
|
|
|
/* call spear320 machine init function */
|
2011-05-20 09:34:22 +02:00
|
|
|
spear320_init(&spear320_auto_net_mii_mode, pmx_devs,
|
|
|
|
ARRAY_SIZE(pmx_devs));
|
2010-04-01 13:31:29 +02:00
|
|
|
|
2010-04-01 13:30:58 +02:00
|
|
|
/* Add Platform Devices */
|
|
|
|
platform_add_devices(plat_devs, ARRAY_SIZE(plat_devs));
|
|
|
|
|
|
|
|
/* Add Amba Devices */
|
|
|
|
for (i = 0; i < ARRAY_SIZE(amba_devs); i++)
|
|
|
|
amba_device_register(amba_devs[i], &iomem_resource);
|
|
|
|
}
|
|
|
|
|
|
|
|
MACHINE_START(SPEAR320, "ST-SPEAR320-EVB")
|
2011-07-06 04:38:17 +02:00
|
|
|
.atag_offset = 0x100,
|
2010-04-01 13:30:58 +02:00
|
|
|
.map_io = spear3xx_map_io,
|
|
|
|
.init_irq = spear3xx_init_irq,
|
2011-09-27 21:35:14 +02:00
|
|
|
.handle_irq = vic_handle_irq,
|
2011-02-16 07:40:32 +01:00
|
|
|
.timer = &spear3xx_timer,
|
2010-04-01 13:30:58 +02:00
|
|
|
.init_machine = spear320_evb_init,
|
2011-11-05 22:10:37 +01:00
|
|
|
.restart = spear_restart,
|
2010-04-01 13:30:58 +02:00
|
|
|
MACHINE_END
|