summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2021-05-13 10:11:39 -0700
committerCommit Bot <commit-bot@chromium.org>2021-09-17 00:37:36 +0000
commitfa3313243ea1db5eba06b741ec8cedd92e0ca119 (patch)
tree357da24d7cc354e2b23181da9ff2a5db197b9624
parenta1e771cf190c54d1c287f000f79122d925dab98e (diff)
downloadchrome-ec-fa3313243ea1db5eba06b741ec8cedd92e0ca119.tar.gz
qcom: Deprecate WARM_RESET handlings in SC7280
Add guards to limit the long warm_reset handling only in SC7180, such that the future generations, like SC7280, don't have it. BRANCH=None BUG=b:187980397, b:187098628 TEST=Built all the Chromium EC images and Zephyr EC images. TEST=Modify a board to use the SC7280 CONFIG. Change-Id: Iad011f58522641cde2f469f71114473476c53d67 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2893070 Reviewed-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Alexandru M Stan <amstan@chromium.org>
-rw-r--r--include/power/qcom.h2
-rw-r--r--power/qcom.c25
2 files changed, 16 insertions, 11 deletions
diff --git a/include/power/qcom.h b/include/power/qcom.h
index b2e2f72e27..5f5247fa87 100644
--- a/include/power/qcom.h
+++ b/include/power/qcom.h
@@ -11,9 +11,9 @@ enum power_signal {
SC7X80_AP_RST_ASSERTED = 0,
SC7X80_PS_HOLD,
SC7X80_POWER_GOOD,
- SC7X80_WARM_RESET,
SC7X80_AP_SUSPEND,
#ifdef CONFIG_CHIPSET_SC7180
+ SC7X80_WARM_RESET,
SC7X80_DEPRECATED_AP_RST_REQ,
#endif
POWER_SIGNAL_COUNT,
diff --git a/power/qcom.c b/power/qcom.c
index e18e9da165..ef9e329111 100644
--- a/power/qcom.c
+++ b/power/qcom.c
@@ -54,17 +54,17 @@ const struct power_signal_info power_signal_list[] = {
POWER_SIGNAL_ACTIVE_HIGH,
"POWER_GOOD",
},
- [SC7X80_WARM_RESET] = {
- GPIO_WARM_RESET_L,
- POWER_SIGNAL_ACTIVE_HIGH,
- "WARM_RESET_L",
- },
[SC7X80_AP_SUSPEND] = {
GPIO_AP_SUSPEND,
POWER_SIGNAL_ACTIVE_HIGH,
"AP_SUSPEND",
},
#ifdef CONFIG_CHIPSET_SC7180
+ [SC7X80_WARM_RESET] = {
+ GPIO_WARM_RESET_L,
+ POWER_SIGNAL_ACTIVE_HIGH,
+ "WARM_RESET_L",
+ },
[SC7X80_DEPRECATED_AP_RST_REQ] = {
GPIO_DEPRECATED_AP_RST_REQ,
POWER_SIGNAL_ACTIVE_HIGH,
@@ -158,9 +158,6 @@ static char power_button_was_pressed;
/* 1 if lid-open event has been detected */
static char lid_opened;
-/* 1 if AP_RST_L and PS_HOLD is overdriven by EC */
-static char ap_rst_overdriven;
-
/* Time where we will power off, if power button still held down */
static timestamp_t power_off_deadline;
@@ -260,6 +257,11 @@ static void request_cold_reset(void)
task_wake(TASK_ID_CHIPSET);
}
+#ifdef CONFIG_CHIPSET_SC7180
+
+/* 1 if AP_RST_L and PS_HOLD is overdriven by EC */
+static char ap_rst_overdriven;
+
void chipset_warm_reset_interrupt(enum gpio_signal signal)
{
/*
@@ -320,6 +322,7 @@ void chipset_power_good_interrupt(enum gpio_signal signal)
}
power_signal_interrupt(signal);
}
+#endif /* defined(CONFIG_CHIPSET_SC7180) */
static void sc7x80_lid_event(void)
{
@@ -541,8 +544,10 @@ enum power_state power_chipset_init(void)
uint32_t reset_flags = system_get_reset_flags();
/* Enable interrupts */
- gpio_enable_interrupt(GPIO_WARM_RESET_L);
- gpio_enable_interrupt(GPIO_POWER_GOOD);
+ if (IS_ENABLED(CONFIG_CHIPSET_SC7180)) {
+ gpio_enable_interrupt(GPIO_WARM_RESET_L);
+ gpio_enable_interrupt(GPIO_POWER_GOOD);
+ }
/*
* Force the AP shutdown unless we are doing SYSJUMP. Otherwise,