aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSandeep Paulraj <s-paulraj@ti.com>2010-02-01 09:51:15 -0500
committerKevin Hilman <khilman@deeprootsystems.com>2010-03-01 13:20:23 -0500
commit15e865859a9e65a3f39e95bcb7ee72d0645b9a0e (patch)
tree988266cdd865c94e269ed8b5e962d45d79df303c /arch
parent8e2a0013c2bafd623d27b35364cbf28d4a0dbe55 (diff)
DaVinci DM355: Modifications to DM355 SPI support
This patch does the following 1) Minor change to the SPI clocks making it similar to DM365. 2) Changing the interrupt used by SPI0 3) Adding EDMA resources that can be used by SPI0 4) Adding platform specific data. Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-davinci/dm355.c39
1 files changed, 28 insertions, 11 deletions
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
index 2cdd8740aad9..36e7213779e8 100644
--- a/arch/arm/mach-davinci/dm355.c
+++ b/arch/arm/mach-davinci/dm355.c
@@ -29,6 +29,7 @@
29#include <mach/serial.h> 29#include <mach/serial.h>
30#include <mach/common.h> 30#include <mach/common.h>
31#include <mach/asp.h> 31#include <mach/asp.h>
32#include <mach/spi.h>
32 33
33#include "clock.h" 34#include "clock.h"
34#include "mux.h" 35#include "mux.h"
@@ -363,9 +364,9 @@ static struct clk_lookup dm355_clks[] = {
363 CLK("davinci-asp.1", NULL, &asp1_clk), 364 CLK("davinci-asp.1", NULL, &asp1_clk),
364 CLK("davinci_mmc.0", NULL, &mmcsd0_clk), 365 CLK("davinci_mmc.0", NULL, &mmcsd0_clk),
365 CLK("davinci_mmc.1", NULL, &mmcsd1_clk), 366 CLK("davinci_mmc.1", NULL, &mmcsd1_clk),
366 CLK(NULL, "spi0", &spi0_clk), 367 CLK("spi_davinci.0", NULL, &spi0_clk),
367 CLK(NULL, "spi1", &spi1_clk), 368 CLK("spi_davinci.1", NULL, &spi1_clk),
368 CLK(NULL, "spi2", &spi2_clk), 369 CLK("spi_davinci.2", NULL, &spi2_clk),
369 CLK(NULL, "gpio", &gpio_clk), 370 CLK(NULL, "gpio", &gpio_clk),
370 CLK(NULL, "aemif", &aemif_clk), 371 CLK(NULL, "aemif", &aemif_clk),
371 CLK(NULL, "pwm0", &pwm0_clk), 372 CLK(NULL, "pwm0", &pwm0_clk),
@@ -392,24 +393,40 @@ static struct resource dm355_spi0_resources[] = {
392 .flags = IORESOURCE_MEM, 393 .flags = IORESOURCE_MEM,
393 }, 394 },
394 { 395 {
395 .start = IRQ_DM355_SPINT0_1, 396 .start = IRQ_DM355_SPINT0_0,
396 .flags = IORESOURCE_IRQ, 397 .flags = IORESOURCE_IRQ,
397 }, 398 },
398 /* Not yet used, so not included: 399 {
399 * IORESOURCE_IRQ: 400 .start = 17,
400 * - IRQ_DM355_SPINT0_0 401 .flags = IORESOURCE_DMA,
401 * IORESOURCE_DMA: 402 },
402 * - DAVINCI_DMA_SPI_SPIX 403 {
403 * - DAVINCI_DMA_SPI_SPIR 404 .start = 16,
404 */ 405 .flags = IORESOURCE_DMA,
406 },
407 {
408 .start = EVENTQ_1,
409 .flags = IORESOURCE_DMA,
410 },
405}; 411};
406 412
413static struct davinci_spi_platform_data dm355_spi0_pdata = {
414 .version = SPI_VERSION_1,
415 .num_chipselect = 2,
416 .clk_internal = 1,
417 .cs_hold = 1,
418 .intr_level = 0,
419 .poll_mode = 1, /* 0 -> interrupt mode 1-> polling mode */
420 .c2tdelay = 0,
421 .t2cdelay = 0,
422};
407static struct platform_device dm355_spi0_device = { 423static struct platform_device dm355_spi0_device = {
408 .name = "spi_davinci", 424 .name = "spi_davinci",
409 .id = 0, 425 .id = 0,
410 .dev = { 426 .dev = {
411 .dma_mask = &dm355_spi0_dma_mask, 427 .dma_mask = &dm355_spi0_dma_mask,
412 .coherent_dma_mask = DMA_BIT_MASK(32), 428 .coherent_dma_mask = DMA_BIT_MASK(32),
429 .platform_data = &dm355_spi0_pdata,
413 }, 430 },
414 .num_resources = ARRAY_SIZE(dm355_spi0_resources), 431 .num_resources = ARRAY_SIZE(dm355_spi0_resources),
415 .resource = dm355_spi0_resources, 432 .resource = dm355_spi0_resources,