diff options
author | Jone Chou <jonechou@google.com> | 2022-09-28 17:24:59 +0800 |
---|---|---|
committer | Jone Chou <jonechou@google.com> | 2022-09-28 17:06:54 +0000 |
commit | 62916a2e33f046a1230687540e0bfb25ded446b7 (patch) | |
tree | bbcc1157c274b84806a2abc9a0b882272f137053 | |
parent | 68312cf028f2dc1aa70dc107c0e44334189b0810 (diff) | |
download | reset-62916a2e33f046a1230687540e0bfb25ded446b7.tar.gz |
power: reset: determine reset type by reboot_mode
For GS201, it has used reboot_mode to determine reset type,
but GS101 not. So merge reset type function for both gSOCs.
For GS101, it doesn't support AOSP sending SMC to EL3MON
to reset system by reboot_mode. So align aosp to add both
reboot_mode conditions in pixel restart_handler to support
overall warm reset usecases.
ex.
- adb shell "echo c > /proc/sysrq-trigger"
- adb shell "echo 1 > sys/kernel/dbg_snapshot/in_warm"
adb reboot
- adb shell "echo b > /proc/sysrq-trigger"
- adb shell "echo 120000 > /dev/thermal/tz-by-name/BIG/emul_temp"
- adb reboot "shutdown-thermal" or "shutdown,thermal"
Bug: 249495614
signed-off-by: Jone Chou <jonechou@google.com>
Change-Id: I6d79fb03220d9af8903d99b1fe1cdf664171d6e2
-rw-r--r-- | exynos-gs101-reboot.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/exynos-gs101-reboot.c b/exynos-gs101-reboot.c index 70d5c70..140585c 100644 --- a/exynos-gs101-reboot.c +++ b/exynos-gs101-reboot.c @@ -25,7 +25,6 @@ #include <soc/google/acpm_ipc_ctrl.h> #endif #include <soc/google/exynos-el3_mon.h> -#include <soc/google/debug-snapshot.h> #include "../../bms/google_bms.h" #define EXYNOS_PMU_SYSIP_DAT0 (0x0810) @@ -200,9 +199,8 @@ static int exynos_restart_handler(struct notifier_block *this, unsigned long mod /* Do S/W Reset */ pr_emerg("%s: Exynos SoC reset right now\n", __func__); - if (s2mpg10_get_rev_id() == S2MPG10_EVT0 || - !rsbm_supported || !dbg_snapshot_get_reboot_status() || - dbg_snapshot_get_panic_status() || dbg_snapshot_get_warm_status()) { + if (s2mpg10_get_rev_id() == S2MPG10_EVT0 || !rsbm_supported || + reboot_mode == REBOOT_WARM || reboot_mode == REBOOT_SOFT) { set_priv_reg(pmu_alive_base + warm_reboot_offset, warm_reboot_trigger); } else { pr_emerg("Set PS_HOLD Low.\n"); |