Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions drivers/spi/spi-s3c64xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,17 @@ static void s3c64xx_flush_fifo(struct s3c64xx_spi_driver_data *sdd)
unsigned long loops;
u32 val;

writel(0, regs + S3C64XX_SPI_PACKET_CNT);

val = readl(regs + S3C64XX_SPI_CH_CFG);
val &= ~(S3C64XX_SPI_CH_RXCH_ON | S3C64XX_SPI_CH_TXCH_ON);
writel(val, regs + S3C64XX_SPI_CH_CFG);

/*
* Clear the count only with the channels off, as Google's driver does:
* with RXCH_ON set and PACKET_CNT_EN cleared the controller clocks
* freely, and with automatic chip select the slave sees those edges.
*/
writel(0, regs + S3C64XX_SPI_PACKET_CNT);

val = readl(regs + S3C64XX_SPI_CH_CFG);
val |= S3C64XX_SPI_CH_SW_RST;
val &= ~S3C64XX_SPI_CH_HS_EN;
Expand Down