Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit baec8eb3 authored by Ionela Voinescu's avatar Ionela Voinescu Committed by Mark Brown
Browse files

spi: img-spfi: Set device select bits for SPFI port state



Even if the chip select line is not controlled by the SPFI
hardware, the device select bits need to be set to specify
the chip select line in use for the hardware to know what
parameters to use for the current transfer.

Signed-off-by: default avatarIonela Voinescu <ionela.voinescu@imgtec.com>
Signed-off-by: default avatarAndreas Färber <afaerber@suse.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 45e41bc5
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -419,6 +419,9 @@ static int img_spfi_prepare(struct spi_master *master, struct spi_message *msg)
	u32 val;
	u32 val;


	val = spfi_readl(spfi, SPFI_PORT_STATE);
	val = spfi_readl(spfi, SPFI_PORT_STATE);
	val &= ~(SPFI_PORT_STATE_DEV_SEL_MASK <<
		 SPFI_PORT_STATE_DEV_SEL_SHIFT);
	val |= msg->spi->chip_select << SPFI_PORT_STATE_DEV_SEL_SHIFT;
	if (msg->spi->mode & SPI_CPHA)
	if (msg->spi->mode & SPI_CPHA)
		val |= SPFI_PORT_STATE_CK_PHASE(msg->spi->chip_select);
		val |= SPFI_PORT_STATE_CK_PHASE(msg->spi->chip_select);
	else
	else