From: Nishanth Menon <nm@ti.com>
To: Mark Brown <broonie@kernel.org>
Cc: Francesco Dolcini <francesco@dolcini.it>,
Siddharth Vadapalli <s-vadapalli@ti.com>,
Anurag Dutta <a-dutta@ti.com>, <linux-spi@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <stable@vger.kernel.org>
Subject: Re: [PATCH v2] spi: cadence-quadspi: Parse DT for flashes with the rest of the DT parsing
Date: Thu, 4 Dec 2025 14:00:27 -0600 [thread overview]
Message-ID: <20251204200027.p4osjcj67bcmsvck@skipper> (raw)
In-Reply-To: <20251204-spi-cadence-qspi-runtime-pm-imbalance-v2-1-10af9115d531@kernel.org>
On 19:13-20251204, Mark Brown wrote:
> The recent refactoring of where runtime PM is enabled done in commit
> f1eb4e792bb1 ("spi: spi-cadence-quadspi: Enable pm runtime earlier to
> avoid imbalance") made the fact that when we do a pm_runtime_disable()
> in the error paths of probe() we can trigger a runtime disable which in
> turn results in duplicate clock disables. This is particularly likely
> to happen when there is missing or broken DT description for the flashes
> attached to the controller.
>
> Early on in the probe function we do a pm_runtime_get_noresume() since
> the probe function leaves the device in a powered up state but in the
> error path we can't assume that PM is enabled so we also manually
> disable everything, including clocks. This means that when runtime PM is
> active both it and the probe function release the same reference to the
> main clock for the IP, triggering warnings from the clock subsystem:
>
> [ 8.693719] clk:75:7 already disabled
> [ 8.693791] WARNING: CPU: 1 PID: 185 at /usr/src/kernel/drivers/clk/clk.c:1188 clk_core_disable+0xa0/0xb
> ...
> [ 8.694261] clk_core_disable+0xa0/0xb4 (P)
> [ 8.694272] clk_disable+0x38/0x60
> [ 8.694283] cqspi_probe+0x7c8/0xc5c [spi_cadence_quadspi]
> [ 8.694309] platform_probe+0x5c/0xa4
>
> Dealing with this issue properly is complicated by the fact that we
> don't know if runtime PM is active so can't tell if it will disable the
> clocks or not. We can, however, sidestep the issue for the flash
> descriptions by moving their parsing to when we parse the controller
> properties which also save us doing a bunch of setup which can never be
> used so let's do that.
>
> Reported-by: Francesco Dolcini <francesco@dolcini.it>
> Closes: https://lore.kernel.org/r/20251201072844.GA6785@francesco-nb
> Signed-off-by: Mark Brown <broonie@kernel.org>
> Cc: stable@vger.kernel.org
https://gist.github.com/nmenon/5ca89b617113e9dbb31d4630586af945#file-gistfile1-txt-L1004
next-20251204 + this patch -> The issue still exists at least on my
platform.
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
https://ti.com/opensource
next prev parent reply other threads:[~2025-12-04 20:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-04 19:13 Mark Brown
2025-12-04 20:00 ` Nishanth Menon [this message]
2025-12-05 0:03 ` Mark Brown
2025-12-05 0:06 ` Mark Brown
2025-12-15 13:59 ` Mark Brown
2025-12-16 4:08 ` Dutta, Anurag
2025-12-16 14:34 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251204200027.p4osjcj67bcmsvck@skipper \
--to=nm@ti.com \
--cc=a-dutta@ti.com \
--cc=broonie@kernel.org \
--cc=francesco@dolcini.it \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=s-vadapalli@ti.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®