firmware: qcom_scm: Disable SDI during shutdown

Disable SDI WDOG during shutdown.

Change-Id: I7c642aa4fc6bb7187bcdc3e5ab42b3e7efa90984
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
This commit is contained in:
Elliot Berman 2020-02-25 08:09:52 -08:00
commit d85a226423
2 changed files with 7 additions and 4 deletions

View file

@ -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)

View file

@ -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);