[PATCH v1 2/2] firmware: scmi: smt: enable doorbel return

Tom Rini trini at konsulko.com
Mon Oct 7 19:00:05 CEST 2024


On Sun, Oct 06, 2024 at 03:07:02PM +0800, alice.guo at oss.nxp.com wrote:
> From: Viorel Suman <viorel.suman at nxp.com>
> 
> Enable doorbel return to work iMX95 System Manager.
> 
> Signed-off-by: Viorel Suman <viorel.suman at nxp.com>
> Signed-off-by: Alice Guo <alice.guo at nxp.com>
> Reviewed-by: Ye Li <ye.li at nxp.com>
> ---
>  drivers/firmware/scmi/smt.c |  3 +++
>  drivers/firmware/scmi/smt.h | 10 ++++++++++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/drivers/firmware/scmi/smt.c b/drivers/firmware/scmi/smt.c
> index e9d401f0da..98e07d3a16 100644
> --- a/drivers/firmware/scmi/smt.c
> +++ b/drivers/firmware/scmi/smt.c
> @@ -49,6 +49,9 @@ int scmi_dt_get_smt_buffer(struct udevice *dev, struct scmi_smt *smt)
>  	if (!smt->buf)
>  		return -ENOMEM;
>  
> +	/* make this configurable as function of DTS property */
> +	scmi_smt_enable_intr(smt, true);
> +
>  #ifdef CONFIG_ARM
>  	if (dcache_status()) {
>  		if (IS_ENABLED(CONFIG_ARM64))
> diff --git a/drivers/firmware/scmi/smt.h b/drivers/firmware/scmi/smt.h
> index 9d669a6c92..768b0f4c8a 100644
> --- a/drivers/firmware/scmi/smt.h
> +++ b/drivers/firmware/scmi/smt.h
> @@ -84,6 +84,16 @@ static inline void scmi_smt_put_channel(struct scmi_smt *smt)
>  	hdr->channel_status &= ~SCMI_SHMEM_CHAN_STAT_CHANNEL_ERROR;
>  }
>  
> +static inline void scmi_smt_enable_intr(struct scmi_smt *smt, bool enable)
> +{
> +	struct scmi_smt_header *hdr = (void *)smt->buf;
> +
> +	if (enable)
> +		hdr->flags |= SCMI_SHMEM_FLAG_INTR_ENABLED;
> +	else
> +		hdr->flags &= ~SCMI_SHMEM_FLAG_INTR_ENABLED;
> +}
> +
>  int scmi_dt_get_smt_buffer(struct udevice *dev, struct scmi_smt *smt);

Where is this being configured based on the DT? The only caller only
passes "true" without a check anywhere.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20241007/54e6e982/attachment.sig>


More information about the U-Boot mailing list