Re: [PATCH v1 1/2] soc: mediatek: add header for SiP service interface

From: Stanley Chu
Date: Sun Dec 08 2019 - 00:37:35 EST


Hi Florian,

On Sun, 2019-12-08 at 01:40 +0800, Florian Fainelli wrote:

> > +#ifdef CONFIG_ARM64
> > +#define MTK_SIP_SMC_AARCH_BIT 0x40000000
> > +#else
> > +#define MTK_SIP_SMC_AARCH_BIT 0x00000000
> > +#endif
>
> Cannot you use the definitions from include/linux/arm-smccc.h and use
> ARM_SMCCC_CALL_CONV_SHIFT here and associated helpers?
>
> > +
> > +/* UFS related SMC call */
> > +#define MTK_SIP_UFS_CONTROL \
> > + (0x82000276 | MTK_SIP_SMC_AARCH_BIT)
>
> Does bit 31 map to the fast vs. slow call of the ARM SMCCC convention or
> does it have a different meaning (should not). Likewise bit 25 would be
> ARM_SMMCCC_OWNER_SIP no?
>
> That would leave us with only 0x276 which is a valid function number.

Thanks so much for these comments.
I'll try to use suitable definitions instead in next version.

Stanley