Re: [PATCH] spi: spi-zynqmp-gqspi: stop the controller on shutdown
From: Mark Brown
Date: Thu Sep 10 2026 - 13:07:20 EST
On Thu, Sep 10, 2026 at 02:33:25PM +0300, Itai Handler wrote:
> +static void zynqmp_qspi_shutdown(struct platform_device *pdev)
> +{
> + struct zynqmp_qspi *xqspi = platform_get_drvdata(pdev);
> + int ret;
> +
> + /*
> + * Only a runtime suspended controller can be left alone: its clocks
> + * are gated, so it cannot be mastering the bus, and its registers
> + * must not be accessed either. Any other answer means it may be
> + * running and has to be stopped. In particular, on a kernel built
> + * without runtime PM this returns -EINVAL, and there the clocks
> + * enabled in probe() are never gated at all.
> + */
> + ret = pm_runtime_get_if_in_use(&pdev->dev);
> + if (!ret)
> + return;
> +
> + zynqmp_gqspi_write(xqspi, GQSPI_EN_OFST, 0x0);
What ensures that nothing can start new transactions after this has run,
and if there's any operations in flight will the controller be OK with
just being stopped like this?
Attachment:
signature.asc
Description: PGP signature