Skip to content

soc: rockchip: pm_domains: don't panic on handshake timeout when always_on is set - #558

Open
RiPetitor wants to merge 1 commit into
armbian:rk-6.1-rkr7.2from
RiPetitor:rm66-pm-domains
Open

RiPetitor wants to merge 1 commit into
armbian:rk-6.1-rkr7.2from
RiPetitor:rm66-pm-domains

Conversation

@RiPetitor

Copy link
Copy Markdown

ELTAY RM66 (RK3566) doesn't boot the 6.1 BSP: pm_domains panics on the first handshake timeout during probe, before init, so the dev_err naming the failing domain is never printed.
The tree already has an opt-in always_on parameter that skips power-off, but both panics ignore it. Make them conditional on the same flag.

No change by default: without pm_domains.always_on=1 the panics stay. RM66 sets the flag in its board config and reaches userspace with it.

The failing domain still needs a real fix. This only keeps the board booting meanwhile.
Ref: armbian/build#10788

…ys_on is set

The driver panics unconditionally when a power domain does not reach the
requested idle or power state within the 10 ms handshake timeout. On some
boards this kills the boot during early probe, before the dev_err naming
the failing domain becomes visible on the console, and a later genpd
power-off work can then get stuck on the PMU mutex.

The tree already provides the opt-in "always_on" module parameter to skip
power-off requests for bring-up. Let the two handshake panics honour it as
well, so pm_domains.always_on=1 reports the failure through the existing
dev_err paths and leaves the domain as-is instead of taking the machine
down. The default behaviour is unchanged: without the parameter the panics
stay in place.

This is a bring-up aid for ELTAY RM66 (RK3566), which needs
pm_domains.always_on=1 to reach userspace; the failing domain still needs a
proper fix.

Signed-off-by: Sergey Braumann <ripetitor@proton.me>
@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 4bf1302c-e451-4ec7-90d0-01523d81f8a5

📥 Commits

Reviewing files that changed from the base of the PR and between 428ab27 and e7a5cc6.

📒 Files selected for processing (1)
  • drivers/soc/rockchip/pm_domains.c

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


Walkthrough

The change updates two error paths in the Rockchip power-domain driver. Both paths now suppress their panic calls when pm_domain_always_on is enabled. They retain the existing panic behavior when pm_domain_always_on is disabled.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to e7a5c

With always-on mode enabled, the two handshake failures no longer panic while default behavior remains unchanged. The bounded change is ready to merge with normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly explains the conditional panic behavior, the affected board, the unchanged default behavior, and the remaining underlying issue.
Title check ✅ Passed The title clearly and concisely identifies the Rockchip power-domain change and the condition that prevents handshake-timeout panics.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant