Skip to content

Commit d9dbd71

Browse files
MrVanmathieupoirier
authored andcommitted
remoteproc: imx_rproc: Allow setting of the mailbox transmit mode
Current mailbox is blocking by default, but there are cases where we don't need to wait for a response. Linux just needs to send data to the remote processor, so let's allow tx_block mode to be set (true/false) depending on usecase. No functional changes. Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mathieu Poirier <[email protected]>
1 parent 8fa052c commit d9dbd71

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/remoteproc/imx_rproc.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ struct imx_rproc_mem {
9090
#define ATT_CORE_MASK 0xffff
9191
#define ATT_CORE(I) BIT((I))
9292

93-
static int imx_rproc_xtr_mbox_init(struct rproc *rproc);
93+
static int imx_rproc_xtr_mbox_init(struct rproc *rproc, bool tx_block);
9494
static void imx_rproc_free_mbox(struct rproc *rproc);
9595

9696
struct imx_rproc {
@@ -369,7 +369,7 @@ static int imx_rproc_start(struct rproc *rproc)
369369
struct arm_smccc_res res;
370370
int ret;
371371

372-
ret = imx_rproc_xtr_mbox_init(rproc);
372+
ret = imx_rproc_xtr_mbox_init(rproc, true);
373373
if (ret)
374374
return ret;
375375

@@ -629,7 +629,7 @@ static void imx_rproc_kick(struct rproc *rproc, int vqid)
629629

630630
static int imx_rproc_attach(struct rproc *rproc)
631631
{
632-
return imx_rproc_xtr_mbox_init(rproc);
632+
return imx_rproc_xtr_mbox_init(rproc, true);
633633
}
634634

635635
static int imx_rproc_detach(struct rproc *rproc)
@@ -794,7 +794,7 @@ static void imx_rproc_rx_callback(struct mbox_client *cl, void *msg)
794794
queue_work(priv->workqueue, &priv->rproc_work);
795795
}
796796

797-
static int imx_rproc_xtr_mbox_init(struct rproc *rproc)
797+
static int imx_rproc_xtr_mbox_init(struct rproc *rproc, bool tx_block)
798798
{
799799
struct imx_rproc *priv = rproc->priv;
800800
struct device *dev = priv->dev;
@@ -817,7 +817,7 @@ static int imx_rproc_xtr_mbox_init(struct rproc *rproc)
817817

818818
cl = &priv->cl;
819819
cl->dev = dev;
820-
cl->tx_block = true;
820+
cl->tx_block = tx_block;
821821
cl->tx_tout = 100;
822822
cl->knows_txdone = false;
823823
cl->rx_callback = imx_rproc_rx_callback;
@@ -1083,7 +1083,7 @@ static int imx_rproc_probe(struct platform_device *pdev)
10831083

10841084
INIT_WORK(&priv->rproc_work, imx_rproc_vq_work);
10851085

1086-
ret = imx_rproc_xtr_mbox_init(rproc);
1086+
ret = imx_rproc_xtr_mbox_init(rproc, true);
10871087
if (ret)
10881088
goto err_put_wkq;
10891089

0 commit comments

Comments
 (0)