[PATCH v3 02/17] firmware: scmi: smt: Interrupt communication enable
Marek Vasut
marex at denx.de
Sun Jan 5 21:59:13 CET 2025
On 1/3/25 7:45 AM, Alice Guo wrote:
> From: Viorel Suman <viorel.suman at nxp.com>
>
> When interrupt driven communication is supported
U-Boot does not use interrupts.
> , the transport allows
> the caller to choose between interrupt and polling driven
> communications. To make the choice, the channel flags are used. i.MX95
> uses interrupt driven communication so that Channel flags should be set
> to 1.
How does this work in U-Boot, which does not use interrupts ?
> 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 | 4 ++++
> drivers/firmware/scmi/smt.h | 10 ++++++++++
> 2 files changed, 14 insertions(+)
>
> diff --git a/drivers/firmware/scmi/smt.c b/drivers/firmware/scmi/smt.c
> index 67d2f45002490ab64a6bc997eda93a8f4681d99b..e5b902dcb0e641065f4c0faae6bc6660a7e2c6af 100644
> --- a/drivers/firmware/scmi/smt.c
> +++ b/drivers/firmware/scmi/smt.c
> @@ -48,6 +48,10 @@ int scmi_dt_get_smt_buffer(struct udevice *dev, struct scmi_smt *smt)
> if (!smt->buf)
> return -ENOMEM;
>
> + /* Command should complete via an interrupt so that set Channel flags to 1. */
> + if (IS_ENABLED(CONFIG_IMX95))
> + scmi_smt_enable_intr(smt, true);
This SoC specific stuff shouldn't be in generic code.
Can this be moved elsewhere ?
More information about the U-Boot
mailing list