提交 ebeb20a9 编写于 作者: B Bjorn Andersson

soc: qcom: mdt_loader: Always invoke PAS mem_setup

After spelunking various old kernel trees no finds has been found
indicating that the PAS mem_setup call should actually be made
conditional on the image being relocatable.

Group the two PAS operations together, to facilitate splitting them out
in a following patch.
Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: NDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20220128025513.97188-8-bjorn.andersson@linaro.org
上级 75d7213c
...@@ -247,20 +247,17 @@ static int __qcom_mdt_load(struct device *dev, const struct firmware *fw, ...@@ -247,20 +247,17 @@ static int __qcom_mdt_load(struct device *dev, const struct firmware *fw,
ret, fw_name); ret, fw_name);
goto out; goto out;
} }
}
if (relocate) { ret = qcom_scm_pas_mem_setup(pas_id, mem_phys, max_addr - min_addr);
if (pas_init) { if (ret) {
ret = qcom_scm_pas_mem_setup(pas_id, mem_phys, /* Unable to set up relocation */
max_addr - min_addr); dev_err(dev, "error %d setting up firmware %s\n",
if (ret) { ret, fw_name);
/* Unable to set up relocation */ goto out;
dev_err(dev, "error %d setting up firmware %s\n",
ret, fw_name);
goto out;
}
} }
}
if (relocate) {
/* /*
* The image is relocatable, so offset each segment based on * The image is relocatable, so offset each segment based on
* the lowest segment address. * the lowest segment address.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册