aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap2/devices.c29
-rw-r--r--drivers/spi/omap2_mcspi.c10
2 files changed, 29 insertions, 10 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 92009a4c6c86..bcfcfc7fdb9b 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -257,6 +257,11 @@ static inline void omap_init_sti(void) {}
257#define OMAP2_MCSPI3_BASE 0x480b8000 257#define OMAP2_MCSPI3_BASE 0x480b8000
258#define OMAP2_MCSPI4_BASE 0x480ba000 258#define OMAP2_MCSPI4_BASE 0x480ba000
259 259
260#define OMAP4_MCSPI1_BASE 0x48098100
261#define OMAP4_MCSPI2_BASE 0x4809a100
262#define OMAP4_MCSPI3_BASE 0x480b8100
263#define OMAP4_MCSPI4_BASE 0x480ba100
264
260static struct omap2_mcspi_platform_config omap2_mcspi1_config = { 265static struct omap2_mcspi_platform_config omap2_mcspi1_config = {
261 .num_cs = 4, 266 .num_cs = 4,
262}; 267};
@@ -301,7 +306,8 @@ static struct platform_device omap2_mcspi2 = {
301 }, 306 },
302}; 307};
303 308
304#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) 309#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) || \
310 defined(CONFIG_ARCH_OMAP4)
305static struct omap2_mcspi_platform_config omap2_mcspi3_config = { 311static struct omap2_mcspi_platform_config omap2_mcspi3_config = {
306 .num_cs = 2, 312 .num_cs = 2,
307}; 313};
@@ -325,7 +331,7 @@ static struct platform_device omap2_mcspi3 = {
325}; 331};
326#endif 332#endif
327 333
328#ifdef CONFIG_ARCH_OMAP3 334#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
329static struct omap2_mcspi_platform_config omap2_mcspi4_config = { 335static struct omap2_mcspi_platform_config omap2_mcspi4_config = {
330 .num_cs = 1, 336 .num_cs = 1,
331}; 337};
@@ -351,14 +357,25 @@ static struct platform_device omap2_mcspi4 = {
351 357
352static void omap_init_mcspi(void) 358static void omap_init_mcspi(void)
353{ 359{
360 if (cpu_is_omap44xx()) {
361 omap2_mcspi1_resources[0].start = OMAP4_MCSPI1_BASE;
362 omap2_mcspi1_resources[0].end = OMAP4_MCSPI1_BASE + 0xff;
363 omap2_mcspi2_resources[0].start = OMAP4_MCSPI2_BASE;
364 omap2_mcspi2_resources[0].end = OMAP4_MCSPI2_BASE + 0xff;
365 omap2_mcspi3_resources[0].start = OMAP4_MCSPI3_BASE;
366 omap2_mcspi3_resources[0].end = OMAP4_MCSPI3_BASE + 0xff;
367 omap2_mcspi4_resources[0].start = OMAP4_MCSPI4_BASE;
368 omap2_mcspi4_resources[0].end = OMAP4_MCSPI4_BASE + 0xff;
369 }
354 platform_device_register(&omap2_mcspi1); 370 platform_device_register(&omap2_mcspi1);
355 platform_device_register(&omap2_mcspi2); 371 platform_device_register(&omap2_mcspi2);
356#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) 372#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) || \
357 if (cpu_is_omap2430() || cpu_is_omap343x()) 373 defined(CONFIG_ARCH_OMAP4)
374 if (cpu_is_omap2430() || cpu_is_omap343x() || cpu_is_omap44xx())
358 platform_device_register(&omap2_mcspi3); 375 platform_device_register(&omap2_mcspi3);
359#endif 376#endif
360#ifdef CONFIG_ARCH_OMAP3 377#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
361 if (cpu_is_omap343x()) 378 if (cpu_is_omap343x() || cpu_is_omap44xx())
362 platform_device_register(&omap2_mcspi4); 379 platform_device_register(&omap2_mcspi4);
363#endif 380#endif
364} 381}
diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c
index 85b7aea73374..ba1a872b221e 100644
--- a/drivers/spi/omap2_mcspi.c
+++ b/drivers/spi/omap2_mcspi.c
@@ -1014,7 +1014,8 @@ static u8 __initdata spi2_txdma_id[] = {
1014 OMAP24XX_DMA_SPI2_TX1, 1014 OMAP24XX_DMA_SPI2_TX1,
1015}; 1015};
1016 1016
1017#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP34XX) 1017#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP34XX) \
1018 || defined(CONFIG_ARCH_OMAP4)
1018static u8 __initdata spi3_rxdma_id[] = { 1019static u8 __initdata spi3_rxdma_id[] = {
1019 OMAP24XX_DMA_SPI3_RX0, 1020 OMAP24XX_DMA_SPI3_RX0,
1020 OMAP24XX_DMA_SPI3_RX1, 1021 OMAP24XX_DMA_SPI3_RX1,
@@ -1026,7 +1027,7 @@ static u8 __initdata spi3_txdma_id[] = {
1026}; 1027};
1027#endif 1028#endif
1028 1029
1029#ifdef CONFIG_ARCH_OMAP3 1030#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
1030static u8 __initdata spi4_rxdma_id[] = { 1031static u8 __initdata spi4_rxdma_id[] = {
1031 OMAP34XX_DMA_SPI4_RX0, 1032 OMAP34XX_DMA_SPI4_RX0,
1032}; 1033};
@@ -1056,14 +1057,15 @@ static int __init omap2_mcspi_probe(struct platform_device *pdev)
1056 txdma_id = spi2_txdma_id; 1057 txdma_id = spi2_txdma_id;
1057 num_chipselect = 2; 1058 num_chipselect = 2;
1058 break; 1059 break;
1059#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) 1060#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) \
1061 || defined(CONFIG_ARCH_OMAP4)
1060 case 3: 1062 case 3:
1061 rxdma_id = spi3_rxdma_id; 1063 rxdma_id = spi3_rxdma_id;
1062 txdma_id = spi3_txdma_id; 1064 txdma_id = spi3_txdma_id;
1063 num_chipselect = 2; 1065 num_chipselect = 2;
1064 break; 1066 break;
1065#endif 1067#endif
1066#ifdef CONFIG_ARCH_OMAP3 1068#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
1067 case 4: 1069 case 4:
1068 rxdma_id = spi4_rxdma_id; 1070 rxdma_id = spi4_rxdma_id;
1069 txdma_id = spi4_txdma_id; 1071 txdma_id = spi4_txdma_id;