diff options
author | Ionela Voinescu <ionela.voinescu@imgtec.com> | 2016-02-01 10:58:08 +0000 |
---|---|---|
committer | Ionela Voinescu <ionela.voinescu@imgtec.com> | 2016-02-01 10:58:08 +0000 |
commit | 8f7b3c6260bbea6dfb0d353eeeaad2b29919a4be (patch) | |
tree | 832d6ff660340e1e8e90a8cdc0a5df83d46e9d96 | |
parent | 42f2eaf8af7fa4521632e0421bcaf04b2031b218 (diff) | |
download | v4.1-8f7b3c6260bbea6dfb0d353eeeaad2b29919a4be.tar.gz |
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.
Change-Id: I2417c39d5f568c61ca95e52cf46422a1b1c8f9bd
Signed-off-by: Ionela Voinescu <ionela.voinescu@imgtec.com>
-rw-r--r-- | drivers/spi/spi-img-spfi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/spi/spi-img-spfi.c b/drivers/spi/spi-img-spfi.c index c31195892ed..b16ba2c056b 100644 --- a/drivers/spi/spi-img-spfi.c +++ b/drivers/spi/spi-img-spfi.c @@ -437,6 +437,9 @@ static int img_spfi_prepare(struct spi_master *master, struct spi_message *msg) u32 val; 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) val |= SPFI_PORT_STATE_CK_PHASE(msg->spi->chip_select); else |