viresh kumar | bc4e814 | 2010-04-01 12:30:58 +0100 | [diff] [blame] | 1 | /* |
| 2 | * arch/arm/mach-spear3xx/spear320_evb.c |
| 3 | * |
| 4 | * SPEAr320 evaluation board source file |
| 5 | * |
| 6 | * Copyright (C) 2009 ST Microelectronics |
| 7 | * Viresh Kumar<viresh.kumar@st.com> |
| 8 | * |
| 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. |
| 12 | */ |
| 13 | |
| 14 | #include <asm/mach/arch.h> |
| 15 | #include <asm/mach-types.h> |
| 16 | #include <mach/generic.h> |
| 17 | #include <mach/spear.h> |
| 18 | |
viresh kumar | 70f4c0b | 2010-04-01 12:31:29 +0100 | [diff] [blame] | 19 | /* padmux devices to enable */ |
| 20 | static struct pmx_dev *pmx_devs[] = { |
| 21 | /* spear3xx specific devices */ |
| 22 | &pmx_i2c, |
| 23 | &pmx_ssp, |
| 24 | &pmx_mii, |
| 25 | &pmx_uart0, |
| 26 | |
| 27 | /* spear320 specific devices */ |
| 28 | &pmx_fsmc, |
| 29 | &pmx_sdio, |
| 30 | &pmx_i2s, |
| 31 | &pmx_uart1, |
| 32 | &pmx_uart2, |
| 33 | &pmx_can, |
| 34 | &pmx_pwm0, |
| 35 | &pmx_pwm1, |
| 36 | &pmx_pwm2, |
| 37 | &pmx_mii1, |
| 38 | }; |
| 39 | |
viresh kumar | bc4e814 | 2010-04-01 12:30:58 +0100 | [diff] [blame] | 40 | static struct amba_device *amba_devs[] __initdata = { |
| 41 | /* spear3xx specific devices */ |
| 42 | &gpio_device, |
| 43 | &uart_device, |
| 44 | |
| 45 | /* spear320 specific devices */ |
| 46 | }; |
| 47 | |
| 48 | static struct platform_device *plat_devs[] __initdata = { |
| 49 | /* spear3xx specific devices */ |
| 50 | |
| 51 | /* spear320 specific devices */ |
| 52 | }; |
| 53 | |
| 54 | static void __init spear320_evb_init(void) |
| 55 | { |
| 56 | unsigned int i; |
| 57 | |
viresh kumar | 53688c5 | 2011-02-16 07:40:30 +0100 | [diff] [blame^] | 58 | /* padmux initialization, must be done before spear320_init */ |
viresh kumar | 70f4c0b | 2010-04-01 12:31:29 +0100 | [diff] [blame] | 59 | pmx_driver.mode = &auto_net_mii_mode; |
| 60 | pmx_driver.devs = pmx_devs; |
| 61 | pmx_driver.devs_count = ARRAY_SIZE(pmx_devs); |
viresh kumar | 53688c5 | 2011-02-16 07:40:30 +0100 | [diff] [blame^] | 62 | |
| 63 | /* call spear320 machine init function */ |
| 64 | spear320_init(); |
viresh kumar | 70f4c0b | 2010-04-01 12:31:29 +0100 | [diff] [blame] | 65 | |
viresh kumar | bc4e814 | 2010-04-01 12:30:58 +0100 | [diff] [blame] | 66 | /* Add Platform Devices */ |
| 67 | platform_add_devices(plat_devs, ARRAY_SIZE(plat_devs)); |
| 68 | |
| 69 | /* Add Amba Devices */ |
| 70 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) |
| 71 | amba_device_register(amba_devs[i], &iomem_resource); |
| 72 | } |
| 73 | |
| 74 | MACHINE_START(SPEAR320, "ST-SPEAR320-EVB") |
| 75 | .boot_params = 0x00000100, |
| 76 | .map_io = spear3xx_map_io, |
| 77 | .init_irq = spear3xx_init_irq, |
| 78 | .timer = &spear_sys_timer, |
| 79 | .init_machine = spear320_evb_init, |
| 80 | MACHINE_END |