diff options
Diffstat (limited to 'arch/arm/mach-omap1/devices.c')
-rw-r--r-- | arch/arm/mach-omap1/devices.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index 23ded2d49600..a2d07aa75c9e 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/spi/spi.h> | ||
17 | 18 | ||
18 | #include <mach/hardware.h> | 19 | #include <mach/hardware.h> |
19 | #include <asm/mach/map.h> | 20 | #include <asm/mach/map.h> |
@@ -23,6 +24,7 @@ | |||
23 | #include <plat/mux.h> | 24 | #include <plat/mux.h> |
24 | #include <mach/gpio.h> | 25 | #include <mach/gpio.h> |
25 | #include <plat/mmc.h> | 26 | #include <plat/mmc.h> |
27 | #include <plat/omap7xx.h> | ||
26 | 28 | ||
27 | /*-------------------------------------------------------------------------*/ | 29 | /*-------------------------------------------------------------------------*/ |
28 | 30 | ||
@@ -196,6 +198,38 @@ void __init omap1_init_mmc(struct omap_mmc_platform_data **mmc_data, | |||
196 | 198 | ||
197 | /*-------------------------------------------------------------------------*/ | 199 | /*-------------------------------------------------------------------------*/ |
198 | 200 | ||
201 | /* OMAP7xx SPI support */ | ||
202 | #if defined(CONFIG_SPI_OMAP_100K) || defined(CONFIG_SPI_OMAP_100K_MODULE) | ||
203 | |||
204 | struct platform_device omap_spi1 = { | ||
205 | .name = "omap1_spi100k", | ||
206 | .id = 1, | ||
207 | }; | ||
208 | |||
209 | struct platform_device omap_spi2 = { | ||
210 | .name = "omap1_spi100k", | ||
211 | .id = 2, | ||
212 | }; | ||
213 | |||
214 | static void omap_init_spi100k(void) | ||
215 | { | ||
216 | omap_spi1.dev.platform_data = ioremap(OMAP7XX_SPI1_BASE, 0x7ff); | ||
217 | if (omap_spi1.dev.platform_data) | ||
218 | platform_device_register(&omap_spi1); | ||
219 | |||
220 | omap_spi2.dev.platform_data = ioremap(OMAP7XX_SPI2_BASE, 0x7ff); | ||
221 | if (omap_spi2.dev.platform_data) | ||
222 | platform_device_register(&omap_spi2); | ||
223 | } | ||
224 | |||
225 | #else | ||
226 | static inline void omap_init_spi100k(void) | ||
227 | { | ||
228 | } | ||
229 | #endif | ||
230 | |||
231 | /*-------------------------------------------------------------------------*/ | ||
232 | |||
199 | #if defined(CONFIG_OMAP_STI) | 233 | #if defined(CONFIG_OMAP_STI) |
200 | 234 | ||
201 | #define OMAP1_STI_BASE 0xfffea000 | 235 | #define OMAP1_STI_BASE 0xfffea000 |
@@ -263,6 +297,7 @@ static int __init omap1_init_devices(void) | |||
263 | 297 | ||
264 | omap_init_mbox(); | 298 | omap_init_mbox(); |
265 | omap_init_rtc(); | 299 | omap_init_rtc(); |
300 | omap_init_spi100k(); | ||
266 | omap_init_sti(); | 301 | omap_init_sti(); |
267 | 302 | ||
268 | return 0; | 303 | return 0; |