> -----邮件原件----- > 发件人: Marek Vasut <[email protected]> > 发送时间: 2025年3月1日 3:12 > 收件人: Alice Guo (OSS) <[email protected]>; Tom Rini > <[email protected]>; Stefano Babic <[email protected]>; Fabio Estevam > <[email protected]>; dl-uboot-imx <[email protected]>; Lukasz > Majewski <[email protected]>; Sean Anderson <[email protected]>; Simon > Glass <[email protected]>; Alper Nebi Yasak <[email protected]>; > Alice Guo <[email protected]> > 抄送: [email protected]; Viorel Suman <[email protected]>; Ye Li > <[email protected]> > 主题: Re: [PATCH v6 02/20] firmware: scmi: smt: Interrupt communication > enable > > On 2/28/25 11:53 AM, Alice Guo (OSS) wrote: > > From: Viorel Suman <[email protected]> > > > > i.MX95 System Manager uses interrupt driven communication which > > requires the caller to set Bit[0] of channel flags to 1. When > > transmission completes and the previous general purpose interrupt has > > been processed by the other core, i.MX95 System Manager will set > > General Purpose Interrupt Control Register (GCR). U-Boot polls > > General-purpose Status > > (GSR) to check if the operation is finished. > > > > Signed-off-by: Viorel Suman <[email protected]> > > Signed-off-by: Alice Guo <[email protected]> > > Reviewed-by: Ye Li <[email protected]> > > --- > > drivers/firmware/scmi/Kconfig | 6 ++++++ > > drivers/firmware/scmi/smt.c | 13 +++++++++++++ > > 2 files changed, 19 insertions(+) > > > > diff --git a/drivers/firmware/scmi/Kconfig > > b/drivers/firmware/scmi/Kconfig index 8cf85f0d7a..eb62b88615 100644 > > --- a/drivers/firmware/scmi/Kconfig > > +++ b/drivers/firmware/scmi/Kconfig > > @@ -41,3 +41,9 @@ config SCMI_AGENT_OPTEE > > help > > Enable the SCMI communication channel based on OP-TEE > transport > > for compatible "linaro,scmi-optee". > > + > > +config SCMI_TRANSPORT_SMT_INTR > > + bool > > + depends on SCMI_FIRMWARE > > + help > > + Enable interrupt communication of shared memory based transport. > > diff --git a/drivers/firmware/scmi/smt.c b/drivers/firmware/scmi/smt.c > > index 67d2f45002..a0489f9718 100644 > > --- a/drivers/firmware/scmi/smt.c > > +++ b/drivers/firmware/scmi/smt.c > > @@ -20,6 +20,16 @@ > > > > #include "smt.h" > > > > +static 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; } > > + > > /** > > * Get shared memory configuration defined by the referred DT phandle > > * Return with a errno compliant value. > > @@ -48,6 +58,9 @@ int scmi_dt_get_smt_buffer(struct udevice *dev, struct > scmi_smt *smt) > > if (!smt->buf) > > return -ENOMEM; > > > > + if (IS_ENABLED(CONFIG_SCMI_TRANSPORT_SMT_INTR)) > > + scmi_smt_enable_intr(smt, true); > Would it be possible to check DT /firmware/scmi node for compatible == > "arm,scmi" and presence of "mboxes" property , and based on that , determine > that this is mailbox based SCMI ?
Hi Marek, Do you mean that replace IS_ENABLED(CONFIG_SCMI_TRANSPORT_SMT_INTR) by checking "arm,scmi" and "mboxes" in device tree? Best Regards, Alice Guo

