From patchwork Fri Jul 12 08:34:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13731393 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 65D13C2BD09 for ; Fri, 12 Jul 2024 08:28:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: Subject:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UUX6R497YRg7q1iy7q2/yhhuRn5+gy3qVyTi3N3KxUE=; b=ak1b5u+CbRIS+jxItQO0YHhhZo IWyy8JzJD7R3PZV4nlf2ijzLp+uCaGRC4Z4prHPSMIureB5NnO1TBzqzW3v1tFPHWFWcCP6Kv8muJ C/5gOiiSHVQ8l2GWHFOcmyIzBKUKy75KD9z4M3nD6a5vGGLmjwl+4B1SX06nLthh5Xlxr1xHBkogB QaG2diklTIUFUrk45pnmQo4MeqBYIiNhb/wyuQ7jp0QF2zd55fkj1PKC8rQ6Ll61nqOp3DgOpnP7y 7N+uC7W7oI9UZ/kX4JuT8CjcDMV1Bh1+HaWT0QXQvAiujF/2yuCLh3b2yzX698LU8/g8AOze6NeqK dNEECI0A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSBdH-0000000GtVx-2nKO; Fri, 12 Jul 2024 08:27:59 +0000 Received: from mail-northeuropeazlp170120003.outbound.protection.outlook.com ([2a01:111:f403:c200::3] helo=DU2PR03CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSBbe-0000000Gsvt-3j5i for linux-arm-kernel@lists.infradead.org; Fri, 12 Jul 2024 08:26:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IlDzC5YJB3Ha+U/G2z73wdETtFwgrNZP+0Bm7Tuxs/tT/G/qmoGkYQHw4gmBGsK14s2vYmzcGPFXDYmOrJd2+xUfKXxAQfaVUyg+ur9XLHmB7HnuiHJSLSNB2Ef7tYyZ/CI6+FGWumaD/eej+cOEYxvXATDSBkNd+6eRdWmlqYhPKxuUxjwOiGiVXOsHddWSFte7lkchuJNMjQx6Cl/RglJyNuY4MeTXORK2JbxgO4N5b7ABGgTedQOxg02cRcIYQVDvwLLY7NOlxOER6W0G2KzAqyXsAIuQSKlsS0pogv1M14oqlo+k0i7mRkgrcIHuOJp2gdT3uzzoaKQNxBYiSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UUX6R497YRg7q1iy7q2/yhhuRn5+gy3qVyTi3N3KxUE=; b=X0N/tZh+qBAjMeYCGsmsi6axAStWR66yBanWheOLzT24TQitcKN5xULw8l+PNLgJpi19NyjK305iAI3fpEv+qpbPqn2BD9wp8izNqpp2Mc14KIjWcfZcdfLFIpzx5ix4lQKnbfmUd/6WTzhYRr0q2rS7l5YGBDmVeneOjH7aVOAmw+jr+KlZjs8Us0EvRl05IZr5I0VjOO4sj7Uq5NldM9fDpEIHSceikhir8w14rd/DR3aY86xuOd3VpI1WuZ+ncKiyOnKtBtKfxqE5/kBPhK1gzDPY/2MtndMtDqteb5uLRqcL0HwdPn63M9JUxo3xQZxf2DxSxNz9VD9YDVb7Tg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UUX6R497YRg7q1iy7q2/yhhuRn5+gy3qVyTi3N3KxUE=; b=HwQcagt/+X21LAIVTOgn+WxESDHHmC7rIZWGhx1Ycb0dujiey8i3CtevTsjmqDyqGzR+pSgryqJinyDfOLbZmhb0jh7xyBJk1ujGxGtOympdckybmfZgpG1Jwg0mgWEi2xzmSTeQFisuov2xb3iGx354UQ7OpRms8aZnyKijRuw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) by DU2PR04MB8709.eurprd04.prod.outlook.com (2603:10a6:10:2dc::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.22; Fri, 12 Jul 2024 08:26:16 +0000 Received: from PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630%4]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 08:26:16 +0000 From: "Peng Fan (OSS)" Date: Fri, 12 Jul 2024 16:34:58 +0800 Subject: [PATCH 5/6] remoteproc: imx_rproc: allow tx_block to be set Message-Id: <20240712-imx_rproc-v1-5-7bcf6732d328@nxp.com> References: <20240712-imx_rproc-v1-0-7bcf6732d328@nxp.com> In-Reply-To: <20240712-imx_rproc-v1-0-7bcf6732d328@nxp.com> To: Bjorn Andersson , Mathieu Poirier , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Richard Zhu Cc: linux-remoteproc@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan , Jacky Bai X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1720773307; l=2319; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=p7aJwJNDnCiunEqGoMTxl7aI0DSNvgXZL6nZNHRBXks=; b=oVNucySmyuBcOoI187p7YzPR4LqOFvyuL+1dvez+QJLQtwHmN5kh+JyacHsrPnEKetmauw+5s NVZWqQS2JNxDplPOVI4SslJyuAcEX+4vewNULpUqdzIggMkTB1oTZlB X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI2P153CA0013.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::12) To PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8459:EE_|DU2PR04MB8709:EE_ X-MS-Office365-Filtering-Correlation-Id: fde0177e-91c5-402e-1b69-08dca24c4ca6 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?4gXy2mNzp7By49dBbuO817dGOl3q3MP?= =?utf-8?q?QS7sFiR6CoAx/ppXf2gRV4yLpkK6IbglOiTgdgYtcyI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w8NZIt6OoIE7V?= =?utf-8?q?uSYKhogXxABsMlffuNSPd7MExUP+jRfUtlkKzAuw0PX3BeEO3JXgPCF5thawIysk/?= =?utf-8?q?HOBro2dF1DyCxTVdBIJzxFAXtX3M6LQMoJi2162oLsgbSVx2HjTAcFcwOgoeQBve0?= =?utf-8?q?YQUHawaTmqpZf4MfldZeiiqzapVLUC6hQDOYr38jMKVuG2gx63BGVifImJ02d8awM?= =?utf-8?q?d8QJilMoz4J/DauMsIJS9KOTGmHVNnTvmzuQnAblsmNz+51rDMJffIreLFq9whGpW?= =?utf-8?q?6Dd5Xdq6MZkEHNcfQ6t0Yr8+IUzYtSbYirKAvPgp6F512IspSW66Ao2wLSkukjPwO?= =?utf-8?q?NJnzl4VOt1aVnCkiJoEZrRc6emLlVNUf/P75WvXRxd1yg5Az6WG1qX7xhNn4/CZtr?= =?utf-8?q?bA6sbHJH7jJFCsw9FWQUc07Pf81nddqmgw=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?rvNNQAFh01veOVg/O6akhwVkljr6?= =?utf-8?q?kdqXSQAb8AqscJNds0Lm7AmYoMfAqiyI5R7terMgW94oidVqD1WY1cz93HaBrunL6?= =?utf-8?q?MHb5hA1I0Khbj04/YWsOnO7COoieaTwk5F7rtrbhlF9jf0GDpdO74r9endX9IGM9f?= =?utf-8?q?SR4glqihSj3gCVqA8QteAxUptOokWxurbhKLrl9SGrzuSu7q6Iuoc/9DqtTKToRcQ?= =?utf-8?q?gwqjMwlGMB8YW07iElibJxXsoyUfv9IPMATdj7XaFyJ762t7MJiC2aQoSTGojt+Ja?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f-8?q?gw13q8i40kXXN5Q1u4eRCKkPZbeD6CGmL4xvHvbhplPRSoPySpfDQX9xhkAEwCz2C?= =?utf-8?q?EDF2wCBI7ALdbsrP5IBvBWdmaIWoAIB1NYEySdLDkkRT1rv57Pc/VknMzp6jGVNlw?= =?utf-8?q?a+koVRHDKB6+JZgh9HJpi5FBNLbcs4M+TzebFb7PSjMce0YoOsYYRkDDC5ShK7PMU?= =?utf-8?q?pIVSLLkcgq5zzTR+dsRvfT2Jwsak5dFNpTeVIE9dr+i73y3RvicrtasZby/IMf59l?= =?utf-8?q?xLQZ4Mttkb9QDd4rPvDH+v2mCwTx4z8Q7oxgmYIm8R+gPcWIe29VLfsbijAUHwJPQ?= =?utf-8?q?6MreAN7uAg1IMmHvjIgR8efouj+vOAAIwwyy7a+qbIwcbUfvxNwooEmoX/xM4crhl?= =?utf-8?q?YJ/n0G5jLZ8u?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fde0177e-91c5-402e-1b69-08dca24c4ca6 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 08:26:16.7902 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +goJhrMDSxft3VAHBJGMTkBbfNyxyzlhhmyXgZhSb1XpTrGdbGbAtZU8F8pYOoxnO7OEumL8+V8XooBFNsr6Sg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8709 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240712_012618_973778_36ED15EE X-CRM114-Status: GOOD ( 12.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan Current tx_block is set to true, but there is case that no need to wait response. Linux just needs to send data to remote processor, so let's allow tx_block could be set to false. Reviewed-by: Jacky Bai Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 552fccebf7e2..01cf1dfb2e87 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -90,7 +90,7 @@ struct imx_rproc_mem { #define ATT_CORE_MASK 0xffff #define ATT_CORE(I) BIT((I)) -static int imx_rproc_xtr_mbox_init(struct rproc *rproc); +static int imx_rproc_xtr_mbox_init(struct rproc *rproc, bool tx_block); static void imx_rproc_free_mbox(struct rproc *rproc); struct imx_rproc { @@ -369,7 +369,7 @@ static int imx_rproc_start(struct rproc *rproc) struct arm_smccc_res res; int ret; - ret = imx_rproc_xtr_mbox_init(rproc); + ret = imx_rproc_xtr_mbox_init(rproc, true); if (ret) return ret; @@ -629,7 +629,7 @@ static void imx_rproc_kick(struct rproc *rproc, int vqid) static int imx_rproc_attach(struct rproc *rproc) { - return imx_rproc_xtr_mbox_init(rproc); + return imx_rproc_xtr_mbox_init(rproc, true); } static int imx_rproc_detach(struct rproc *rproc) @@ -794,7 +794,7 @@ static void imx_rproc_rx_callback(struct mbox_client *cl, void *msg) queue_work(priv->workqueue, &priv->rproc_work); } -static int imx_rproc_xtr_mbox_init(struct rproc *rproc) +static int imx_rproc_xtr_mbox_init(struct rproc *rproc, bool tx_block) { struct imx_rproc *priv = rproc->priv; struct device *dev = priv->dev; @@ -817,7 +817,7 @@ static int imx_rproc_xtr_mbox_init(struct rproc *rproc) cl = &priv->cl; cl->dev = dev; - cl->tx_block = true; + cl->tx_block = tx_block; cl->tx_tout = 100; cl->knows_txdone = false; cl->rx_callback = imx_rproc_rx_callback; @@ -1083,7 +1083,7 @@ static int imx_rproc_probe(struct platform_device *pdev) INIT_WORK(&priv->rproc_work, imx_rproc_vq_work); - ret = imx_rproc_xtr_mbox_init(rproc); + ret = imx_rproc_xtr_mbox_init(rproc, true); if (ret) goto err_put_wkq;