remoteproc: qcom: pas: Carry PAS metadata context
authorBjorn Andersson <bjorn.andersson@linaro.org>
Fri, 28 Jan 2022 02:55:09 +0000 (18:55 -0800)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Fri, 4 Feb 2022 03:54:48 +0000 (21:54 -0600)
commit94749156e6bc0b3c2bb65e2a95babdef44b7d591
treeb35acb200449641df1fe23f51e6d5bf5c9ce57f8
parentf4e526ff7e38e27bb87d53131d227a6fd6f73ab5
remoteproc: qcom: pas: Carry PAS metadata context

Starting with Qualcomm SM8450 the metadata object shared with the secure
world during authentication and booting of a remoteproc needs to be
alive from init_image() until auth_and_reset().

Use the newly introduced "PAS metadata context" object to track this
context from load until the firmware has been booted.

In the even that load is performed but the process for some reason
doesn't reach auth_and_reset the unprepare callback is used to clean up
the allocated memory.

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-10-bjorn.andersson@linaro.org
drivers/remoteproc/qcom_q6v5_pas.c