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

Commit aef9e934 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: msm: Allow configuring reset type via secure I/O"

parents 1588ccd9 dfc69029
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -9,6 +9,13 @@ Required Properties:
-compatible: "qcom,pshold"
-reg: Specifies the physical address of the ps-hold register

Optional Properties:
-reg: A secondary reg address/size pair may be provided, to specify the address
      of the TCSR_BOOT_MISC_DETECT register. This address is typically used to
      configure the type of reset desired. Omitting this address implies that
      the reset type shall be configured by means of a call to the secure
      environment.

Example:

	restart@fc4ab000 {
+10 −1
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ static bool scm_pmic_arbiter_disable_supported;
static bool scm_deassert_ps_hold_supported;
/* Download mode master kill-switch */
static void __iomem *msm_ps_hold;
static phys_addr_t tcsr_boot_misc_detect;

#ifdef CONFIG_MSM_DLOAD_MODE
#define EDL_MODE_PROP "qcom,msm-imem-emergency_download_mode"
@@ -84,8 +85,12 @@ int scm_set_dload_mode(int arg1, int arg2)
		.arginfo = SCM_ARGS(2),
	};

	if (!scm_dload_supported)
	if (!scm_dload_supported) {
		if (tcsr_boot_misc_detect)
			return scm_io_write(tcsr_boot_misc_detect, arg1);

		return 0;
	}

	if (!is_scm_armv8())
		return scm_call_atomic2(SCM_SVC_BOOT, SCM_DLOAD_CMD, arg1,
@@ -401,6 +406,10 @@ static int msm_restart_probe(struct platform_device *pdev)
	if (IS_ERR(msm_ps_hold))
		return PTR_ERR(msm_ps_hold);

	mem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
	if (mem)
		tcsr_boot_misc_detect = mem->start;

	pm_power_off = do_msm_poweroff;
	arm_pm_restart = do_msm_restart;