diff options
author | Brian Niebuhr <bniebuhr@efjohnson.com> | 2010-08-16 05:35:51 -0400 |
---|---|---|
committer | Sekhar Nori <nsekhar@ti.com> | 2010-11-18 08:08:26 -0500 |
commit | 53a31b07c5aea4001bbb36ddd5ef2addffc7ccbd (patch) | |
tree | d451eb203e78e4e10cb0d4fbc8355d5f6053a834 /arch/arm | |
parent | 472880c73da124b6cb5cbc31a36754aa62935afe (diff) |
spi: davinci: make chip-slect specific parameters really chip-select specific
Some chip-select specific paramterers like wdelay, parity, usage of
chip-select timers (and the actual timer values) are included in
platform data forcing the same behaviour across all chip-selects.
Create a new davinci_spi_config data structure which can be passed
along using controller_data member of spi_device data structure
on a per-device basis.
Signed-off-by: Brian Niebuhr <bniebuhr@efjohnson.com>
Tested-By: Michael Williamson <michael.williamson@criticallink.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-davinci/dm355.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-davinci/dm365.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/spi.h | 13 |
3 files changed, 8 insertions, 11 deletions
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index 6a76dfa60ef7..a6d9b72190ff 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c | |||
@@ -413,10 +413,7 @@ static struct davinci_spi_platform_data dm355_spi0_pdata = { | |||
413 | .version = SPI_VERSION_1, | 413 | .version = SPI_VERSION_1, |
414 | .num_chipselect = 2, | 414 | .num_chipselect = 2, |
415 | .clk_internal = 1, | 415 | .clk_internal = 1, |
416 | .intr_level = 0, | ||
417 | .poll_mode = 1, /* 0 -> interrupt mode 1-> polling mode */ | 416 | .poll_mode = 1, /* 0 -> interrupt mode 1-> polling mode */ |
418 | .c2tdelay = 0, | ||
419 | .t2cdelay = 0, | ||
420 | }; | 417 | }; |
421 | static struct platform_device dm355_spi0_device = { | 418 | static struct platform_device dm355_spi0_device = { |
422 | .name = "spi_davinci", | 419 | .name = "spi_davinci", |
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index cd623db8d7d7..80dd159134cb 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c | |||
@@ -626,10 +626,7 @@ static struct davinci_spi_platform_data dm365_spi0_pdata = { | |||
626 | .version = SPI_VERSION_1, | 626 | .version = SPI_VERSION_1, |
627 | .num_chipselect = 2, | 627 | .num_chipselect = 2, |
628 | .clk_internal = 1, | 628 | .clk_internal = 1, |
629 | .intr_level = 0, | ||
630 | .poll_mode = 1, /* 0 -> interrupt mode 1-> polling mode */ | 629 | .poll_mode = 1, /* 0 -> interrupt mode 1-> polling mode */ |
631 | .c2tdelay = 0, | ||
632 | .t2cdelay = 0, | ||
633 | }; | 630 | }; |
634 | 631 | ||
635 | static struct resource dm365_spi0_resources[] = { | 632 | static struct resource dm365_spi0_resources[] = { |
diff --git a/arch/arm/mach-davinci/include/mach/spi.h b/arch/arm/mach-davinci/include/mach/spi.h index fe699140269c..29c19c425b02 100644 --- a/arch/arm/mach-davinci/include/mach/spi.h +++ b/arch/arm/mach-davinci/include/mach/spi.h | |||
@@ -29,17 +29,20 @@ enum { | |||
29 | struct davinci_spi_platform_data { | 29 | struct davinci_spi_platform_data { |
30 | u8 version; | 30 | u8 version; |
31 | u8 num_chipselect; | 31 | u8 num_chipselect; |
32 | u8 wdelay; | ||
33 | u8 odd_parity; | ||
34 | u8 parity_enable; | ||
35 | u8 timer_disable; | ||
36 | u8 clk_internal; | 32 | u8 clk_internal; |
37 | u8 intr_level; | 33 | u8 intr_level; |
38 | u8 poll_mode; | 34 | u8 poll_mode; |
39 | u8 use_dma; | 35 | u8 use_dma; |
36 | u8 *chip_sel; | ||
37 | }; | ||
38 | |||
39 | struct davinci_spi_config { | ||
40 | u8 wdelay; | ||
41 | u8 odd_parity; | ||
42 | u8 parity_enable; | ||
43 | u8 timer_disable; | ||
40 | u8 c2tdelay; | 44 | u8 c2tdelay; |
41 | u8 t2cdelay; | 45 | u8 t2cdelay; |
42 | u8 *chip_sel; | ||
43 | }; | 46 | }; |
44 | 47 | ||
45 | #endif /* __ARCH_ARM_DAVINCI_SPI_H */ | 48 | #endif /* __ARCH_ARM_DAVINCI_SPI_H */ |