Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a148f93a authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: reset: Disable SDI when dload mode is not supported"

parents 944f0908 adee9ee0
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -150,9 +150,6 @@ static void set_dload_mode(int on)
	if (ret)
		pr_err("Failed to set secure DLOAD mode: %d\n", ret);

	if (!on)
		scm_disable_sdi();

	dload_mode_enabled = on;
}

@@ -212,7 +209,7 @@ static int dload_set(const char *val, const struct kernel_param *kp)
#else
static void set_dload_mode(int on)
{
	scm_disable_sdi();
	return;
}

static void enable_emergency_dload_mode(void)
@@ -412,6 +409,7 @@ static void do_msm_restart(enum reboot_mode reboot_mode, const char *cmd)
		msm_trigger_wdog_bite();
#endif

	scm_disable_sdi();
	halt_spmi_pmic_arbiter();
	deassert_ps_hold();

@@ -423,6 +421,7 @@ static void do_msm_poweroff(void)
	pr_notice("Powering off the SoC\n");

	set_dload_mode(0);
	scm_disable_sdi();
	qpnp_pon_system_pwr_off(PON_POWER_OFF_SHUTDOWN);

	halt_spmi_pmic_arbiter();
@@ -675,6 +674,8 @@ static int msm_restart_probe(struct platform_device *pdev)
		scm_deassert_ps_hold_supported = true;

	set_dload_mode(download_mode);
	if (!download_mode)
		scm_disable_sdi();

	return 0;