All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] mtd: spi-nor: add block protection flags to macronix
@ 2021-03-03  9:48 David Bauer
  2021-03-03  9:48 ` [PATCH 2/2] mtd: spi-nor: use 4 bit BP for large Macronix flash David Bauer
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: David Bauer @ 2021-03-03  9:48 UTC (permalink / raw)
  To: tudor.ambarus, miquel.raynal, richard, vigneshr, linux-mtd

Macronix flash chips support block protection by using BP bits in the
read status register. Add the corresponding flag to indicate block
protection support.

Otherwise, locked blocks are not unlocked when requested.

Signed-off-by: David Bauer <mail@david-bauer.net>
---
 drivers/mtd/spi-nor/macronix.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/spi-nor/macronix.c b/drivers/mtd/spi-nor/macronix.c
index 9203abaac229..2d39dd32a64e 100644
--- a/drivers/mtd/spi-nor/macronix.c
+++ b/drivers/mtd/spi-nor/macronix.c
@@ -94,6 +94,7 @@ static const struct flash_info macronix_parts[] = {
 
 static void macronix_default_init(struct spi_nor *nor)
 {
+	nor->flags |= SNOR_F_HAS_LOCK;
 	nor->params->quad_enable = spi_nor_sr1_bit6_quad_enable;
 	nor->params->set_4byte_addr_mode = spi_nor_set_4byte_addr_mode;
 }
-- 
2.30.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

end of thread, other threads:[~2021-03-09  7:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-03  9:48 [PATCH 1/2] mtd: spi-nor: add block protection flags to macronix David Bauer
2021-03-03  9:48 ` [PATCH 2/2] mtd: spi-nor: use 4 bit BP for large Macronix flash David Bauer
2021-03-08 12:37   ` Michael Walle
2021-03-08 18:01     ` David Bauer
2021-03-09  7:49       ` Tudor.Ambarus
2021-03-08  9:16 ` [PATCH 1/2] mtd: spi-nor: add block protection flags to macronix Michael Walle
2021-03-08 10:32 ` [PATCH 2/2] mtd: spi-nor: use 4 bit BP for large Macronix flash Michael Walle
2021-03-08 14:20 ` [PATCH 1/2] mtd: spi-nor: add block protection flags to macronix Vignesh Raghavendra
2021-03-08 15:20   ` Michael Walle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.