[PATCH v3 13/25] mtd: spi-nor: sst: Get rid of SST_WRITE flash_info flag

Michael Walle michael at walle.cc
Tue Nov 9 04:21:45 PST 2021


Am 2021-10-29 19:26, schrieb Tudor Ambarus:
> The flash_info flags should be generic and not manufacturer specific.
> Get rid of the manufacturer specific flag and use the late_init() fixup
> hook instead.
> Please note that sst_write is now set at flash level and not globally,
> per manufacturer. Manufacturer hooks are generally a bad idea, because
> it affects settings for all the flashes and we might end up with fixups
> for "manufacturer settings".
> 
> Signed-off-by: Tudor Ambarus <tudor.ambarus at microchip.com>

Reviewed-by: Michael Walle <michael at walle.cc>

I'm still not sure, if having a just one fixup function will scale with
different flashes. What do you think about having an additional (opaque
to the core) (bit)field for the manufacturer and flash fixups functions?
In this case, you can reuse the same function - and then a manufacturer
will make more sense (addressing Pratyush comment about a common
manufacturer fixup here).

I.e. the SST_WRITE flag would go into these flags, set per flash device
and the fixup can still remain in the manufacturer fixup.

-michael



More information about the linux-arm-kernel mailing list