diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-02-10 07:14:32 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-02-10 07:14:32 +0000 |
commit | 6158dd5238a8f60c67d1189c0e3fcda30b03bc30 (patch) | |
tree | 37bbfbeec46c5a475c41954b78a7d7b848c43397 | |
parent | e54fb29be585321186fb300fd86474f0c74eb0b9 (diff) | |
parent | 1f0b2f8aa0687abe6dd4a509fc46022a6a74e661 (diff) | |
download | reset-6158dd5238a8f60c67d1189c0e3fcda30b03bc30.tar.gz |
Snap for 9489562 from 1f0b2f8aa0687abe6dd4a509fc46022a6a74e661 to android13-gs-pixel-5.10-releaseandroid-t-qpr2-beta-3.2_r0.4android-13.0.0_r0.65android-13.0.0_r0.63android-gs-raviole-5.10-t-qpr2-beta-3.2
Change-Id: Ie5cd8f6f99cf395b45f2b92b20185ddbc1d3a1bf
-rw-r--r-- | exynos-gs101-reboot.c | 10 | ||||
-rw-r--r-- | exynos-gs201-reboot.c | 32 |
2 files changed, 6 insertions, 36 deletions
diff --git a/exynos-gs101-reboot.c b/exynos-gs101-reboot.c index 70d5c70..c9bd602 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) @@ -143,8 +142,8 @@ static void exynos_reboot_parse(const char *cmd) value = REBOOT_MODE_DMVERITY_CORRUPTED; } else if (!strcmp(cmd, "rescue")) { value = REBOOT_MODE_RESCUE; - } else if (!strcmp(cmd, "shutdown-thermal") || - !strcmp(cmd, "shutdown,thermal")) { + } else if (!strncmp(cmd, "shutdown-thermal", strlen("shutdown-thermal")) || + !strncmp(cmd, "shutdown,thermal", strlen("shutdown,thermal"))) { if (force_warm_reboot_on_thermal_shutdown) force_warm_reboot = true; value = REBOOT_MODE_SHUTDOWN_THERMAL; @@ -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"); diff --git a/exynos-gs201-reboot.c b/exynos-gs201-reboot.c index 4917058..224aa2d 100644 --- a/exynos-gs201-reboot.c +++ b/exynos-gs201-reboot.c @@ -18,9 +18,6 @@ #include <linux/mfd/samsung/s2mpg12.h> #include <linux/platform_device.h> #include <linux/reboot.h> -#if IS_ENABLED(CONFIG_GS_ACPM) -#include <soc/google/acpm_ipc_ctrl.h> -#endif #include <soc/google/exynos-el3_mon.h> #include "../../bms/google_bms.h" @@ -86,8 +83,8 @@ static void exynos_reboot_parse(const char *cmd) value = REBOOT_MODE_DMVERITY_CORRUPTED; } else if (!strcmp(cmd, "rescue")) { value = REBOOT_MODE_RESCUE; - } else if (!strcmp(cmd, "shutdown-thermal") || - !strcmp(cmd, "shutdown,thermal")) { + } else if (!strncmp(cmd, "shutdown-thermal", strlen("shutdown-thermal")) || + !strncmp(cmd, "shutdown,thermal", strlen("shutdown,thermal"))) { if (force_warm_reboot_on_thermal_shutdown) force_warm_reboot = true; value = REBOOT_MODE_SHUTDOWN_THERMAL; @@ -117,27 +114,6 @@ static int exynos_reboot_handler(struct notifier_block *nb, unsigned long mode, { exynos_reboot_parse(cmd); - if (mode != SYS_POWER_OFF) - return NOTIFY_DONE; - - while (1) { - /* wait for power button release */ - if (!pmic_read_pwrkey_status()) { -#if IS_ENABLED(CONFIG_GS_ACPM) - acpm_prepare_reboot(); -#endif - pr_info("ready to do power off.\n"); - break; - } else { - /* - * if power button is not released, - * wait and check TA again - */ - pr_info("PWR Key is not released.\n"); - } - mdelay(1000); - } - return NOTIFY_DONE; } @@ -148,10 +124,6 @@ static struct notifier_block exynos_reboot_nb = { static int exynos_restart_handler(struct notifier_block *this, unsigned long mode, void *cmd) { -#if IS_ENABLED(CONFIG_GS_ACPM) - acpm_prepare_reboot(); -#endif - pr_info("ready to do restart.\n"); return NOTIFY_DONE; |