Skip to content
Commit 76c99047 authored by Tudor Ambarus's avatar Tudor Ambarus Committed by Paul Gortmaker
Browse files

mtd: spi-nor: Fix the disabling of write protection at init



commit 834de5c1 upstream.

spi_nor_spansion_clear_sr_bp() depends on spansion_quad_enable().
While spansion_quad_enable() is selected as default when
initializing the flash parameters, the nor->quad_enable() method
can be overwritten later on when parsing BFPT.

Select the write protection disable mechanism at spi_nor_init() time,
when the nor->quad_enable() method is already known.

Fixes: 191f5c2e ("mtd: spi-nor: use 16-bit WRR command when QE is set on spansion flashes")
Signed-off-by: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: default avatarVignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 03d0c93c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment