Re: [PATCH v4 3/7] mtd: spi-nor: Add support for panic writes
From: Miquel Raynal
Date: Mon Nov 23 2026 - 09:14:36 EST
On 16/10/2026 at 12:29:13 +02, Paul Cercueil <paul.cercueil@xxxxxxxxxxx> wrote:
> From: Tanmay Jagdale <tanmay@xxxxxxxxxxx>
>
> 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@xxxxxxxxxxx>
> Co-developed-by: Paul Cercueil <paul.cercueil@xxxxxxxxxxx>
> Signed-off-by: Paul Cercueil <paul.cercueil@xxxxxxxxxxx>
That's reasonably close to the NAND version.
Reviewed-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
Thanks,
Miquèl