From nobody Sun Feb 8 20:53:16 2026 Received: from srv01.abscue.de (abscue.de [89.58.28.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA514347BBF; Sat, 10 Jan 2026 15:44:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.58.28.240 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768059873; cv=none; b=ngnVt7dY+C8NrhjrPwciqU5rPL2snSBq4hR/4dNnoXUJTxHW6oRIhZDHyE93pOmLhUxBfu/hUEJoXOk2LhL3BGjxo3MoNUSJHxYrTRYmPoxkoWk3lA8HXFLCdpuaMbL86qZPmBs2v45qt/toUbkHnBqS9Sb1cERwi4FvcOnU95w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768059873; c=relaxed/simple; bh=htEEoJCZ/bfiOYrSmY569PpuX3Mj9YagDELUDKQbxFM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=lfEZB3v2EkUbtxKWmbS2RTGNxNroqbPWiE/RcioNY0GJiRJwJczbfFU2lWxz0xMKVfCDtw1aq9xVS3Z/IpjGd8An5nynh7ipDr/maiklI5oALvNQD7Wud7tOZm1TGLRCHrJWmqFBW2SnI1zA7252ebom4EINV/7xcxB9kxeBnJ4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=abscue.de; spf=pass smtp.mailfrom=abscue.de; arc=none smtp.client-ip=89.58.28.240 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=abscue.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=abscue.de Received: from srv01.abscue.de (localhost [127.0.0.1]) by spamfilter.srv.local (Postfix) with ESMTP id AE43C1C2454; Sat, 10 Jan 2026 16:44:12 +0100 (CET) X-Spam-Level: Received: from fluffy-mammal.metal.fwg-cag.de (unknown [IPv6:2001:9e8:cdde:8c00:6078:eb97:88d9:587f]) by srv01.abscue.de (Postfix) with ESMTPSA id 27C421C244E; Sat, 10 Jan 2026 16:44:12 +0100 (CET) From: =?utf-8?q?Otto_Pfl=C3=BCger?= Date: Sat, 10 Jan 2026 16:43:35 +0100 Subject: [PATCH 1/4] dt-bindings: mailbox: sprd: add compatible for UMS9230 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260110-ums9230-mailbox-v1-1-5941cab4f4e5@abscue.de> References: <20260110-ums9230-mailbox-v1-0-5941cab4f4e5@abscue.de> In-Reply-To: <20260110-ums9230-mailbox-v1-0-5941cab4f4e5@abscue.de> To: Jassi Brar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Orson Zhai , Baolin Wang , Chunyan Zhang Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, =?utf-8?q?Otto_Pfl=C3=BCger?= X-Mailer: b4 0.14.2 Add a compatible string for the mailbox controller found in the UMS9230 SoC. Signed-off-by: Otto Pfl=C3=BCger Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/mailbox/sprd-mailbox.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/mailbox/sprd-mailbox.yaml b/= Documentation/devicetree/bindings/mailbox/sprd-mailbox.yaml index b526f9c0c272b566688748302b5d939773d9932a..bf6ab4e7050cb75657977b9a07a= aeb8191183510 100644 --- a/Documentation/devicetree/bindings/mailbox/sprd-mailbox.yaml +++ b/Documentation/devicetree/bindings/mailbox/sprd-mailbox.yaml @@ -16,6 +16,7 @@ properties: enum: - sprd,sc9860-mailbox - sprd,sc9863a-mailbox + - sprd,ums9230-mailbox =20 reg: items: --=20 2.50.0 From nobody Sun Feb 8 20:53:16 2026 Received: from srv01.abscue.de (abscue.de [89.58.28.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA58F347BC6; Sat, 10 Jan 2026 15:44:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.58.28.240 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768059872; cv=none; b=lx6t1yHSWfBzib8xlcN063KZ8HarvSjRHU1JHk77M86rxdUEoJk4pp4bGVfcCZpNcifHKCa8gXqq/avV6k9Dt6jk6qMMtZY5bNCNTu3LTIofCOQf1sF1cgu3bco3/PuLnJW+wa+hPDphM08pJENKV+z1R0QBkWjeqacXn29zsqA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768059872; c=relaxed/simple; bh=JVaZLM5WDONsNI8JffNk5QnOirU9Fr9+0Vc7reZjQD0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XtjJVO6BT8CK+yByzdaIzmMfAJja5t9oqnVoluuOiJlSaKBxFvF/RuywAT+I+L6UPVBmCnRnuTV4cmsh4O8jbkfQGvvzNDvdjRkqo6IC9AREdBOcd9p+exaHN7TICDYUA72oQhAItWomA5yAODXXlrGUS8mlsoI6wsSnNvm3gjo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=abscue.de; spf=pass smtp.mailfrom=abscue.de; arc=none smtp.client-ip=89.58.28.240 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=abscue.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=abscue.de Received: from srv01.abscue.de (localhost [127.0.0.1]) by spamfilter.srv.local (Postfix) with ESMTP id 036811C2456; Sat, 10 Jan 2026 16:44:12 +0100 (CET) X-Spam-Level: Received: from fluffy-mammal.metal.fwg-cag.de (unknown [IPv6:2001:9e8:cdde:8c00:6078:eb97:88d9:587f]) by srv01.abscue.de (Postfix) with ESMTPSA id 6E5151C2450; Sat, 10 Jan 2026 16:44:12 +0100 (CET) From: =?utf-8?q?Otto_Pfl=C3=BCger?= Date: Sat, 10 Jan 2026 16:43:36 +0100 Subject: [PATCH 2/4] mailbox: sprd: clear delivery flag before handling TX done Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260110-ums9230-mailbox-v1-2-5941cab4f4e5@abscue.de> References: <20260110-ums9230-mailbox-v1-0-5941cab4f4e5@abscue.de> In-Reply-To: <20260110-ums9230-mailbox-v1-0-5941cab4f4e5@abscue.de> To: Jassi Brar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Orson Zhai , Baolin Wang , Chunyan Zhang Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, =?utf-8?q?Otto_Pfl=C3=BCger?= X-Mailer: b4 0.14.2 If there are any pending messages in the mailbox queue, they are sent as soon as a TX done event arrives from the driver. This may trigger a new delivery interrupt while the previous one is still being handled. If the delivery status is cleared after this, the interrupt is lost. To prevent this from happening, clear the delivery status immediately after checking it and before any new messages are sent. Signed-off-by: Otto Pfl=C3=BCger --- drivers/mailbox/sprd-mailbox.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mailbox/sprd-mailbox.c b/drivers/mailbox/sprd-mailbox.c index ee8539dfcef549317f7b86321930bd6bef044598..9a3d388f76b78632ca08948e0fe= 0ad484aed23c3 100644 --- a/drivers/mailbox/sprd-mailbox.c +++ b/drivers/mailbox/sprd-mailbox.c @@ -166,6 +166,11 @@ static irqreturn_t sprd_mbox_inbox_isr(int irq, void *= data) return IRQ_NONE; } =20 + /* Clear FIFO delivery and overflow status first */ + writel(fifo_sts & + (SPRD_INBOX_FIFO_DELIVER_MASK | SPRD_INBOX_FIFO_OVERLOW_MASK), + priv->inbox_base + SPRD_MBOX_FIFO_RST); + while (send_sts) { id =3D __ffs(send_sts); send_sts &=3D (send_sts - 1); @@ -181,11 +186,6 @@ static irqreturn_t sprd_mbox_inbox_isr(int irq, void *= data) mbox_chan_txdone(chan, 0); } =20 - /* Clear FIFO delivery and overflow status */ - writel(fifo_sts & - (SPRD_INBOX_FIFO_DELIVER_MASK | SPRD_INBOX_FIFO_OVERLOW_MASK), - priv->inbox_base + SPRD_MBOX_FIFO_RST); - /* Clear irq status */ writel(SPRD_MBOX_IRQ_CLR, priv->inbox_base + SPRD_MBOX_IRQ_STS); =20 --=20 2.50.0 From nobody Sun Feb 8 20:53:16 2026 Received: from srv01.abscue.de (abscue.de [89.58.28.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA496346AE1; Sat, 10 Jan 2026 15:44:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.58.28.240 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768059872; cv=none; b=V2B4txtQU/0vmq841g0zteCqz9KQ2nY/OcIHcbsH5+OUMP6JX1k2afcPAg1mnGdRm9klnbq47hP46xJA8RCv8vlACIOFsM93Ycb8KLnD8azvrujJ1WcoQbyq1tnrWTHrzt5UviefoAAmqGZOJPAvcDCCLOVlLVwGjAibhDO+7tc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768059872; c=relaxed/simple; bh=PkBPu+tWvPkl0xbuWH6Qyz3LhAXO77UNVvavcNOk5nE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=awE//0/YkCzASCtwjiQofceakB1IkYqumorPmBs7GjH6YgJh0mprI50nO4s66f9xUakzjWAkIQAFCiNKJ/It1kKRsMDkmCI392Lf8bXaAsJgoFL4DzQxZJ4rn1FbzPUXlvwlDlT1SLS/tfXwJKy05Gq5FyV2Iu9vYOejGPnVY1c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=abscue.de; spf=pass smtp.mailfrom=abscue.de; arc=none smtp.client-ip=89.58.28.240 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=abscue.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=abscue.de Received: from srv01.abscue.de (localhost [127.0.0.1]) by spamfilter.srv.local (Postfix) with ESMTP id BEB871C2450; Sat, 10 Jan 2026 16:44:16 +0100 (CET) X-Spam-Level: Received: from fluffy-mammal.metal.fwg-cag.de (unknown [IPv6:2001:9e8:cdde:8c00:6078:eb97:88d9:587f]) by srv01.abscue.de (Postfix) with ESMTPSA id B93431C2455; Sat, 10 Jan 2026 16:44:12 +0100 (CET) From: =?utf-8?q?Otto_Pfl=C3=BCger?= Date: Sat, 10 Jan 2026 16:43:37 +0100 Subject: [PATCH 3/4] mailbox: sprd: add support for mailbox revision 2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260110-ums9230-mailbox-v1-3-5941cab4f4e5@abscue.de> References: <20260110-ums9230-mailbox-v1-0-5941cab4f4e5@abscue.de> In-Reply-To: <20260110-ums9230-mailbox-v1-0-5941cab4f4e5@abscue.de> To: Jassi Brar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Orson Zhai , Baolin Wang , Chunyan Zhang Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, =?utf-8?q?Otto_Pfl=C3=BCger?= X-Mailer: b4 0.14.2 Newer Unisoc SoCs such as UMS9230 include a new revision of the mailbox IP with support for up to 16 channels. Since the new revision has a similar register layout and many parts have remained unchanged, make the driver support both revisions. Signed-off-by: Otto Pfl=C3=BCger --- drivers/mailbox/sprd-mailbox.c | 103 ++++++++++++++++++++++++++++++++-----= ---- 1 file changed, 82 insertions(+), 21 deletions(-) diff --git a/drivers/mailbox/sprd-mailbox.c b/drivers/mailbox/sprd-mailbox.c index 9a3d388f76b78632ca08948e0fe0ad484aed23c3..26256581a76ad59785a1c87a34e= b91f5985dc948 100644 --- a/drivers/mailbox/sprd-mailbox.c +++ b/drivers/mailbox/sprd-mailbox.c @@ -24,7 +24,8 @@ #define SPRD_MBOX_IRQ_STS 0x18 #define SPRD_MBOX_IRQ_MSK 0x1c #define SPRD_MBOX_LOCK 0x20 -#define SPRD_MBOX_FIFO_DEPTH 0x24 +#define SPRD_MBOX_FIFO_DEPTH 0x24 /* outbox only */ +#define SPRD_MBOX_IN_FIFO_STS2 0x24 /* inbox only, revision 2 */ =20 /* Bit and mask definition for inbox's SPRD_MBOX_FIFO_STS register */ #define SPRD_INBOX_FIFO_DELIVER_MASK GENMASK(23, 16) @@ -32,8 +33,18 @@ #define SPRD_INBOX_FIFO_DELIVER_SHIFT 16 #define SPRD_INBOX_FIFO_BUSY_MASK GENMASK(7, 0) =20 +/* Bit and mask definition for R2 inbox's SPRD_MBOX_FIFO_RST register */ +#define SPRD_INBOX_R2_FIFO_OVERFLOW_DELIVER_RST GENMASK(31, 0) + +/* Bit and mask definition for R2 inbox's SPRD_MBOX_FIFO_STS register */ +#define SPRD_INBOX_R2_FIFO_DELIVER_MASK GENMASK(15, 0) + +/* Bit and mask definition for SPRD_MBOX_IN_FIFO_STS2 register */ +#define SPRD_INBOX_R2_FIFO_OVERFLOW_MASK GENMASK(31, 16) +#define SPRD_INBOX_R2_FIFO_BUSY_MASK GENMASK(15, 0) + /* Bit and mask definition for SPRD_MBOX_IRQ_STS register */ -#define SPRD_MBOX_IRQ_CLR BIT(0) +#define SPRD_MBOX_IRQ_CLR GENMASK(31, 0) =20 /* Bit and mask definition for outbox's SPRD_MBOX_FIFO_STS register */ #define SPRD_OUTBOX_FIFO_FULL BIT(2) @@ -52,8 +63,18 @@ #define SPRD_OUTBOX_FIFO_IRQ_MASK GENMASK(4, 0) =20 #define SPRD_OUTBOX_BASE_SPAN 0x1000 -#define SPRD_MBOX_CHAN_MAX 8 -#define SPRD_SUPP_INBOX_ID_SC9863A 7 +#define SPRD_MBOX_R1_CHAN_MAX 8 +#define SPRD_MBOX_R2_CHAN_MAX 16 + +enum sprd_mbox_version { + SPRD_MBOX_R1, + SPRD_MBOX_R2, +}; + +struct sprd_mbox_info { + enum sprd_mbox_version version; + unsigned long supp_id; +}; =20 struct sprd_mbox_priv { struct mbox_controller mbox; @@ -64,9 +85,11 @@ struct sprd_mbox_priv { void __iomem *supp_base; u32 outbox_fifo_depth; =20 + const struct sprd_mbox_info *info; + struct mutex lock; u32 refcnt; - struct mbox_chan chan[SPRD_MBOX_CHAN_MAX]; + struct mbox_chan chan[SPRD_MBOX_R2_CHAN_MAX]; }; =20 static struct sprd_mbox_priv *to_sprd_mbox_priv(struct mbox_controller *mb= ox) @@ -154,22 +177,34 @@ static irqreturn_t sprd_mbox_inbox_isr(int irq, void = *data) { struct sprd_mbox_priv *priv =3D data; struct mbox_chan *chan; - u32 fifo_sts, send_sts, busy, id; + u32 fifo_sts, fifo_sts2, send_sts, busy, id; =20 fifo_sts =3D readl(priv->inbox_base + SPRD_MBOX_FIFO_STS); =20 + if (priv->info->version =3D=3D SPRD_MBOX_R2) + fifo_sts2 =3D readl(priv->inbox_base + SPRD_MBOX_IN_FIFO_STS2); + /* Get the inbox data delivery status */ - send_sts =3D (fifo_sts & SPRD_INBOX_FIFO_DELIVER_MASK) >> - SPRD_INBOX_FIFO_DELIVER_SHIFT; + if (priv->info->version =3D=3D SPRD_MBOX_R2) { + send_sts =3D fifo_sts & SPRD_INBOX_R2_FIFO_DELIVER_MASK; + } else { + send_sts =3D (fifo_sts & SPRD_INBOX_FIFO_DELIVER_MASK) >> + SPRD_INBOX_FIFO_DELIVER_SHIFT; + } + if (!send_sts) { dev_warn_ratelimited(priv->dev, "spurious inbox interrupt\n"); return IRQ_NONE; } =20 /* Clear FIFO delivery and overflow status first */ - writel(fifo_sts & - (SPRD_INBOX_FIFO_DELIVER_MASK | SPRD_INBOX_FIFO_OVERLOW_MASK), - priv->inbox_base + SPRD_MBOX_FIFO_RST); + if (priv->info->version =3D=3D SPRD_MBOX_R2) { + writel(SPRD_INBOX_R2_FIFO_OVERFLOW_DELIVER_RST, + priv->inbox_base + SPRD_MBOX_FIFO_RST); + } else { + writel(fifo_sts & (SPRD_INBOX_FIFO_DELIVER_MASK | SPRD_INBOX_FIFO_OVERLO= W_MASK), + priv->inbox_base + SPRD_MBOX_FIFO_RST); + } =20 while (send_sts) { id =3D __ffs(send_sts); @@ -181,7 +216,11 @@ static irqreturn_t sprd_mbox_inbox_isr(int irq, void *= data) * Check if the message was fetched by remote target, if yes, * that means the transmission has been completed. */ - busy =3D fifo_sts & SPRD_INBOX_FIFO_BUSY_MASK; + if (priv->info->version =3D=3D SPRD_MBOX_R2) + busy =3D fifo_sts2 & SPRD_INBOX_R2_FIFO_BUSY_MASK; + else + busy =3D fifo_sts & SPRD_INBOX_FIFO_BUSY_MASK; + if (!(busy & BIT(id))) mbox_chan_txdone(chan, 0); } @@ -295,7 +334,7 @@ static int sprd_mbox_probe(struct platform_device *pdev) struct device *dev =3D &pdev->dev; struct sprd_mbox_priv *priv; int ret, inbox_irq, outbox_irq, supp_irq; - unsigned long id, supp; + unsigned long id; struct clk *clk; =20 priv =3D devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); @@ -305,6 +344,10 @@ static int sprd_mbox_probe(struct platform_device *pde= v) priv->dev =3D dev; mutex_init(&priv->lock); =20 + priv->info =3D of_device_get_match_data(dev); + if (!priv->info) + return -EINVAL; + /* * Unisoc mailbox uses an inbox to send messages to the target * core, and uses (an) outbox(es) to receive messages from other @@ -362,12 +405,12 @@ static int sprd_mbox_probe(struct platform_device *pd= ev) return ret; } =20 - supp =3D (unsigned long) of_device_get_match_data(dev); - if (!supp) { + if (!priv->info->supp_id) { dev_err(dev, "no supplementary outbox specified\n"); return -ENODEV; } - priv->supp_base =3D priv->outbox_base + (SPRD_OUTBOX_BASE_SPAN * supp); + priv->supp_base =3D priv->outbox_base + + (SPRD_OUTBOX_BASE_SPAN * priv->info->supp_id); } =20 /* Get the default outbox FIFO depth */ @@ -375,11 +418,15 @@ static int sprd_mbox_probe(struct platform_device *pd= ev) readl(priv->outbox_base + SPRD_MBOX_FIFO_DEPTH) + 1; priv->mbox.dev =3D dev; priv->mbox.chans =3D &priv->chan[0]; - priv->mbox.num_chans =3D SPRD_MBOX_CHAN_MAX; priv->mbox.ops =3D &sprd_mbox_ops; priv->mbox.txdone_irq =3D true; =20 - for (id =3D 0; id < SPRD_MBOX_CHAN_MAX; id++) + if (priv->info->version =3D=3D SPRD_MBOX_R2) + priv->mbox.num_chans =3D SPRD_MBOX_R2_CHAN_MAX; + else + priv->mbox.num_chans =3D SPRD_MBOX_R1_CHAN_MAX; + + for (id =3D 0; id < priv->mbox.num_chans; id++) priv->chan[id].con_priv =3D (void *)id; =20 ret =3D devm_mbox_controller_register(dev, &priv->mbox); @@ -391,10 +438,24 @@ static int sprd_mbox_probe(struct platform_device *pd= ev) return 0; } =20 +static const struct sprd_mbox_info sc9860_mbox_info =3D { + .version =3D SPRD_MBOX_R1, +}; + +static const struct sprd_mbox_info sc9863a_mbox_info =3D { + .version =3D SPRD_MBOX_R1, + .supp_id =3D 7, +}; + +static const struct sprd_mbox_info ums9230_mbox_info =3D { + .version =3D SPRD_MBOX_R2, + .supp_id =3D 6, +}; + static const struct of_device_id sprd_mbox_of_match[] =3D { - { .compatible =3D "sprd,sc9860-mailbox" }, - { .compatible =3D "sprd,sc9863a-mailbox", - .data =3D (void *)SPRD_SUPP_INBOX_ID_SC9863A }, + { .compatible =3D "sprd,sc9860-mailbox", .data =3D &sc9860_mbox_info }, + { .compatible =3D "sprd,sc9863a-mailbox", .data =3D &sc9863a_mbox_info }, + { .compatible =3D "sprd,ums9230-mailbox", .data =3D &ums9230_mbox_info }, { }, }; MODULE_DEVICE_TABLE(of, sprd_mbox_of_match); --=20 2.50.0 From nobody Sun Feb 8 20:53:16 2026 Received: from srv01.abscue.de (abscue.de [89.58.28.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA38E2628D; Sat, 10 Jan 2026 15:44:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.58.28.240 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768059873; cv=none; b=MhDgFMCHaI4ukz2Pq+VZU1/FJOMyCSpM4xEHGQw6FEiTe1VjPbaRRfC/RsKTHl/tB32JWK83O99AyjMz2hQZPwNdm73jsBDmjdeCnnHxhUw4e/j31g+1gdGSqHBiNiyoDu7HT4BdrBPZvMV/Cazv8qA5Ly2CMMZ0Thnw6vXVXGc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768059873; c=relaxed/simple; bh=mulrbxCV0UhMJwrv2JXHsPNN5v5K3n2aBtnDBwXn37M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=B6gSozS10zSFww+/gZ2xyXXGPk8SMb9teIQD5b6risLrlxk0q9seCfUBAE2byXne6ClgiWjqZtVaI3N2azI1DooGrOXF4LEg29oiGp9PNeC8gzJSf+mabxGuN5wPcA72jey5jACxwzK0DFDEyOWGx4GPincaxaEuXa9sN4fsieE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=abscue.de; spf=pass smtp.mailfrom=abscue.de; arc=none smtp.client-ip=89.58.28.240 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=abscue.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=abscue.de Received: from srv01.abscue.de (localhost [127.0.0.1]) by spamfilter.srv.local (Postfix) with ESMTP id 096CE1C244E; Sat, 10 Jan 2026 16:44:17 +0100 (CET) X-Spam-Level: Received: from fluffy-mammal.metal.fwg-cag.de (unknown [IPv6:2001:9e8:cdde:8c00:6078:eb97:88d9:587f]) by srv01.abscue.de (Postfix) with ESMTPSA id 0DBEA1C2457; Sat, 10 Jan 2026 16:44:13 +0100 (CET) From: =?utf-8?q?Otto_Pfl=C3=BCger?= Date: Sat, 10 Jan 2026 16:43:38 +0100 Subject: [PATCH 4/4] mailbox: sprd: mask interrupts that are not handled Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260110-ums9230-mailbox-v1-4-5941cab4f4e5@abscue.de> References: <20260110-ums9230-mailbox-v1-0-5941cab4f4e5@abscue.de> In-Reply-To: <20260110-ums9230-mailbox-v1-0-5941cab4f4e5@abscue.de> To: Jassi Brar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Orson Zhai , Baolin Wang , Chunyan Zhang Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, =?utf-8?q?Otto_Pfl=C3=BCger?= X-Mailer: b4 0.14.2 To reduce the amount of spurious interrupts, disable the interrupts that are not handled in this driver. Signed-off-by: Otto Pfl=C3=BCger --- drivers/mailbox/sprd-mailbox.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/mailbox/sprd-mailbox.c b/drivers/mailbox/sprd-mailbox.c index 26256581a76ad59785a1c87a34eb91f5985dc948..565502904e1f296dff02e308d8b= 7f1e1ff2d1692 100644 --- a/drivers/mailbox/sprd-mailbox.c +++ b/drivers/mailbox/sprd-mailbox.c @@ -282,21 +282,19 @@ static int sprd_mbox_startup(struct mbox_chan *chan) /* Select outbox FIFO mode and reset the outbox FIFO status */ writel(0x0, priv->outbox_base + SPRD_MBOX_FIFO_RST); =20 - /* Enable inbox FIFO overflow and delivery interrupt */ - val =3D readl(priv->inbox_base + SPRD_MBOX_IRQ_MSK); - val &=3D ~(SPRD_INBOX_FIFO_OVERFLOW_IRQ | SPRD_INBOX_FIFO_DELIVER_IRQ); + /* Enable inbox FIFO delivery interrupt */ + val =3D SPRD_INBOX_FIFO_IRQ_MASK; + val &=3D ~SPRD_INBOX_FIFO_DELIVER_IRQ; writel(val, priv->inbox_base + SPRD_MBOX_IRQ_MSK); =20 /* Enable outbox FIFO not empty interrupt */ - val =3D readl(priv->outbox_base + SPRD_MBOX_IRQ_MSK); + val =3D SPRD_OUTBOX_FIFO_IRQ_MASK; val &=3D ~SPRD_OUTBOX_FIFO_NOT_EMPTY_IRQ; writel(val, priv->outbox_base + SPRD_MBOX_IRQ_MSK); =20 /* Enable supplementary outbox as the fundamental one */ if (priv->supp_base) { writel(0x0, priv->supp_base + SPRD_MBOX_FIFO_RST); - val =3D readl(priv->supp_base + SPRD_MBOX_IRQ_MSK); - val &=3D ~SPRD_OUTBOX_FIFO_NOT_EMPTY_IRQ; writel(val, priv->supp_base + SPRD_MBOX_IRQ_MSK); } } --=20 2.50.0