diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2018-10-11 09:40:22 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-13 11:08:15 -0800 |
commit | 95e124ad80c1d4bce9fbda9eeb0d903c0afaa2bc (patch) | |
tree | dc98b49409dd544163795025f5f1f994e098cf8e /drivers/spi | |
parent | 97baa6b21b2997d727779ae3a1780968ca956baa (diff) | |
download | linux-stable-95e124ad80c1d4bce9fbda9eeb0d903c0afaa2bc.tar.gz linux-stable-95e124ad80c1d4bce9fbda9eeb0d903c0afaa2bc.tar.bz2 linux-stable-95e124ad80c1d4bce9fbda9eeb0d903c0afaa2bc.zip |
spi: bcm-qspi: fix calculation of address length
commit 0976eda7915507fe94e07870c19d717c9994b57a upstream.
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 <rafal@milecki.pl>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-bcm-qspi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-bcm-qspi.c b/drivers/spi/spi-bcm-qspi.c index 8992acda4f1f..584bcb018a62 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", |