kernel: add the latest mtd patch extending ofpart parser
[openwrt/openwrt.git] / target / linux / ath79 / patches-5.10 / 0052-mtd-spi-nor-add-block-protection-flags-to-macronix.patch
1 From 158f9796335b393980afb8e9796eb8d44106652a Mon Sep 17 00:00:00 2001
2 From: David Bauer <mail@david-bauer.net>
3 Date: Mon, 26 Oct 2020 15:10:47 +0100
4 Subject: [PATCH 1/2] mtd: spi-nor: add block protection flags to macronix
5
6 Macronix flash chips support block protection by using BP bits in the
7 read status register. Add the corresponding flag to indicate block
8 protection support.
9
10 Otherwise, locked blocks are not unlocked when requested.
11
12 Signed-off-by: David Bauer <mail@david-bauer.net>
13 ---
14 drivers/mtd/spi-nor/macronix.c | 1 +
15 1 file changed, 1 insertion(+)
16
17 --- a/drivers/mtd/spi-nor/macronix.c
18 +++ b/drivers/mtd/spi-nor/macronix.c
19 @@ -94,6 +94,7 @@ static const struct flash_info macronix_
20
21 static void macronix_default_init(struct spi_nor *nor)
22 {
23 + nor->flags |= SNOR_F_HAS_LOCK;
24 nor->params->quad_enable = spi_nor_sr1_bit6_quad_enable;
25 nor->params->set_4byte_addr_mode = spi_nor_set_4byte_addr_mode;
26 nor->flags |= SNOR_F_HAS_LOCK;