Skip to content

Commit e4f54bd

Browse files
committed
soc: apple: sleep: read a T6050 power word through its region
sleep_ps_full() read the power word at s->ps + offset. On T6050 the words are region-encoded (SLEEP_REGION(w)), and sleep_power_reg() is what turns one into its address; sleep_ps_on() and the other readers went through it with the T6050 support, which missed this one. Since the T8142 sleep support, the bound display-coprocessor check in apple_sleep_refuse() and the bound gate checks in apple_sleep_gate_failed() call sleep_asc_running(), and so sleep_ps_full(), during T6050's early-entry refusal checks, with interrupts off on the last CPU. There it read a wrong address, and the J716c reset during every deep sleep instead of sleeping. Read the word through sleep_power_reg(), which is s->ps + offset on the SoCs without regions, so nothing changes there. Developed with Claude Code. Fixes: 5ce3491 ("soc: apple: sleep: T6050 (M5 Pro) suspend to RAM") Signed-off-by: Erik Bourget <erik@ebourget.net>
1 parent 59b02d5 commit e4f54bd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/soc/apple/sleep.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2643,7 +2643,7 @@ static bool sleep_ps_on(struct apple_sleep *s, u32 offset)
26432643
/* Below full power the hardware has idled it, and its registers may not answer. */
26442644
static bool sleep_ps_full(struct apple_sleep *s, u32 offset)
26452645
{
2646-
return FIELD_GET(PS_ACTUAL, readl(s->ps + offset)) == FIELD_MAX(PS_ACTUAL);
2646+
return FIELD_GET(PS_ACTUAL, readl(sleep_power_reg(s, offset))) == FIELD_MAX(PS_ACTUAL);
26472647
}
26482648

26492649
/*

0 commit comments

Comments
 (0)