Message ID | 20181011074022.9967-1-zajec5@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 0976eda7915507fe94e07870c19d717c9994b57a |
Headers | show |
Series | [FIX] spi: bcm-qspi: fix calculation of address length | expand |
On Thu, 11 Oct 2018 09:40:22 +0200 Rafał Miłecki <zajec5@gmail.com> wrote: > From: Rafał Miłecki <rafal@milecki.pl> > > 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") > Cc: stable@vger.kernel.org # 4.18+ > Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com> > --- > drivers/spi/spi-bcm-qspi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > 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",
On Thu, Oct 11, 2018 at 4:59 AM Boris Brezillon <boris.brezillon@bootlin.com> wrote: > > On Thu, 11 Oct 2018 09:40:22 +0200 > Rafał Miłecki <zajec5@gmail.com> wrote: > > > From: Rafał Miłecki <rafal@milecki.pl> > > > > 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") > > Cc: stable@vger.kernel.org # 4.18+ > > Signed-off-by: Rafał Miłecki <rafal@milecki.pl> > > Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com> Acked-by: Kamal Dasu <kdasu.kdev@gmail.com> > > > --- > > drivers/spi/spi-bcm-qspi.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > 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", >
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",