[PATCH v1 2/2] firmware: scmi: smt: enable doorbel return
alice.guo at oss.nxp.com
alice.guo at oss.nxp.com
Sun Oct 6 09:07:02 CEST 2024
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);
/*
--
2.34.1
More information about the U-Boot
mailing list