[PATCH v4 3/7] mtd: spi-nor: Add support for panic writes

Miquel Raynal miquel.raynal at bootlin.com
Mon Nov 23 06:14:25 PST 2026


On 16/10/2026 at 12:29:13 +02, Paul Cercueil <paul.cercueil at bootlin.com> wrote:

> From: Tanmay Jagdale <tanmay at marvell.com>
>
> If the SPI controller supports it, provide the functionality of doing a
> panic write.
>
> Update the spi-nor core code and controllers to make sure they won't try
> to grab locked mutexes or sleep when doing a panic write, as preemption
> and IRQs are disabled.
>
> The information is carried down to the SPI controller driver through the
> spi_mem_op structure. If the corresponding flag is set there, and the
> SPI driver does support panic writes, it then has to respect the same
> rules.
>
> Signed-off-by: Tanmay Jagdale <tanmay at marvell.com>
> Co-developed-by: Paul Cercueil <paul.cercueil at bootlin.com>
> Signed-off-by: Paul Cercueil <paul.cercueil at bootlin.com>

That's reasonably close to the NAND version.

Reviewed-by: Miquel Raynal <miquel.raynal at bootlin.com>

Thanks,
Miquèl



More information about the linux-mtd mailing list