diff mbox

[3/6] DaVinci: Update for SPI support on DM355 SOC

Message ID 1247501585-2392-1-git-send-email-s-paulraj@ti.com (mailing list archive)
State Superseded
Headers show

Commit Message

s-paulraj@ti.com July 13, 2009, 4:13 p.m. UTC
From: Sandeep Paulraj <s-paulraj@ti.com>

The patch does the following.

1) Minor change to DM355 SPI clocks, making it similar
to DM365
2) Passes platform data to the driver


Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
---
 arch/arm/mach-davinci/dm355.c |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
index b4d709a..d4e3859 100644
--- a/arch/arm/mach-davinci/dm355.c
+++ b/arch/arm/mach-davinci/dm355.c
@@ -31,7 +31,7 @@ 
 #include <mach/serial.h>
 #include <mach/common.h>
 #include <mach/asp.h>
-
+#include <mach/spi.h>
 #include "clock.h"
 #include "mux.h"
 
@@ -365,9 +365,9 @@  static struct davinci_clk dm355_clks[] = {
 	CLK(NULL, "asp1", &asp1_clk),
 	CLK("davinci_mmc.0", NULL, &mmcsd0_clk),
 	CLK("davinci_mmc.1", NULL, &mmcsd1_clk),
-	CLK(NULL, "spi0", &spi0_clk),
-	CLK(NULL, "spi1", &spi1_clk),
-	CLK(NULL, "spi2", &spi2_clk),
+	CLK("spi_davinci.0", NULL, &spi0_clk),
+	CLK("spi_davinci.1", NULL, &spi1_clk),
+	CLK("spi_davinci.2", NULL, &spi2_clk),
 	CLK(NULL, "gpio", &gpio_clk),
 	CLK(NULL, "aemif", &aemif_clk),
 	CLK(NULL, "pwm0", &pwm0_clk),
@@ -406,12 +406,22 @@  static struct resource dm355_spi0_resources[] = {
 	 */
 };
 
+static struct davinci_spi_platform_data dm355_spi0_pdata = {
+	.version = DAVINCI_SPI_VERSION_1,
+	.num_chipselect = 2,
+	.clk_internal	= 1,
+	.cs_hold	= 1,
+	.intr_level	= 0,
+	.poll_mode	= 1,
+};
+
 static struct platform_device dm355_spi0_device = {
 	.name = "spi_davinci",
 	.id = 0,
 	.dev = {
 		.dma_mask = &dm355_spi0_dma_mask,
 		.coherent_dma_mask = DMA_BIT_MASK(32),
+		.platform_data = &dm355_spi0_pdata,
 	},
 	.num_resources = ARRAY_SIZE(dm355_spi0_resources),
 	.resource = dm355_spi0_resources,