summaryrefslogtreecommitdiff
path: root/power/sc7180.c
diff options
context:
space:
mode:
Diffstat (limited to 'power/sc7180.c')
-rw-r--r--power/sc7180.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/power/sc7180.c b/power/sc7180.c
index 7d8b5b9cb0..7788f04833 100644
--- a/power/sc7180.c
+++ b/power/sc7180.c
@@ -171,19 +171,8 @@ void chipset_warm_reset_interrupt(enum gpio_signal signal)
GPIO_SEL_1P8V | GPIO_OUT_HIGH);
gpio_set_flags(GPIO_AP_RST_L, GPIO_INT_BOTH |
GPIO_SEL_1P8V | GPIO_OUT_LOW);
- } else {
- /*
- * The pull-up rail POWER_GOOD drops.
- *
- * High-Z both AP_RST_L and PS_HOLD to restore their
- * states.
- */
- gpio_set_flags(GPIO_AP_RST_L, GPIO_INT_BOTH |
- GPIO_SEL_1P8V);
- gpio_set_flags(GPIO_PS_HOLD, GPIO_INT_BOTH |
- GPIO_SEL_1P8V);
- ap_rst_overdriven = 0;
}
+ /* Ignore the else clause, the pull-up rail drops. */
} else {
if (ap_rst_overdriven) {
/*
@@ -201,7 +190,23 @@ void chipset_warm_reset_interrupt(enum gpio_signal signal)
}
/* If not overdriven, just a normal power-up, do nothing. */
}
+ power_signal_interrupt(signal);
+}
+void chipset_power_good_interrupt(enum gpio_signal signal)
+{
+ if (!gpio_get_level(GPIO_POWER_GOOD) && ap_rst_overdriven) {
+ /*
+ * POWER_GOOD is the pull-up rail of WARM_RESET_L.
+ * When POWER_GOOD drops, high-Z both AP_RST_L and PS_HOLD
+ * to restore their states.
+ */
+ gpio_set_flags(GPIO_AP_RST_L, GPIO_INT_BOTH |
+ GPIO_SEL_1P8V);
+ gpio_set_flags(GPIO_PS_HOLD, GPIO_INT_BOTH |
+ GPIO_SEL_1P8V);
+ ap_rst_overdriven = 0;
+ }
power_signal_interrupt(signal);
}