Hi, Alexander, On 01/24/2019 01:21 PM, Sverdlin, Alexander (Nokia - DE/Ulm) wrote: > Optimize erase time by always using biggest erase size for given erase > request. Do it by removing "sector"-at-a-time erase code. > spi_nor_erase_multi_sectors() seems to be mature enough to handle all > the cases better. Did you check if the upper mtd layers are affected by this change? > > For the above to work backwards-compatible regarding 4-bytes commands > spi_nor_set_4byte_opcodes() has to prepare them always, independent of > spi_nor_has_uniform_erase() flag. > > Remainder check in spi_nor_erase() becomes superfluous because > spi_nor_erase_multi_sectors() performs it anyway. > > The trigger for this change was n25q128a13: enabling SECT_4K increased > erase time of 128k block from 1.763s to 11.335s. When needed, one can disable the 4K sectors with the MTD_SPI_NOR_USE_4K_SECTORS kconfig option. Does this help you? Cheers, ta ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/