Commit ebeb20a9 authored by Bjorn Andersson's avatar 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: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20220128025513.97188-8-bjorn.andersson@linaro.org
parent 75d7213c
......@@ -247,12 +247,8 @@ static int __qcom_mdt_load(struct device *dev, const struct firmware *fw,
ret, fw_name);
goto out;
}
}
if (relocate) {
if (pas_init) {
ret = qcom_scm_pas_mem_setup(pas_id, mem_phys,
max_addr - min_addr);
ret = qcom_scm_pas_mem_setup(pas_id, mem_phys, max_addr - min_addr);
if (ret) {
/* Unable to set up relocation */
dev_err(dev, "error %d setting up firmware %s\n",
......@@ -261,6 +257,7 @@ static int __qcom_mdt_load(struct device *dev, const struct firmware *fw,
}
}
if (relocate) {
/*
* The image is relocatable, so offset each segment based on
* the lowest segment address.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment