Skip to content

Commit

Permalink
spi/s3c64xx: Enable GPIO /CS prior to starting hardware
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown committed Sep 30, 2013
1 parent 8c09daa commit 0f5a751
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/spi/spi-s3c64xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,9 @@ static int s3c64xx_spi_transfer_one_message(struct spi_master *master,
s3c64xx_spi_config(sdd);
}

/* Slave Select */
enable_cs(sdd, spi);

/* Polling method for xfers not bigger than FIFO capacity */
use_dma = 0;
if (!is_polling(sdd) &&
Expand All @@ -921,9 +924,6 @@ static int s3c64xx_spi_transfer_one_message(struct spi_master *master,

enable_datapath(sdd, spi, xfer, use_dma);

/* Slave Select */
enable_cs(sdd, spi);

/* Start the signals */
writel(0, sdd->regs + S3C64XX_SPI_SLAVE_SEL);

Expand Down

0 comments on commit 0f5a751

Please sign in to comment.