mirror of
https://abf.rosa.ru/djam/kernel-5.15.git
synced 2025-02-23 10:32:54 +00:00
Pick "pm: disable all sleep states on BE-M1000 based boards"
http://git.altlinux.org/gears/k/kernel-image-std-def.git?p=kernel-image-std-def.git;a=commitdiff;h=612987425ef7da4ec7ac55a5ed03c2ad823f84a1
This commit is contained in:
parent
0f662eabce
commit
f79d9880f3
2 changed files with 60 additions and 0 deletions
|
@ -0,0 +1,59 @@
|
|||
From a73eeb303cb72ab88dcc9c6182484300c235ca00 Mon Sep 17 00:00:00 2001
|
||||
From: Alexey Sheplyakov <asheplyakov@altlinux.org>
|
||||
Date: Fri, 3 Sep 2021 19:41:08 +0400
|
||||
Subject: [PATCH] pm: disable all sleep states on BE-M1000 based boards
|
||||
|
||||
These days desktop environments try to put computer into a sleep
|
||||
state after a certain period of inactivity. TF307 board is able
|
||||
to enter a sleep state, however it does *NOT* wakeup via power
|
||||
button or keyboard/mouse.
|
||||
|
||||
Apparently the only wakeup sources on TF307 board are
|
||||
|
||||
- Real time clock (RTC)
|
||||
- Ethernet
|
||||
|
||||
Surprisingly BMC (board management controller) is NOT a wakeup
|
||||
source. Also tp_bmc driver does not use interrupts, and polls
|
||||
the device instead. Perhaps BMC is unable to generate interrupts
|
||||
at all?
|
||||
|
||||
To avoid the problem disable all sleep states (including s2idle)
|
||||
on Baikal-M systems
|
||||
---
|
||||
kernel/power/suspend.c | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
|
||||
index 32391acc806b..182947b94a37 100644
|
||||
--- a/kernel/power/suspend.c
|
||||
+++ b/kernel/power/suspend.c
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <trace/events/power.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/moduleparam.h>
|
||||
+#include <linux/of.h>
|
||||
|
||||
#include "power.h"
|
||||
|
||||
@@ -237,6 +238,17 @@ EXPORT_SYMBOL_GPL(suspend_valid_only_mem);
|
||||
|
||||
static bool sleep_state_supported(suspend_state_t state)
|
||||
{
|
||||
+#ifdef CONFIG_OF
|
||||
+ if (of_device_is_compatible(of_root, "baikal,baikal-m")) {
|
||||
+ /* XXX: there are no wakeup sources except RTC and Ethernet
|
||||
+ * on BE-M1000 based boards. In other words, no way to wakeup
|
||||
+ * system via the keyboard or power button.
|
||||
+ * Thus even s2idle is unusable on BE-M1000 systems.
|
||||
+ */
|
||||
+ pr_info("%s: no useful wakeup sources on Baikal-M", __func__);
|
||||
+ return false;
|
||||
+ }
|
||||
+#endif
|
||||
return state == PM_SUSPEND_TO_IDLE || (suspend_ops && suspend_ops->enter);
|
||||
}
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
|
@ -377,6 +377,7 @@ Patch0628: 0628-drm-panfrost-Trim-affinity-for-Mali-T620.patch
|
|||
Patch0629: 0629-baikal_vdu_drm-_plane_atomic_check-actually-re-enabl.patch
|
||||
Patch0630: 0630-baikal_vdu-figure-out-LVDS-endpoint-count.patch
|
||||
Patch0631: 0631-panfrost-disable-devfreq-on-BE-M1000-SoC.patch
|
||||
Patch0633: 0632-pm-disable-all-sleep-states-on-BE-M1000-based-boards.patch
|
||||
|
||||
# Disable AutoReq
|
||||
AutoReq: 0
|
||||
|
|
Loading…
Add table
Reference in a new issue