diff options
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500.c')
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 0e8fd135a57d..642b8e60d119 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 | ||
34 | static pin_cfg_t mop500_pins[] = { | 36 | static pin_cfg_t mop500_pins[] = { |
35 | /* SSP0 */ | 37 | /* SSP0 */ |
@@ -75,9 +77,27 @@ static struct ab8500_platform_data ab8500_platdata = { | |||
75 | .irq_base = MOP500_AB8500_IRQ_BASE, | 77 | .irq_base = MOP500_AB8500_IRQ_BASE, |
76 | }; | 78 | }; |
77 | 79 | ||
78 | static struct spi_board_info u8500_spi_devices[] = { | 80 | static struct resource ab8500_resources[] = { |
81 | [0] = { | ||
82 | .start = IRQ_AB8500, | ||
83 | .end = IRQ_AB8500, | ||
84 | .flags = IORESOURCE_IRQ | ||
85 | } | ||
86 | }; | ||
87 | |||
88 | struct platform_device ab8500_device = { | ||
89 | .name = "ab8500-i2c", | ||
90 | .id = 0, | ||
91 | .dev = { | ||
92 | .platform_data = &ab8500_platdata, | ||
93 | }, | ||
94 | .num_resources = 1, | ||
95 | .resource = ab8500_resources, | ||
96 | }; | ||
97 | |||
98 | static struct spi_board_info ab8500_spi_devices[] = { | ||
79 | { | 99 | { |
80 | .modalias = "ab8500", | 100 | .modalias = "ab8500-spi", |
81 | .controller_data = &ab4500_chip_info, | 101 | .controller_data = &ab4500_chip_info, |
82 | .platform_data = &ab8500_platdata, | 102 | .platform_data = &ab8500_platdata, |
83 | .max_speed_hz = 12000000, | 103 | .max_speed_hz = 12000000, |
@@ -163,8 +183,14 @@ static void __init u8500_init_machine(void) | |||
163 | 183 | ||
164 | platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs)); | 184 | platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs)); |
165 | 185 | ||
166 | spi_register_board_info(u8500_spi_devices, | 186 | mop500_sdi_init(); |
167 | ARRAY_SIZE(u8500_spi_devices)); | 187 | |
188 | /* If HW is early drop (ED) or V1.0 then use SPI to access AB8500 */ | ||
189 | if (cpu_is_u8500ed() || cpu_is_u8500v10()) | ||
190 | spi_register_board_info(ab8500_spi_devices, | ||
191 | ARRAY_SIZE(ab8500_spi_devices)); | ||
192 | else /* If HW is v.1.1 or later use I2C to access AB8500 */ | ||
193 | platform_device_register(&ab8500_device); | ||
168 | } | 194 | } |
169 | 195 | ||
170 | MACHINE_START(U8500, "ST-Ericsson MOP500 platform") | 196 | MACHINE_START(U8500, "ST-Ericsson MOP500 platform") |