diff options
| author | Mark Brown <broonie@linaro.org> | 2013-09-27 15:38:01 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@linaro.org> | 2013-09-30 07:53:39 -0400 |
| commit | 0f5a751ace250097d3ad7835df7d376f21f44509 (patch) | |
| tree | 635c5f9aa15f2839b08d208c6cb88cec9a51ee7a | |
| parent | 8c09daa1c963e2ab58029520dd2f3d54184d7258 (diff) | |
spi/s3c64xx: Enable GPIO /CS prior to starting hardware
To help with bisection of future refactoring to share more of the code for
handling a spi_message pull the enabling of GPIO based /CS prior to all
the hardware setup for starting a transfer.
Signed-off-by: Mark Brown <broonie@linaro.org>
| -rw-r--r-- | drivers/spi/spi-s3c64xx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 2ab96fb28d22..e6312322f66a 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c | |||
| @@ -906,6 +906,9 @@ static int s3c64xx_spi_transfer_one_message(struct spi_master *master, | |||
| 906 | s3c64xx_spi_config(sdd); | 906 | s3c64xx_spi_config(sdd); |
| 907 | } | 907 | } |
| 908 | 908 | ||
| 909 | /* Slave Select */ | ||
| 910 | enable_cs(sdd, spi); | ||
| 911 | |||
| 909 | /* Polling method for xfers not bigger than FIFO capacity */ | 912 | /* Polling method for xfers not bigger than FIFO capacity */ |
| 910 | use_dma = 0; | 913 | use_dma = 0; |
| 911 | if (!is_polling(sdd) && | 914 | if (!is_polling(sdd) && |
| @@ -921,9 +924,6 @@ static int s3c64xx_spi_transfer_one_message(struct spi_master *master, | |||
| 921 | 924 | ||
| 922 | enable_datapath(sdd, spi, xfer, use_dma); | 925 | enable_datapath(sdd, spi, xfer, use_dma); |
| 923 | 926 | ||
| 924 | /* Slave Select */ | ||
| 925 | enable_cs(sdd, spi); | ||
| 926 | |||
| 927 | /* Start the signals */ | 927 | /* Start the signals */ |
| 928 | writel(0, sdd->regs + S3C64XX_SPI_SLAVE_SEL); | 928 | writel(0, sdd->regs + S3C64XX_SPI_SLAVE_SEL); |
| 929 | 929 | ||
