Skip to contentSkip to conversation

spi: dw-mid: fix FIFO size

PATCH Applied Andy Shevchenko 3 participants 4 messages Jan 2, 2015 – Jan 5, 2015 1 message not in the archive SPI

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 spi: dw-mid: fix FIFO size

The FIFO size is 40 accordingly to the specifications, but this means 0x40, i.e. 64 bytes. This patch fixes the typo and enables FIFO size autodetection for Intel MID devices.

Fixes 7063c0d942a1 (spi/dw_spi: add DMA support)
---
 drivers/spi/spi-dw-mid.c | 1 -
 1 file changed, 1 deletion(-)
drivers/spi/spi-dw-mid.c +0 -1
index 7281316..a67d37c 100644
@@ -271,7 +271,6 @@ int dw_spi_mid_init(struct dw_spi *dws)
 	iounmap(clk_reg);
 
 	dws->num_cs = 16;
-	dws->fifo_len = 40;	/* FIFO has 40 words buffer */
 
 #ifdef CONFIG_SPI_DW_MID_DMA
 	dws->dma_priv = kzalloc(sizeof(struct mid_dma), GFP_KERNEL);
Signature · 6 lines
2.1.3

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw

PATCH v2 2/2 spi: dw-mid: fix number of CS lines

In reply to a message not in the archive

According to specification the SPI1 has 5 bits for chip selects. The current code limits it to 4 bits. The patch fixes that constant.

Fixes 7063c0d942a1 (spi/dw_spi: add DMA support)
---
 drivers/spi/spi-dw-mid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-dw-mid.c +1 -1
index a67d37c..bd72ec6 100644
@@ -270,7 +270,7 @@ int dw_spi_mid_init(struct dw_spi *dws)
 	dws->max_freq = MRST_SPI_CLK_BASE / (clk_cdiv + 1);
 	iounmap(clk_reg);
 
-	dws->num_cs = 16;
+	dws->num_cs = 32;
 
 #ifdef CONFIG_SPI_DW_MID_DMA
 	dws->dma_priv = kzalloc(sizeof(struct mid_dma), GFP_KERNEL);
Signature · 6 lines
2.1.3

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Applied
#4 lore raw
In reply to a message not in the archive
Quoted 3 lines · Andy Shevchenko

The FIFO size is 40 accordingly to the specifications, but this means 0x40, i.e. 64 bytes. This patch fixes the typo and enables FIFO size autodetection for Intel MID devices.

Applied, thanks.

maintainer
#3 lore raw

Re: [PATCH v2 2/2] spi: dw-mid: fix number of CS lines

In reply to Andy Shevchenko
Quoted 6 lines · Andy Shevchenko

According to specification the SPI1 has 5 bits for chip selects. The current code limits it to 4 bits. The patch fixes that constant.

Fixes 7063c0d942a1 (spi/dw_spi: add DMA support)

I'm not seeing this as an obvious candidate for stable, it seems more like a new feature really in terms of impact, and that doesn't look like the commit that's being fixed - it's the last one that refactored things but that's not the same thing.