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

Commit 3d0d0e6a authored by Stepan Moskovchenko's avatar Stepan Moskovchenko Committed by Kishan Kumar
Browse files

power: reset: msm: Defer set_dload_mode to end of probe



The set_dload_mode() call in msm_restart_probe() may depend
on the TCSR base address, which is initialized later in the
probe function. Move this call to the end of
msm_restart_probe() to avoid potentially trying to use an
uninitialized resource.

Change-Id: I65c408f065cc7c68a929ec43d50b0a493942a189
Signed-off-by: default avatarStepan Moskovchenko <stepanm@codeaurora.org>
parent 91e8b447
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -381,7 +381,6 @@ static int msm_restart_probe(struct platform_device *pdev)
			pr_err("unable to map imem EDLOAD mode offset\n");
	}

	set_dload_mode(download_mode);
#endif
	np = of_find_compatible_node(NULL, NULL,
				"qcom,msm-imem-restart_reason");
@@ -410,6 +409,8 @@ static int msm_restart_probe(struct platform_device *pdev)
	if (scm_is_call_available(SCM_SVC_PWR, SCM_IO_DEASSERT_PS_HOLD) > 0)
		scm_deassert_ps_hold_supported = true;

	set_dload_mode(download_mode);

	return 0;

err_restart_reason: