[PATCH v3 12/15] soc: qcom: smp2p: Use mbox_ring_doorbell() instead of NULL message

Douglas Anderson posted 15 patches 2 weeks, 2 days ago
[PATCH v3 12/15] soc: qcom: smp2p: Use mbox_ring_doorbell() instead of NULL message
Posted by Douglas Anderson 2 weeks, 2 days ago
As per the patch ("mailbox: Deprecate NULL mbox messages; Introduce
mbox_ring_doorbell()"), we want to switch all users of NULL mailbox
messages to use mbox_ring_doorbell().

This client only ever sent NULL messages, so the transition is
straightforward. We can remove the call to mbox_client_txdone(). The
call didn't do anything for NULL messages and it's now officially
documented not to be called for doorbells.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
This driver is used on my sc7180-trogdor Chromebook. While I haven't
stress tested with it, I can confirm that the system boots normally to
UI and can suspend/resume with this patch in place.

(no changes since v1)

 drivers/soc/qcom/smp2p.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/soc/qcom/smp2p.c b/drivers/soc/qcom/smp2p.c
index cb515c2340c1..139307b66a47 100644
--- a/drivers/soc/qcom/smp2p.c
+++ b/drivers/soc/qcom/smp2p.c
@@ -169,12 +169,10 @@ static void qcom_smp2p_kick(struct qcom_smp2p *smp2p)
 	/* Make sure any updated data is written before the kick */
 	wmb();
 
-	if (smp2p->mbox_chan) {
-		mbox_send_message(smp2p->mbox_chan, NULL);
-		mbox_client_txdone(smp2p->mbox_chan, 0);
-	} else {
+	if (smp2p->mbox_chan)
+		mbox_ring_doorbell(smp2p->mbox_chan);
+	else
 		regmap_write(smp2p->ipc_regmap, smp2p->ipc_offset, BIT(smp2p->ipc_bit));
-	}
 }
 
 static bool qcom_smp2p_check_ssr(struct qcom_smp2p *smp2p)
-- 
2.53.0.273.g2a3d683680-goog
Re: [PATCH v3 12/15] soc: qcom: smp2p: Use mbox_ring_doorbell() instead of NULL message
Posted by Bjorn Andersson 1 week, 2 days ago
On Mon, Feb 16, 2026 at 10:09:49AM -0800, Douglas Anderson wrote:
> As per the patch ("mailbox: Deprecate NULL mbox messages; Introduce
> mbox_ring_doorbell()"), we want to switch all users of NULL mailbox
> messages to use mbox_ring_doorbell().
> 
> This client only ever sent NULL messages, so the transition is
> straightforward. We can remove the call to mbox_client_txdone(). The
> call didn't do anything for NULL messages and it's now officially
> documented not to be called for doorbells.
> 

Acked-by: Bjorn Andersson <andersson@kernel.org>

Regards,
Bjorn

> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
> This driver is used on my sc7180-trogdor Chromebook. While I haven't
> stress tested with it, I can confirm that the system boots normally to
> UI and can suspend/resume with this patch in place.
> 
> (no changes since v1)
> 
>  drivers/soc/qcom/smp2p.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/soc/qcom/smp2p.c b/drivers/soc/qcom/smp2p.c
> index cb515c2340c1..139307b66a47 100644
> --- a/drivers/soc/qcom/smp2p.c
> +++ b/drivers/soc/qcom/smp2p.c
> @@ -169,12 +169,10 @@ static void qcom_smp2p_kick(struct qcom_smp2p *smp2p)
>  	/* Make sure any updated data is written before the kick */
>  	wmb();
>  
> -	if (smp2p->mbox_chan) {
> -		mbox_send_message(smp2p->mbox_chan, NULL);
> -		mbox_client_txdone(smp2p->mbox_chan, 0);
> -	} else {
> +	if (smp2p->mbox_chan)
> +		mbox_ring_doorbell(smp2p->mbox_chan);
> +	else
>  		regmap_write(smp2p->ipc_regmap, smp2p->ipc_offset, BIT(smp2p->ipc_bit));
> -	}
>  }
>  
>  static bool qcom_smp2p_check_ssr(struct qcom_smp2p *smp2p)
> -- 
> 2.53.0.273.g2a3d683680-goog
>