Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mtd: spi-nor: winbond: Fix locking support for w25q64jvm

The Winbond w25q64jvm supports block protection through the Status
Register (SR) and provides a Top/Bottom (TB) protection bit.

Enable SPI_NOR_HAS_LOCK and SPI_NOR_HAS_TB for this device to
properly describe its locking capabilities.

The device uses Status Register bit 5 as the TB bit and supports only
three Block Protect (BP) bits. Therefore, do not set SPI_NOR_TB_SR_BIT6
or SPI_NOR_4BIT_BP.

Reference:
https://www.winbond.com/hq/support/documentation/levelOne.jsp?__locale=en&DocNo=DA00-W25Q64JV.1

Signed-off-by: Eliav Farber <farbere@amazon.com>
Reviewed-by: Michael Walle <mwalle@kernel.org>
Signed-off-by: Pratyush Yadav (Google) <pratyush@kernel.org>

authored by

Eliav Farber and committed by
Pratyush Yadav (Google)
5eb13017 0f0b444b

+1
+1
drivers/mtd/spi-nor/winbond.c
··· 295 295 .id = SNOR_ID(0xef, 0x70, 0x17), 296 296 .name = "w25q64jvm", 297 297 .size = SZ_8M, 298 + .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB, 298 299 .no_sfdp_flags = SECT_4K, 299 300 }, { 300 301 .id = SNOR_ID(0xef, 0x70, 0x18),