linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: spi-nor: Fix quad enable for Spansion like flashes
@ 2020-01-16  9:37 Michael Walle
  2020-01-16 10:35 ` Tudor.Ambarus
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michael Walle @ 2020-01-16  9:37 UTC (permalink / raw)
  To: linux-mtd, linux-kernel
  Cc: Tudor Ambarus, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, Michael Walle

The commit 7b678c69c0ca ("mtd: spi-nor: Merge spansion Quad Enable
methods") forgot to actually set the QE bit in some cases. Thus this
breaks quad mode accesses to flashes which support readback of the
status register-2. Fix it.

Fixes: 7b678c69c0ca ("mtd: spi-nor: Merge spansion Quad Enable methods")
Signed-off-by: Michael Walle <michael@walle.cc>
---
 drivers/mtd/spi-nor/spi-nor.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index addb6319fcbb..ea0429448207 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -2140,6 +2140,8 @@ static int spi_nor_sr2_bit1_quad_enable(struct spi_nor *nor)
 	if (nor->bouncebuf[0] & SR2_QUAD_EN_BIT1)
 		return 0;
 
+	nor->bouncebuf[0] |= SR2_QUAD_EN_BIT1;
+
 	return spi_nor_write_16bit_cr_and_check(nor, nor->bouncebuf[0]);
 }
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mtd: spi-nor: Fix quad enable for Spansion like flashes
  2020-01-16  9:37 [PATCH] mtd: spi-nor: Fix quad enable for Spansion like flashes Michael Walle
@ 2020-01-16 10:35 ` Tudor.Ambarus
  2020-01-17 13:58 ` Tudor.Ambarus
  2020-01-17 21:47 ` Miquel Raynal
  2 siblings, 0 replies; 4+ messages in thread
From: Tudor.Ambarus @ 2020-01-16 10:35 UTC (permalink / raw)
  To: michael; +Cc: linux-mtd, linux-kernel, miquel.raynal, richard, vigneshr

On Thursday, January 16, 2020 11:37:00 AM EET Michael Walle wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
> 
> The commit 7b678c69c0ca ("mtd: spi-nor: Merge spansion Quad Enable
> methods") forgot to actually set the QE bit in some cases. Thus this
> breaks quad mode accesses to flashes which support readback of the
> status register-2. Fix it.
> 
> Fixes: 7b678c69c0ca ("mtd: spi-nor: Merge spansion Quad Enable methods")
> Signed-off-by: Michael Walle <michael@walle.cc>

Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>

Thanks, Michael!
> ---
>  drivers/mtd/spi-nor/spi-nor.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
> index addb6319fcbb..ea0429448207 100644
> --- a/drivers/mtd/spi-nor/spi-nor.c
> +++ b/drivers/mtd/spi-nor/spi-nor.c
> @@ -2140,6 +2140,8 @@ static int spi_nor_sr2_bit1_quad_enable(struct spi_nor
> *nor) if (nor->bouncebuf[0] & SR2_QUAD_EN_BIT1)
>                 return 0;
> 
> +       nor->bouncebuf[0] |= SR2_QUAD_EN_BIT1;
> +
>         return spi_nor_write_16bit_cr_and_check(nor, nor->bouncebuf[0]);
>  }
> 
> --
> 2.20.1




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mtd: spi-nor: Fix quad enable for Spansion like flashes
  2020-01-16  9:37 [PATCH] mtd: spi-nor: Fix quad enable for Spansion like flashes Michael Walle
  2020-01-16 10:35 ` Tudor.Ambarus
@ 2020-01-17 13:58 ` Tudor.Ambarus
  2020-01-17 21:47 ` Miquel Raynal
  2 siblings, 0 replies; 4+ messages in thread
From: Tudor.Ambarus @ 2020-01-17 13:58 UTC (permalink / raw)
  To: michael, miquel.raynal; +Cc: linux-mtd, linux-kernel, richard, vigneshr

Miquel,

Please queue this to mtd/fixes.

Thanks,
ta

On Thursday, January 16, 2020 11:37:00 AM EET Michael Walle wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
> 
> The commit 7b678c69c0ca ("mtd: spi-nor: Merge spansion Quad Enable
> methods") forgot to actually set the QE bit in some cases. Thus this
> breaks quad mode accesses to flashes which support readback of the
> status register-2. Fix it.
> 
> Fixes: 7b678c69c0ca ("mtd: spi-nor: Merge spansion Quad Enable methods")
> Signed-off-by: Michael Walle <michael@walle.cc>
> ---
>  drivers/mtd/spi-nor/spi-nor.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
> index addb6319fcbb..ea0429448207 100644
> --- a/drivers/mtd/spi-nor/spi-nor.c
> +++ b/drivers/mtd/spi-nor/spi-nor.c
> @@ -2140,6 +2140,8 @@ static int spi_nor_sr2_bit1_quad_enable(struct spi_nor
> *nor) if (nor->bouncebuf[0] & SR2_QUAD_EN_BIT1)
>                 return 0;
> 
> +       nor->bouncebuf[0] |= SR2_QUAD_EN_BIT1;
> +
>         return spi_nor_write_16bit_cr_and_check(nor, nor->bouncebuf[0]);
>  }
> 
> --
> 2.20.1




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mtd: spi-nor: Fix quad enable for Spansion like flashes
  2020-01-16  9:37 [PATCH] mtd: spi-nor: Fix quad enable for Spansion like flashes Michael Walle
  2020-01-16 10:35 ` Tudor.Ambarus
  2020-01-17 13:58 ` Tudor.Ambarus
@ 2020-01-17 21:47 ` Miquel Raynal
  2 siblings, 0 replies; 4+ messages in thread
From: Miquel Raynal @ 2020-01-17 21:47 UTC (permalink / raw)
  To: Michael Walle, linux-mtd, linux-kernel
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus

On Thu, 2020-01-16 at 09:37:00 UTC, Michael Walle wrote:
> The commit 7b678c69c0ca ("mtd: spi-nor: Merge spansion Quad Enable
> methods") forgot to actually set the QE bit in some cases. Thus this
> breaks quad mode accesses to flashes which support readback of the
> status register-2. Fix it.
> 
> Fixes: 7b678c69c0ca ("mtd: spi-nor: Merge spansion Quad Enable methods")
> Signed-off-by: Michael Walle <michael@walle.cc>
> Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/fixes, thanks.

Miquel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-01-17 21:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-16  9:37 [PATCH] mtd: spi-nor: Fix quad enable for Spansion like flashes Michael Walle
2020-01-16 10:35 ` Tudor.Ambarus
2020-01-17 13:58 ` Tudor.Ambarus
2020-01-17 21:47 ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).