summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Niebuhr <bniebuhr@efjohnson.com>2010-08-12 12:49:05 +0530
committerSekhar Nori <nsekhar@ti.com>2010-11-18 18:38:24 +0530
commit843a713bc53d04f8fac46ddd8693a2cc0422ca5e (patch)
treec433420bbded315631d91376f04a145ab03a2a6d
parent50356dd7c1f6338588af6a745649a718f16fe453 (diff)
downloadop-kernel-dev-843a713bc53d04f8fac46ddd8693a2cc0422ca5e.zip
op-kernel-dev-843a713bc53d04f8fac46ddd8693a2cc0422ca5e.tar.gz
spi: davinci: set chip-select mode in SPIDEF only once
Quit writing the same constant value determining the chip-select mode when no transmissions are in progress in davinci_spi_chipelect(). Instead just setup the SPIDEF register once during probe. Signed-off-by: Brian Niebuhr <bniebuhr@efjohnson.com> Tested-By: Michael Williamson <michael.williamson@criticallink.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
-rw-r--r--drivers/spi/davinci_spi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c
index 76decda..d6b6a49 100644
--- a/drivers/spi/davinci_spi.c
+++ b/drivers/spi/davinci_spi.c
@@ -245,8 +245,6 @@ static void davinci_spi_chipselect(struct spi_device *spi, int value)
* line for the controller
*/
if (value == BITBANG_CS_INACTIVE) {
- set_io_bits(davinci_spi->base + SPIDEF, CS_DEFAULT);
-
data1_reg_val |= CS_DEFAULT << SPIDAT1_CSNR_SHIFT;
iowrite32(data1_reg_val, davinci_spi->base + SPIDAT1);
@@ -1132,6 +1130,8 @@ static int davinci_spi_probe(struct platform_device *pdev)
clear_io_bits(davinci_spi->base + SPIGCR1,
SPIGCR1_CLKMOD_MASK);
+ iowrite32(CS_DEFAULT, davinci_spi->base + SPIDEF);
+
/* master mode default */
set_io_bits(davinci_spi->base + SPIGCR1, SPIGCR1_MASTER_MASK);
OpenPOWER on IntegriCloud