summaryrefslogtreecommitdiffstats
path: root/drivers/soc/qcom
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2022-01-27 18:55:07 -0800
committerBjorn Andersson <bjorn.andersson@linaro.org>2022-02-03 15:32:30 -0600
commitebeb20a9cd3f045a3371ccf3782b6cbcce62a7c9 (patch)
tree71567f4d3a87d2989bdb992afa3b1efdddd85b20 /drivers/soc/qcom
parent75d7213ce19135b8f309099f6618a03e9b397271 (diff)
downloadlinux-ebeb20a9cd3f045a3371ccf3782b6cbcce62a7c9.tar.gz
linux-ebeb20a9cd3f045a3371ccf3782b6cbcce62a7c9.tar.bz2
linux-ebeb20a9cd3f045a3371ccf3782b6cbcce62a7c9.zip
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: Bjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20220128025513.97188-8-bjorn.andersson@linaro.org
Diffstat (limited to 'drivers/soc/qcom')
-rw-r--r--drivers/soc/qcom/mdt_loader.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/soc/qcom/mdt_loader.c b/drivers/soc/qcom/mdt_loader.c
index ee991784a738..c8d43dc50cff 100644
--- a/drivers/soc/qcom/mdt_loader.c
+++ b/drivers/soc/qcom/mdt_loader.c
@@ -247,20 +247,17 @@ 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);
- if (ret) {
- /* Unable to set up relocation */
- dev_err(dev, "error %d setting up firmware %s\n",
- ret, fw_name);
- goto out;
- }
+ 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",
+ ret, fw_name);
+ goto out;
}
+ }
+ if (relocate) {
/*
* The image is relocatable, so offset each segment based on
* the lowest segment address.