Re: [PATCH v2 2/6] firmware: qcom_scm: Transition to ICE TZ agnostic operations
From: Harshal Dev
Date: Mon Nov 16 2026 - 06:25:34 EST
Hi Eric,
On 14-11-2026 03:04 am, Eric Biggers wrote:
> On Wed, Nov 11, 2026 at 07:47:02PM +0530, Harshal Dev wrote:
>> Transition the ICE related SCM calls to the generic ICE TZ operations by
>> registering them with the ICE driver and wrapping them in exported APIs
>> with the same signature.
>>
>> This prepares the ICE driver for eventual migration to the TZ agnostic
>> secure programming interfaces once the TEE bus based back-end becomes
>> available.
>>
>> Signed-off-by: Harshal Dev <harshal.dev@xxxxxxxxxxxxxxxx>
>> ---
>> drivers/firmware/qcom/qcom_scm.c | 131 +++++++++++++++++++++++++++++++--------
>> 1 file changed, 106 insertions(+), 25 deletions(-)
>
> Wouldn't it make more sense to leave qcom_scm alone, and have qcom_ice
> decide whether it should call qcom_scm_ice_*() or the OP-TEE backend?
> That would avoid the circular dependency between qcom_scm and qcom_ice
> which this patch introduces, and eliminate the need for patches 2 and 6.
>
I agree actually. The QCOM_SCM and QCOM_PAS already have a circular dependency
because of the function pointer registration approach. I guess it is much
easier the way you suggested. I'll try this approach.
Corresponding to qcom_scm_is_available() and qcom_scm_ice_is_available() we
should have corresponding APIs from the OPTEE back-end; qcom_tee_is_available()
and qcom_tee_ice_is_available(). The qcom_ice_tz_ops_(un)register() can be dropped.
Ack.
Regards,
Harshal
> - Eric