Hello, This is another attempt at fixing the bug reported by Alexandre and impacting mx25l25635f flashes that do not have the reset line properly wired. Since mx25l25635f and mx25l25635e share the same JEDEC-ID, and only mx25l25635f supports 4B opcodes, the core decides to enter 4B mode, and when a reset occurs, the NOR stays in this mode and the ROM code (why only supports 3 byte addressing) can't read the flash anymore. Adding broken-flash-reset in the DT fixes the reboot issue but prints a WARN_ON() backtrace at boot time. The proper solution is to use 4B opcodes when available, but we need a way to flag the F variant of the chip as supporting this feature. This patchset paves the way for more SFDP-related fixups hooks by adding a spi_nor_fixups struct which can be provided on a per-chip basis (and soon on a per-manufacturer basis). In this series we add a single hook called post_bfpt() to allow fixups just after the BFPT parsing has occurred. Thanks to the BFPT array, we are able to differentiate the F and E variant and add the 4B_OPCODE flag when appropriate. With this infrastructure in place, we'll be able to fix SFPD tables at runtime instead setting the SKIP_SFDP on NORs with broken SFDP. Feel free to comment on the general approach or implementation details. Regards, Boris P.S.: This series depends on [1] [1]http://patchwork.ozlabs.org/project/linux-mtd/list/?series=78826 Boris Brezillon (3): mtd: spi-nor: Add the SNOR_F_4B_OPCODES flag mtd: spi-nor: Add a post BFPT parsing fixup hook mtd: spi-nor: Add a post BFPT fixup for MX25L25635E drivers/mtd/spi-nor/spi-nor.c | 441 +++++++++++++++++++--------------- include/linux/mtd/spi-nor.h | 1 + 2 files changed, 253 insertions(+), 189 deletions(-) -- 2.17.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/