diff options
| author | Karl Mehltretter <kmehltretter@gmail.com> | 2026-09-23 03:29:50 +0200 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-10-04 21:39:21 +0200 |
| commit | 717e45f97246d1070cdf86ccd7a0fb872b45933a (patch) | |
| tree | 8fa6e76e0e18d2cf22f5a2356047dc4ebaeb908c /tools/perf/scripts/python | |
| parent | 38232bd3cea74845c2064eb9f7eac77fa5a21d85 (diff) | |
spi: atmel-quadspi: balance runtime PM and pclk across system sleep
On the controllers with a generic clock (SAMA7G5, SAMA7D65, SAM9X7 and
LAN969x), atmel_qspi_suspend() takes a runtime PM reference and returns
without dropping it or suspending the device. It disables the peripheral
clock directly. atmel_qspi_resume() only prepares the peripheral clock
and then reinitializes the controller with that clock still off.
On a SAM9X75 Curiosity board, the tested standby and mem resumes
failed:
atmel_qspi f0014000.spi: PM: failed to resume: error -110
spi-nor spi0.0: resume() failed
Reading the flash afterwards returned no data. The runtime usage count
grew by one with each cycle, and the second suspend disabled the
peripheral clock again:
WARNING: drivers/clk/clk.c:1257 at clk_core_disable+0x6c/0xcc
qspi_clk already disabled
Use the same runtime PM sequence as the other variants. Suspend disables
the controller and forces a runtime suspend. Resume forces a runtime
resume, which enables the peripheral clock, before it runs the init
callback, and drops the reference afterwards. With this change the
tested resumes succeed on the board in both modes, the controller
returns to runtime suspend, and the flash reads back.
Fixes: 5af42209a4d2 ("spi: atmel-quadspi: Add support for sama7g5 QSPI")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260709112006.390742-1-robert.marko%40sartura.hr?part=3
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Link: https://patch.msgid.link/20260923012950.15651-1-kmehltretter@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
