From patchwork Thu Mar 26 11:42:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 244323 List-Id: U-Boot discussion From: rasmus.villemoes at prevas.dk (Rasmus Villemoes) Date: Thu, 26 Mar 2020 12:42:57 +0100 Subject: [PATCH 3/3] mtd: spi-nor: set SPI_NOR_HAS_LOCK for Macronix mx25l3205d In-Reply-To: <20200326114257.1782-1-rasmus.villemoes@prevas.dk> References: <20200326114257.1782-1-rasmus.villemoes@prevas.dk> Message-ID: <20200326114257.1782-4-rasmus.villemoes@prevas.dk> This sets the SPI_NOR_HAS_LOCK for the mx25l3205d nor flash, to enable use of the "sf protect" subcommand for that. Reading the data sheets for various other Macronix flashes suggest they should also be able to use the new mx_* lock functions, but this is the chip I've tested them on. Signed-off-by: Rasmus Villemoes --- drivers/mtd/spi/spi-nor-ids.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/spi/spi-nor-ids.c b/drivers/mtd/spi/spi-nor-ids.c index 973b6f86c9..5beb3cb3ad 100644 --- a/drivers/mtd/spi/spi-nor-ids.c +++ b/drivers/mtd/spi/spi-nor-ids.c @@ -143,7 +143,7 @@ const struct flash_info spi_nor_ids[] = { { INFO("mx25l4005a", 0xc22013, 0, 64 * 1024, 8, SECT_4K) }, { INFO("mx25l8005", 0xc22014, 0, 64 * 1024, 16, 0) }, { INFO("mx25l1606e", 0xc22015, 0, 64 * 1024, 32, SECT_4K) }, - { INFO("mx25l3205d", 0xc22016, 0, 64 * 1024, 64, SECT_4K) }, + { INFO("mx25l3205d", 0xc22016, 0, 64 * 1024, 64, SECT_4K | SPI_NOR_HAS_LOCK) }, { INFO("mx25l6405d", 0xc22017, 0, 64 * 1024, 128, SECT_4K) }, { INFO("mx25u2033e", 0xc22532, 0, 64 * 1024, 4, SECT_4K) }, { INFO("mx25u1635e", 0xc22535, 0, 64 * 1024, 32, SECT_4K) },