summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2023-01-17 12:45:22 -0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-01-18 02:20:37 +0000
commit88f7615a6cc0c0e71950e4e54d6b28c6a4a0f696 (patch)
tree983b3cfc8fa1d23c8468f516ab85f87c0e61681f
parentaaf2c3eadc61067cfabc34ecdb9039527ab0b955 (diff)
downloadchrome-ec-88f7615a6cc0c0e71950e4e54d6b28c6a4a0f696.tar.gz
qcom: Suppress the power signal log of AP_SUSPEND
Introduce a new flag to suppress the log of the power signal. Enable this new flag for the AP_SUSPEND signal as it toggles frequently in S3. BRANCH=None BUG=b:249750823 TEST=Make the device in S3 and check the EC UART not too noisy. Change-Id: Ib0155373ce85c0adc06153e8d3b24b8ac72c8036 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4172846 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
-rw-r--r--include/power.h6
-rw-r--r--power/common.c9
-rw-r--r--power/qcom.c2
3 files changed, 15 insertions, 2 deletions
diff --git a/include/power.h b/include/power.h
index 9ba4515a4c..c1f83f9e26 100644
--- a/include/power.h
+++ b/include/power.h
@@ -54,7 +54,9 @@ FORWARD_DECLARE_ENUM(power_state){
* +------------------------------------------------------+
* | 1 | Signal interrupt state at boot |
* +------------------------------------------------------+
- * | 2 : 32 | Reserved |
+ * | 2 | Do not log the signal change |
+ * +------------------------------------------------------+
+ * | 3 : 32 | Reserved |
* +-----------------+------------------------------------+
*/
@@ -65,6 +67,8 @@ FORWARD_DECLARE_ENUM(power_state){
#define POWER_SIGNAL_INTR_STATE BIT(1)
#define POWER_SIGNAL_DISABLE_AT_BOOT BIT(1)
+#define POWER_SIGNAL_NO_LOG BIT(2)
+
/* Information on an power signal */
struct power_signal_info {
enum gpio_signal gpio; /* GPIO for signal */
diff --git a/power/common.c b/power/common.c
index 65c1cf0779..bb01f98c0e 100644
--- a/power/common.c
+++ b/power/common.c
@@ -825,6 +825,15 @@ DECLARE_DEFERRED(siglog_deferred);
static void siglog_add(enum gpio_signal signal)
{
+ const struct power_signal_info *s = power_signal_list;
+ int i;
+
+ for (i = 0; i < POWER_SIGNAL_COUNT; i++, s++) {
+ if (s->gpio == signal && s->flags & POWER_SIGNAL_NO_LOG) {
+ return;
+ }
+ }
+
if (siglog_entries >= MAX_SIGLOG_ENTRIES) {
siglog_truncated = 1;
return;
diff --git a/power/qcom.c b/power/qcom.c
index eba2d32442..074dc1407f 100644
--- a/power/qcom.c
+++ b/power/qcom.c
@@ -57,7 +57,7 @@ const struct power_signal_info power_signal_list[] = {
},
[SC7X80_AP_SUSPEND] = {
GPIO_AP_SUSPEND,
- POWER_SIGNAL_ACTIVE_HIGH,
+ POWER_SIGNAL_ACTIVE_HIGH | POWER_SIGNAL_NO_LOG,
"AP_SUSPEND",
},
#ifdef CONFIG_CHIPSET_SC7180