mtd: spi-nor: move SECT_4K_PMC special handling
authorMichael Walle <michael@walle.cc>
Mon, 18 Apr 2022 11:26:50 +0000 (13:26 +0200)
committerPratyush Yadav <p.yadav@ti.com>
Mon, 27 Jun 2022 10:12:10 +0000 (15:42 +0530)
commit77d4ac6d38487c2ab2688335b2a904469f5b16a4
tree9f4357f5aad40df17a37ace7c2cdb92a82e76c35
parent03c765b0e3b4cb5063276b086c76f7a612856a9a
mtd: spi-nor: move SECT_4K_PMC special handling

The SECT_4K_PMC flag will set a device specific opcode for the 4k sector
erase. Instead of handling it in the core, we can move it to a
late_init(). In that late init, loop over all erase types, look for the
4k size and replace the opcode.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Link: https://lore.kernel.org/r/20220418112650.2791459-1-michael@walle.cc
drivers/mtd/spi-nor/core.c
drivers/mtd/spi-nor/core.h
drivers/mtd/spi-nor/issi.c