mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
Merge c7fecf0481 on remote branch
Change-Id: I82c23d4259365c57552bc9f98ef4398b0a80eb36
This commit is contained in:
commit
08a359c69f
4 changed files with 18 additions and 22 deletions
|
|
@ -1229,6 +1229,7 @@ static void qcom_scm_shutdown(struct platform_device *pdev)
|
|||
{
|
||||
qcom_scm_disable_sdi();
|
||||
qcom_scm_halt_spmi_pmic_arbiter();
|
||||
/* Clean shutdown, disable download mode to allow normal restart */
|
||||
qcom_scm_set_download_mode(QCOM_DOWNLOAD_NODUMP, 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ enum qcom_download_dest {
|
|||
|
||||
struct qcom_dload {
|
||||
struct notifier_block panic_nb;
|
||||
struct notifier_block reboot_nb;
|
||||
struct notifier_block restart_nb;
|
||||
struct kobject kobj;
|
||||
|
||||
bool in_panic;
|
||||
|
|
@ -251,28 +251,15 @@ static int qcom_dload_panic(struct notifier_block *this, unsigned long event,
|
|||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
static int qcom_dload_reboot(struct notifier_block *this, unsigned long event,
|
||||
static int qcom_dload_restart(struct notifier_block *this, unsigned long event,
|
||||
void *ptr)
|
||||
{
|
||||
char *cmd = ptr;
|
||||
struct qcom_dload *poweroff = container_of(this, struct qcom_dload,
|
||||
reboot_nb);
|
||||
|
||||
/* Clean shutdown, disable dump mode to allow normal restart */
|
||||
if (!poweroff->in_panic)
|
||||
set_download_mode(QCOM_DOWNLOAD_NODUMP);
|
||||
|
||||
if (cmd) {
|
||||
if (!strcmp(cmd, "edl")) {
|
||||
early_pcie_init_enable ? set_download_mode(QCOM_EDLOAD_PCI_MODE)
|
||||
: set_download_mode(QCOM_DOWNLOAD_EDL);
|
||||
}
|
||||
else if (!strcmp(cmd, "qcom_dload"))
|
||||
msm_enable_dump_mode(true);
|
||||
}
|
||||
|
||||
if (current_download_mode != QCOM_DOWNLOAD_NODUMP)
|
||||
if (cmd && !strcmp(cmd, "edl")) {
|
||||
set_download_mode(QCOM_DOWNLOAD_EDL);
|
||||
reboot_mode = REBOOT_WARM;
|
||||
}
|
||||
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
|
@ -381,9 +368,14 @@ static int qcom_dload_probe(struct platform_device *pdev)
|
|||
atomic_notifier_chain_register(&panic_notifier_list,
|
||||
&poweroff->panic_nb);
|
||||
|
||||
poweroff->reboot_nb.notifier_call = qcom_dload_reboot;
|
||||
poweroff->reboot_nb.priority = 255;
|
||||
register_reboot_notifier(&poweroff->reboot_nb);
|
||||
poweroff->restart_nb.notifier_call = qcom_dload_restart;
|
||||
/* Here, Restart handler priority should be higher than
|
||||
* of restart handler present in scm driver so that
|
||||
* reboot_mode set by this handler seen by SCM's one
|
||||
* for EDL mode.
|
||||
*/
|
||||
poweroff->restart_nb.priority = 131;
|
||||
register_restart_handler(&poweroff->restart_nb);
|
||||
|
||||
platform_set_drvdata(pdev, poweroff);
|
||||
|
||||
|
|
@ -396,7 +388,7 @@ static int qcom_dload_remove(struct platform_device *pdev)
|
|||
|
||||
atomic_notifier_chain_unregister(&panic_notifier_list,
|
||||
&poweroff->panic_nb);
|
||||
unregister_reboot_notifier(&poweroff->reboot_nb);
|
||||
unregister_restart_handler(&poweroff->restart_nb);
|
||||
|
||||
if (poweroff->dload_dest_addr)
|
||||
iounmap(poweroff->dload_dest_addr);
|
||||
|
|
|
|||
|
|
@ -781,8 +781,10 @@ static const struct soc_id soc_id[] = {
|
|||
{ 450, "SHIMA" },
|
||||
{ 454, "HOLI" },
|
||||
{ 507, "BLAIR" },
|
||||
{ 578, "BLAIR-LITE" },
|
||||
{ 565, "BLAIRP" },
|
||||
{ 628, "BLAIRP-XR" },
|
||||
{ 647, "BLAIRP-LTE" },
|
||||
{ 486, "MONACO" },
|
||||
{ 458, "SDXLEMUR" },
|
||||
{ 483, "SDXLEMUR-SD"},
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ static int qcom_smd_qrtr_probe(struct rpmsg_device *rpdev)
|
|||
svc_arr, size);
|
||||
}
|
||||
rc = qrtr_endpoint_register(&qdev->ep, net_id, rt, svc_arr);
|
||||
kfree(svc_arr);
|
||||
|
||||
if (rc)
|
||||
return rc;
|
||||
|
|
|
|||
Loading…
Reference in a new issue