Message ID | 20230507172041.2320279-1-dmitry.baryshkov@linaro.org |
---|---|
State | New |
Headers | show |
Series | remoteproc: qcom_q6v5_mss: support loading MBN file on msm8974 | expand |
diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c index ab053084f7a2..1603c5be44c8 100644 --- a/drivers/remoteproc/qcom_q6v5_mss.c +++ b/drivers/remoteproc/qcom_q6v5_mss.c @@ -477,7 +477,11 @@ static int q6v5_load(struct rproc *rproc, const struct firmware *fw) return -EBUSY; } - memcpy(mba_region, fw->data, fw->size); + if (qproc->version == MSS_MSM8974 && + !memcmp(fw->data, ELFMAG, SELFMAG)) + memcpy(mba_region, fw->data + 0x1000, fw->size - 0x1000); + else + memcpy(mba_region, fw->data, fw->size); q6v5_debug_policy_load(qproc, mba_region); memunmap(mba_region);
On MSM8974 and APQ8074 the MSS requires loading raw MBA image instead of the ELF file. Skip the ELF headers if mba.mbn was specified as the firmware image. Fixes: 051fb70fd4ea ("remoteproc: qcom: Driver for the self-authenticating Hexagon v5") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> --- drivers/remoteproc/qcom_q6v5_mss.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)