diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-05-23 20:09:54 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-05-23 20:09:54 +0000 |
commit | a6df9a34ae49281942eac21b86e353f8f8f15b7d (patch) | |
tree | 34c6667041f97838aaf63f9a1b0a722bcdd96355 | |
parent | 4fed94bc56562e7231bb52c91863ab44e9041f17 (diff) | |
parent | 9b4bb088cf8f02bcebece637f0a1a6c33f3db29d (diff) | |
download | reset-android-gs-felix-5.10-u-beta5.tar.gz |
Snap for 10128799 from 9b4bb088cf8f02bcebece637f0a1a6c33f3db29d to android13-gs-pixel-5.10-releaseandroid-u-beta-5_r0.7android-u-beta-5_r0.5android-u-beta-5_r0.4android-u-beta-5_r0.3android-u-beta-5_r0.2android-u-beta-5_r0.1android-u-beta-5.2_r0.7android-u-beta-5.2_r0.6android-u-beta-5.2_r0.5android-u-beta-5.2_r0.3android-u-beta-5.2_r0.1android-u-beta-3_r0.5android-u-beta-3_r0.4android-14.0.0_r0.24android-gs-tangorpro-5.10-u-beta5.2android-gs-tangorpro-5.10-u-beta5android-gs-raviole-5.10-u-beta5.2android-gs-raviole-5.10-u-beta5android-gs-pantah-5.10-u-beta5android-gs-pantah-5.10-u-beta3android-gs-lynx-5.10-u-beta5.2android-gs-lynx-5.10-u-beta5android-gs-lynx-5.10-u-beta3android-gs-felix-5.10-u-beta5.2android-gs-felix-5.10-u-beta5android-gs-bluejay-5.10-u-beta5.2android-gs-bluejay-5.10-u-beta5
Change-Id: I8f0544ba012322079b56b6f9e7da80ba85413136
-rw-r--r-- | exynos-gs101-reboot.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/exynos-gs101-reboot.c b/exynos-gs101-reboot.c index c9bd602..834b4e8 100644 --- a/exynos-gs101-reboot.c +++ b/exynos-gs101-reboot.c @@ -31,11 +31,14 @@ #define BMS_RSBM_VALID BIT(31) +#define DUMP_GPR_MODE (0xDAB) + static struct regmap *pmureg; static u32 warm_reboot_offset, warm_reboot_trigger; static u32 cold_reboot_offset, cold_reboot_trigger; static u32 reboot_cmd_offset; static u32 shutdown_offset, shutdown_trigger; +static u32 dump_gpr_offset; static phys_addr_t pmu_alive_base; static bool rsbm_supported; static bool force_warm_reboot_on_thermal_shutdown; @@ -199,6 +202,11 @@ 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 (reboot_mode == REBOOT_WARM || reboot_mode == REBOOT_SOFT) + set_priv_reg(pmu_alive_base + dump_gpr_offset, DUMP_GPR_MODE); + else + set_priv_reg(pmu_alive_base + dump_gpr_offset, 0x0); + 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); @@ -274,6 +282,11 @@ static int exynos_reboot_probe(struct platform_device *pdev) reboot_cmd_offset = EXYNOS_PMU_SYSIP_DAT0; } + if (of_property_read_u32(np, "dump-gpr-offset", &dump_gpr_offset) < 0) { + dev_err(dev, "failed to find dump-gpr-offset property\n"); + return -EINVAL; + } + force_warm_reboot_on_thermal_shutdown = of_property_read_bool(np, "force-warm-reboot-on-thermal-shutdown"); |