aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafał Miłecki <[email protected]>2018-10-11 09:40:22 +0200
committerMark Brown <[email protected]>2018-10-11 15:00:28 +0100
commit0976eda7915507fe94e07870c19d717c9994b57a (patch)
tree89b69a9bbf6063cc926439c994f01f7d1cd097c1
parentc949a8e8b43f2c75567269bcc9a50d704ae3c420 (diff)
spi: bcm-qspi: fix calculation of address length
During implementation of the new API bcm_qspi_bspi_set_flex_mode() has been modified breaking calculation of address length. An unnecessary multiplication was added breaking flash reads. Fixes: 5f195ee7d830 ("spi: bcm-qspi: Implement the spi_mem interface") Signed-off-by: Rafał Miłecki <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Signed-off-by: Mark Brown <[email protected]> Cc: [email protected]
-rw-r--r--drivers/spi/spi-bcm-qspi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-bcm-qspi.c b/drivers/spi/spi-bcm-qspi.c
index 8612525fa4e3..eb3d67f01e8c 100644
--- a/drivers/spi/spi-bcm-qspi.c
+++ b/drivers/spi/spi-bcm-qspi.c
@@ -355,7 +355,7 @@ static int bcm_qspi_bspi_set_flex_mode(struct bcm_qspi *qspi,
int bpc = 0, bpp = 0;
u8 command = op->cmd.opcode;
int width = op->cmd.buswidth ? op->cmd.buswidth : SPI_NBITS_SINGLE;
- int addrlen = op->addr.nbytes * 8;
+ int addrlen = op->addr.nbytes;
int flex_mode = 1;
dev_dbg(&qspi->pdev->dev, "set flex mode w %x addrlen %x hp %d\n",