Loading drivers/power/reset/msm-poweroff.c +9 −6 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ static int restart_mode; static void *restart_reason, *dload_type_addr; static void *restart_reason; static bool scm_pmic_arbiter_disable_supported; static bool scm_deassert_ps_hold_supported; /* Download mode master kill-switch */ Loading @@ -60,8 +60,6 @@ static void scm_disable_sdi(void); * There is no API from TZ to re-enable the registers. * So the SDI cannot be re-enabled when it already by-passed. */ static int download_mode = 1; static struct kobject dload_kobj; #ifdef CONFIG_QCOM_DLOAD_MODE #define EDL_MODE_PROP "qcom,msm-imem-emergency_download_mode" Loading @@ -71,7 +69,9 @@ static struct kobject dload_kobj; #endif static int in_panic; static void *dload_mode_addr; static int download_mode = 1; static struct kobject dload_kobj; static void *dload_mode_addr, *dload_type_addr; static bool dload_mode_enabled; static void *emergency_dload_mode_addr; #ifdef CONFIG_RANDOMIZE_BASE Loading Loading @@ -268,9 +268,9 @@ static void halt_spmi_pmic_arbiter(void) static void msm_restart_prepare(const char *cmd) { #ifdef CONFIG_QCOM_DLOAD_MODE bool need_warm_reset = false; #ifdef CONFIG_QCOM_DLOAD_MODE /* Write download mode flags if we're panic'ing * Write download mode flags if restart_mode says so Loading Loading @@ -409,6 +409,7 @@ static void do_msm_poweroff(void) return; } #ifdef CONFIG_QCOM_DLOAD_MODE static ssize_t attr_show(struct kobject *kobj, struct attribute *attr, char *buf) { Loading Loading @@ -486,6 +487,7 @@ static struct attribute *reset_attrs[] = { static struct attribute_group reset_attr_group = { .attrs = reset_attrs, }; #endif static int msm_restart_probe(struct platform_device *pdev) { Loading Loading @@ -599,11 +601,12 @@ skip_sysfs_create: if (scm_is_call_available(SCM_SVC_PWR, SCM_IO_DEASSERT_PS_HOLD) > 0) scm_deassert_ps_hold_supported = true; #ifdef CONFIG_QCOM_DLOAD_MODE download_mode = scm_is_secure_device(); set_dload_mode(download_mode); if (!download_mode) scm_disable_sdi(); #endif return 0; err_restart_reason: Loading Loading
drivers/power/reset/msm-poweroff.c +9 −6 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ static int restart_mode; static void *restart_reason, *dload_type_addr; static void *restart_reason; static bool scm_pmic_arbiter_disable_supported; static bool scm_deassert_ps_hold_supported; /* Download mode master kill-switch */ Loading @@ -60,8 +60,6 @@ static void scm_disable_sdi(void); * There is no API from TZ to re-enable the registers. * So the SDI cannot be re-enabled when it already by-passed. */ static int download_mode = 1; static struct kobject dload_kobj; #ifdef CONFIG_QCOM_DLOAD_MODE #define EDL_MODE_PROP "qcom,msm-imem-emergency_download_mode" Loading @@ -71,7 +69,9 @@ static struct kobject dload_kobj; #endif static int in_panic; static void *dload_mode_addr; static int download_mode = 1; static struct kobject dload_kobj; static void *dload_mode_addr, *dload_type_addr; static bool dload_mode_enabled; static void *emergency_dload_mode_addr; #ifdef CONFIG_RANDOMIZE_BASE Loading Loading @@ -268,9 +268,9 @@ static void halt_spmi_pmic_arbiter(void) static void msm_restart_prepare(const char *cmd) { #ifdef CONFIG_QCOM_DLOAD_MODE bool need_warm_reset = false; #ifdef CONFIG_QCOM_DLOAD_MODE /* Write download mode flags if we're panic'ing * Write download mode flags if restart_mode says so Loading Loading @@ -409,6 +409,7 @@ static void do_msm_poweroff(void) return; } #ifdef CONFIG_QCOM_DLOAD_MODE static ssize_t attr_show(struct kobject *kobj, struct attribute *attr, char *buf) { Loading Loading @@ -486,6 +487,7 @@ static struct attribute *reset_attrs[] = { static struct attribute_group reset_attr_group = { .attrs = reset_attrs, }; #endif static int msm_restart_probe(struct platform_device *pdev) { Loading Loading @@ -599,11 +601,12 @@ skip_sysfs_create: if (scm_is_call_available(SCM_SVC_PWR, SCM_IO_DEASSERT_PS_HOLD) > 0) scm_deassert_ps_hold_supported = true; #ifdef CONFIG_QCOM_DLOAD_MODE download_mode = scm_is_secure_device(); set_dload_mode(download_mode); if (!download_mode) scm_disable_sdi(); #endif return 0; err_restart_reason: Loading