[PATCH] spi: spi-zynqmp-gqspi: stop the controller on shutdown
Mark Brown
broonie at kernel.org
Thu Sep 10 09:56:07 PDT 2026
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?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260910/ac80544d/attachment.sig>
More information about the linux-arm-kernel
mailing list