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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Wed, Dec 07, 2016 at 05:19:57PM +0100, Romain Perier wrote:
> Le 05/12/2016 à 14:37, Mark Brown a écrit :

> > 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.

> > > +	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 */

> > 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.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux