aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/board-mop500.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-21 19:42:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-21 19:42:32 -0400
commitb5153163ed580e00c67bdfecb02b2e3843817b3e (patch)
treeb8c878601f07f5df8f694435857a5f3dcfd75482 /arch/arm/mach-ux500/board-mop500.c
parenta8cbf22559ceefdcdfac00701e8e6da7518b7e8e (diff)
parent6451d7783ba5ff24eb1a544eaa6665b890f30466 (diff)
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (278 commits) arm: remove machine_desc.io_pg_offst and .phys_io arm: use addruart macro to establish debug mappings arm: return both physical and virtual addresses from addruart arm/debug: consolidate addruart macros for CONFIG_DEBUG_ICEDCC ARM: make struct machine_desc definition coherent with its comment eukrea_mbimxsd-baseboard: Pass the correct GPIO to gpio_free cpuimx27: fix compile when ULPI is selected mach-pcm037_eet: fix compile errors Fixing ethernet driver compilation error for i.MX31 ADS board cpuimx51: update board support mx5: add cpuimx51sd module and its baseboard iomux-mx51: fix GPIO_1_xx 's IOMUX configuration imx-esdhc: update devices registration mx51: add resources for SD/MMC on i.MX51 iomux-mx51: fix SD1 and SD2's iomux configuration clock-mx51: rename CLOCK1 to CLOCK_CCGR for better readability clock-mx51: factorize clk_set_parent and clk_get_rate eukrea_mbimxsd: add support for DVI displays cpuimx25 & cpuimx35: fix OTG port registration in host mode i.MX31 and i.MX35 : fix errate TLSbo65953 and ENGcm09472 ...
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500.c')
-rw-r--r--arch/arm/mach-ux500/board-mop500.c36
1 files changed, 30 insertions, 6 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 219ae0ca4eef..fcb587f825cc 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -28,8 +28,10 @@
28#include <mach/hardware.h> 28#include <mach/hardware.h>
29#include <mach/setup.h> 29#include <mach/setup.h>
30#include <mach/devices.h> 30#include <mach/devices.h>
31#include <mach/irqs.h>
31 32
32#include "pins-db8500.h" 33#include "pins-db8500.h"
34#include "board-mop500.h"
33 35
34static pin_cfg_t mop500_pins[] = { 36static pin_cfg_t mop500_pins[] = {
35 /* SSP0 */ 37 /* SSP0 */
@@ -69,9 +71,27 @@ static struct ab8500_platform_data ab8500_platdata = {
69 .irq_base = MOP500_AB8500_IRQ_BASE, 71 .irq_base = MOP500_AB8500_IRQ_BASE,
70}; 72};
71 73
72static struct spi_board_info u8500_spi_devices[] = { 74static struct resource ab8500_resources[] = {
75 [0] = {
76 .start = IRQ_AB8500,
77 .end = IRQ_AB8500,
78 .flags = IORESOURCE_IRQ
79 }
80};
81
82struct platform_device ab8500_device = {
83 .name = "ab8500-i2c",
84 .id = 0,
85 .dev = {
86 .platform_data = &ab8500_platdata,
87 },
88 .num_resources = 1,
89 .resource = ab8500_resources,
90};
91
92static struct spi_board_info ab8500_spi_devices[] = {
73 { 93 {
74 .modalias = "ab8500", 94 .modalias = "ab8500-spi",
75 .controller_data = &ab4500_chip_info, 95 .controller_data = &ab4500_chip_info,
76 .platform_data = &ab8500_platdata, 96 .platform_data = &ab8500_platdata,
77 .max_speed_hz = 12000000, 97 .max_speed_hz = 12000000,
@@ -157,14 +177,18 @@ static void __init u8500_init_machine(void)
157 177
158 platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs)); 178 platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs));
159 179
160 spi_register_board_info(u8500_spi_devices, 180 mop500_sdi_init();
161 ARRAY_SIZE(u8500_spi_devices)); 181
182 /* If HW is early drop (ED) or V1.0 then use SPI to access AB8500 */
183 if (cpu_is_u8500ed() || cpu_is_u8500v10())
184 spi_register_board_info(ab8500_spi_devices,
185 ARRAY_SIZE(ab8500_spi_devices));
186 else /* If HW is v.1.1 or later use I2C to access AB8500 */
187 platform_device_register(&ab8500_device);
162} 188}
163 189
164MACHINE_START(U8500, "ST-Ericsson MOP500 platform") 190MACHINE_START(U8500, "ST-Ericsson MOP500 platform")
165 /* Maintainer: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> */ 191 /* Maintainer: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> */
166 .phys_io = U8500_UART2_BASE,
167 .io_pg_offst = (IO_ADDRESS(U8500_UART2_BASE) >> 18) & 0xfffc,
168 .boot_params = 0x100, 192 .boot_params = 0x100,
169 .map_io = u8500_map_io, 193 .map_io = u8500_map_io,
170 .init_irq = ux500_init_irq, 194 .init_irq = ux500_init_irq,