Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mtd: spi-nor: Add the SNOR_F_4B_OPCODES flag
Some flash_info entries have the SPI_NOR_4B_OPCODES flag set to let the core know that the flash supports 4B opcode. While this solution works fine for id-based caps detection, it doesn't work that well when relying on SFDP-based caps detection. Let's add an SNOR_F_4B_OPCODES flag so that the SFDP parsing code can set it when appropriate. Reported-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Tested-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com> --- Changes in v4: - Set SNOR_F_4B_OPCODES flag outside of the if (mtd->size > 0x1000000) block - Do not set SNOR_F_4B_OPCODES when BFPT_DWORD1_ADDRESS_BYTES_4_ONLY, because 4byte only does not imply 4B opcodes are supported Changes in v3: - Clear SNOR_F_4B_OPCODES flag when SFDP fails - Add Alexandre R-b Changes in v2: - Fix the commit message - Fix the ->addr_width check - Add a comma at the end of the SNOR_F_4B_OPCODES definition
- Loading branch information