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

Commit d85a2264 authored by Elliot Berman's avatar Elliot Berman
Browse files

firmware: qcom_scm: Disable SDI during shutdown



Disable SDI WDOG during shutdown.

Change-Id: I7c642aa4fc6bb7187bcdc3e5ab42b3e7efa90984
Signed-off-by: default avatarElliot Berman <eberman@codeaurora.org>
parent ad4ce8c7
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1097,6 +1097,12 @@ static int qcom_scm_probe(struct platform_device *pdev)
	return 0;
}

static void qcom_scm_shutdown(struct platform_device *pdev)
{
	qcom_scm_disable_sdi();
	qcom_scm_halt_spmi_pmic_arbiter();
}

static const struct of_device_id qcom_scm_dt_match[] = {
	{ .compatible = "qcom,scm-apq8064",
	  /* FIXME: This should have .data = (void *) SCM_HAS_CORE_CLK */
@@ -1127,6 +1133,7 @@ static struct platform_driver qcom_scm_driver = {
		.of_match_table = qcom_scm_dt_match,
	},
	.probe = qcom_scm_probe,
	.shutdown = qcom_scm_shutdown,
};

static int __init qcom_scm_init(void)
+0 −4
Original line number Diff line number Diff line
@@ -502,8 +502,6 @@ static int do_msm_restart(struct notifier_block *unused, unsigned long action,

	msm_restart_prepare(cmd);

	qcom_scm_disable_sdi();
	qcom_scm_halt_spmi_pmic_arbiter();
	deassert_ps_hold();

	msleep(10000);
@@ -516,10 +514,8 @@ static void do_msm_poweroff(void)
	pr_notice("Powering off the SoC\n");

	set_dload_mode(0);
	qcom_scm_disable_sdi();
	qpnp_pon_system_pwr_off(PON_POWER_OFF_SHUTDOWN);

	qcom_scm_halt_spmi_pmic_arbiter();
	deassert_ps_hold();

	msleep(10000);