Thread (1 message) 1 message, 1 author, 2016-12-07

[PATCH v3 2/5] spi: armada-3700: Add support for the FIFO mode

From: broonie@kernel.org (Mark Brown)
Date: 2016-12-07 16:34:21
Also in: linux-devicetree, linux-spi

On Wed, Dec 07, 2016 at 05:19:57PM +0100, Romain Perier wrote:
Le 05/12/2016 ? 14:37, Mark Brown a ?crit :
quoted
Why?  If the hardware supports a more efficient mode of operation it
doesn't seem sensible not to use it.
That's just that our customer want to keep both modes, this is why I decided
to use the more efficient mode by default and disable it via a module
parameter. Previously the more efficient mode was always enabled, based on
the "compatible string" of the DT (the PIO mode was simply useless in this
case and dead code)
Keep that out of tree, if the user wants to do silly things then let
them pay the cost.
quoted
quoted
+	if (xfer->rx_buf) {
+		/* Set read data length */
+		spireg_write(a3700_spi, A3700_SPI_IF_DIN_CNT_REG,
+			     a3700_spi->buf_len);
+		/* Start READ transfer */
+		val = spireg_read(a3700_spi, A3700_SPI_IF_CFG_REG);
+		val &= ~A3700_SPI_RW_EN;
+		val |= A3700_SPI_XFER_START;
+		spireg_write(a3700_spi, A3700_SPI_IF_CFG_REG, val);
+	} else if (xfer->tx_buf) {
+		/* Start Write transfer */
quoted
So this only supports single duplex transfers but there doesn't seem to
be anything that enforces this.
A flag or a capability, typically? I will investigate
SPI_MASTER_HALF_DUPLEX.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161207/af74c861/attachment.sig>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help