diff options
author | Kyoungil Kim <ki0351.kim@samsung.com> | 2012-05-23 08:29:51 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2012-12-14 19:49:34 -0500 |
commit | 7d859ff4937a22aabc0d3f352d1f515fb8b38528 (patch) | |
tree | 7786b4b67765ba0dbd62527013d15024e7aad451 /drivers/spi | |
parent | 6f38010d54a9dfd4b9c9e49a7184f84cc2281605 (diff) |
spi: Change FIFO flush operation and spi channel off
Setting SW_RST does TX/RX FIFO flush.
After FIFO flush, SW_RST should be cleared.
The above setting and clearing SW_RST operation should be done after spi channel off.
Signed-off-by: Kyoungil Kim <ki0351.kim@samsung.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-s3c64xx.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 88c3f5e51c36..ad93231a8038 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c | |||
@@ -215,6 +215,10 @@ static void flush_fifo(struct s3c64xx_spi_driver_data *sdd) | |||
215 | writel(0, regs + S3C64XX_SPI_PACKET_CNT); | 215 | writel(0, regs + S3C64XX_SPI_PACKET_CNT); |
216 | 216 | ||
217 | val = readl(regs + S3C64XX_SPI_CH_CFG); | 217 | val = readl(regs + S3C64XX_SPI_CH_CFG); |
218 | val &= ~(S3C64XX_SPI_CH_RXCH_ON | S3C64XX_SPI_CH_TXCH_ON); | ||
219 | writel(val, regs + S3C64XX_SPI_CH_CFG); | ||
220 | |||
221 | val = readl(regs + S3C64XX_SPI_CH_CFG); | ||
218 | val |= S3C64XX_SPI_CH_SW_RST; | 222 | val |= S3C64XX_SPI_CH_SW_RST; |
219 | val &= ~S3C64XX_SPI_CH_HS_EN; | 223 | val &= ~S3C64XX_SPI_CH_HS_EN; |
220 | writel(val, regs + S3C64XX_SPI_CH_CFG); | 224 | writel(val, regs + S3C64XX_SPI_CH_CFG); |
@@ -248,10 +252,6 @@ static void flush_fifo(struct s3c64xx_spi_driver_data *sdd) | |||
248 | val = readl(regs + S3C64XX_SPI_MODE_CFG); | 252 | val = readl(regs + S3C64XX_SPI_MODE_CFG); |
249 | val &= ~(S3C64XX_SPI_MODE_TXDMA_ON | S3C64XX_SPI_MODE_RXDMA_ON); | 253 | val &= ~(S3C64XX_SPI_MODE_TXDMA_ON | S3C64XX_SPI_MODE_RXDMA_ON); |
250 | writel(val, regs + S3C64XX_SPI_MODE_CFG); | 254 | writel(val, regs + S3C64XX_SPI_MODE_CFG); |
251 | |||
252 | val = readl(regs + S3C64XX_SPI_CH_CFG); | ||
253 | val &= ~(S3C64XX_SPI_CH_RXCH_ON | S3C64XX_SPI_CH_TXCH_ON); | ||
254 | writel(val, regs + S3C64XX_SPI_CH_CFG); | ||
255 | } | 255 | } |
256 | 256 | ||
257 | static void s3c64xx_spi_dmacb(void *data) | 257 | static void s3c64xx_spi_dmacb(void *data) |