Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp442355rwp; Wed, 12 Jul 2023 16:16:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlGqcTNykxL+/oM6MeZ8aI+pfnHPU31/xCk06icTXmCdptqd/WGoTsYxiqh6CjphfP5Dfp9e X-Received: by 2002:a17:90a:890c:b0:264:7e9:2f66 with SMTP id u12-20020a17090a890c00b0026407e92f66mr14944989pjn.41.1689203771264; Wed, 12 Jul 2023 16:16:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689203771; cv=pass; d=google.com; s=arc-20160816; b=M8BzTjEg2hzxkiNcZlGc01GMXWx4UyjQYc0Ca/eblJB3bbGjJCkyXnDl8gjCu3BMnj PfWy5u8TlvIVwcDrOGG1n7nPkfGW0H7Lv+OvdjSLYgXBvb6GrVZduAqd6iQmBcbmwKLX lCfuPdgP/Eb9t0xmCScLjKrbWi4vPGyMpNkVIXaCSw79kIZCm1ymjPsWkjZSPp+KBhVp rP07/07s3IgGDA0w1HY9OKBLZmlo2x0c9VQ/fRUMd/J4Bnx2HprPU1uLZaoBkszDF/1Q KqUikZ5OlGf7mkzyVuOAfLSkdfAVvtgCTarlE2/j0ekmkNuax6brK3XZBt+iFFotWPCr lwKQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=Fe7xGkuFhcHKkTA+9v652itScjQ3pIyJtN+61CmRkvM=; fh=A/RcpArRl6UcWrBEKcK2OIjHVN8FW9YBJdCaLAQ47iQ=; b=qSjbtdomjfwFjsgFoC60PGxTih9RTs4fwe5Mqi108hekvGFkoN2fuREuS6dmCtBD6+ sqLt4m4BSWaUw7COYXyZ2sRyc/lnoZ48p89JTquf79JIb0RgajNY8ASMXM7mVG/QEO3e wdM1vJM+WEgIUgZWFewXTBKdjRMod9+ofBhNMBuZ21OR7RQcKRLniY753Wq9KDU/oKA/ 5uaA4YFMydBFVKhuMBPuNDTNxshMC7OMMMIGj+X9YBPoceS7Af92Bty6CIjH9B0HGYn+ QbqUTJBszEPO7Q0euJKv0hmZeN2nhvX6BexFb6PFVQV4qwV8ePAPqxN3zLGJS+kDz/Rv BLzw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=kQpD+xEe; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x15-20020a17090a46cf00b0025339314a7bsi11756077pjg.79.2023.07.12.16.15.58; Wed, 12 Jul 2023 16:16:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=kQpD+xEe; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232609AbjGLWnX (ORCPT + 99 others); Wed, 12 Jul 2023 18:43:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232586AbjGLWnS (ORCPT ); Wed, 12 Jul 2023 18:43:18 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2049.outbound.protection.outlook.com [40.107.22.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 915901720; Wed, 12 Jul 2023 15:43:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iMUH4u81cKoSYGpbS4HRW2TpTtweQW42ClgRhK/c7X49m5U6cENPi78z4cK7RRhV/sJ4KW2tExmcUmULux5h59xfRet/E6u6Y7SE6Z4P8npExiEnGeaXV/j9pOrDJprCBHbU5kgZPLNvRPuvDozu777HjB2oXxHhhgTLs/tDVsEGCde5R5rAHlj8DV5z0oNpvOGR4aMwtrRQPVJ41Ot8PoEHlVN6m0p3R9THYk70on81h8/Cep8jPoomnC9TT27nwLt66xW4rkEX3aurLBZEFsmvPCJmL19xzJ3j46JtHKZ/kLKyOykOXsJ4ax7ICl9zG4g4C5XFazZMnvhZAn6RJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=Fe7xGkuFhcHKkTA+9v652itScjQ3pIyJtN+61CmRkvM=; b=VH7VSFaQOo2n3xNUQJfalCx1pmAbZiAncaby+o5QUOiTcKtchywrkqGEiJwaJ6yt5oUtgzIzpE1CKOXq15/5bIgvpu8bKqOVCcfXepEwkLqvpbM8NN2lYOZPMi8kqi4FP0c+p4OWoaogmgYV+TXmGKhMMbdhzIDI4+d5I1f7t9blhnUezZi0Ty/XJx7ASI70k0XQ7HpQ0ETx2pZB923xYAESJkXpjqQm/SR3oukoZ29eyI0h/Forw7jaHtUS9v6Qw2z2cEuLXwXuPnpkhN+8XQS/0xwNUnBgrjsXyWFRDluC4EN1dQGr3x4dUbDJIst5LebK3JCgw+H8wAgv0tws7A== 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=Fe7xGkuFhcHKkTA+9v652itScjQ3pIyJtN+61CmRkvM=; b=kQpD+xEe224UBX8K2zBMiMv0VxhVGFiVjyHgHriwjntABKNfoQJZSwOQDUjkMv3HhtJHOEZJe/DUyS/tL+ORw3ee2QqmqJS1/+LwF+Ug2YDnP7K4BBhDn2UeUu5BUZbRRspOnfQcovdUW63XvvkeK60w3gKC0pDuFhuXU3cHKG4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8781.eurprd04.prod.outlook.com (2603:10a6:102:20c::22) by AS8PR04MB8545.eurprd04.prod.outlook.com (2603:10a6:20b:420::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Wed, 12 Jul 2023 22:43:11 +0000 Received: from PAXPR04MB8781.eurprd04.prod.outlook.com ([fe80::a576:5bda:df13:4246]) by PAXPR04MB8781.eurprd04.prod.outlook.com ([fe80::a576:5bda:df13:4246%6]) with mapi id 15.20.6544.024; Wed, 12 Jul 2023 22:43:11 +0000 From: "Iuliana Prodan (OSS)" To: Bjorn Andersson , Mathieu Poirier , Shawn Guo , Sascha Hauer , "S.J. Wang" , Fabio Estevam , Daniel Baluta , Mpuaudiosw , Iuliana Prodan Cc: linux-imx , linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Pengutronix Kernel Team , LnxRevLi Subject: [PATCH 2/2] remoteproc: imx_dsp_rproc: add module parameter to ignore ready flag from remote processor Date: Thu, 13 Jul 2023 01:42:51 +0300 Message-Id: <20230712224251.26482-1-iuliana.prodan@oss.nxp.com> X-Mailer: git-send-email 2.17.1 Content-Type: text/plain X-ClientProxiedBy: AM8P251CA0002.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:21b::7) To PAXPR04MB8781.eurprd04.prod.outlook.com (2603:10a6:102:20c::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8781:EE_|AS8PR04MB8545:EE_ X-MS-Office365-Filtering-Correlation-Id: 939865bd-23bf-4a42-e573-08db83295eae X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rt+qCRdXdQx4jQmeOHbYSlyVHyC4hWDN7oPz/w+XBM2Az4PC0Od+Tvi/2w/Ew03GZZyMQ+EGVpM1d6npkXUHzbvcQR/iNRj6yIROJj/prGFMIqf2cCLmmG5hxziCDa680pYO0lfg+PG+Ge6F2nsDqskjDcPgFnEllXNgPxvaUc9o0zCtdCespMOjrGRFkIExvoysZq/a9gU/5k83CJdD2lO/+oSMi/mJLYvgaG2uQAH5B8HEiIvnRksPon0LvX6gEMSEzdYev33H8ixN/zWTaPBIdAE6bCCeo4m5dEapZKQD8KcsiFCAa04PicM1C/wsD56N73ZEB2ZmF8HFtAckIo770HWYXBC7yrBzk8vwJ7uhOYIKE2RtOYwSAuHJDMsXwAzF+tUlF20zLmwaxEFBUtFe+TYlH/zDk0OFnFys0+ITa6dm3DyvfKPcRJAK1da+neEwucUShId2TbkjgMnbbziuicfgCR2afs4CGnMRXtP+7cmY609vAOtcnt3dhtewx4snSeZiyaDCzKcjRzUlmuHmxhX/FkWME8aQP7GjwE3IXcD3GYli3mzqykgw+kfkLtrn3GMPns1L3bCMNTnGNLS3A9cy7ldPwIIKB4wqEpc= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8781.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(376002)(39860400002)(136003)(346002)(396003)(451199021)(66476007)(66556008)(4326008)(6506007)(66946007)(1076003)(38100700002)(186003)(38350700002)(26005)(86362001)(478600001)(83380400001)(52116002)(6666004)(6512007)(2906002)(54906003)(6486002)(110136005)(8676002)(2616005)(8936002)(41300700001)(5660300002)(316002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?oKcM7ia/pZ5ENW3knYE7Fnii7UPYUc4wB7bTZQ+YVVNcBw9WceFTDveA3EjF?= =?us-ascii?Q?orog7tZ0fyM9jaCEW6yt1zX1f2gsp0saoqICYPHHoewEMLjE1fSPvBI0zR4I?= =?us-ascii?Q?o9ZmNR8MP66s8X/M1HBirfBLuCxYFAFOg9idO9UEvkhKBOEiu+CNHSFAC7gm?= =?us-ascii?Q?c+bRN8wEeCiVbJCqlY7OYD0AlT6atudvmZC3+pvuZUrjsdCqE9cpuFpiObEa?= =?us-ascii?Q?21BGIsOHJgeUiBjjJTNiOp2Xg65X4YOEHTOdBcbYQOZzB+Rmc2gyazRWwg/T?= =?us-ascii?Q?QwxCxnkyPcLUWmPzdhzekZdvEcxnqE4ZuEhDW7HXo8OssbnXoejIsNOChtZp?= =?us-ascii?Q?b5hSjIdyOHggzNK585YPN2iX5Ut2HjBe1k0wpEHKDDaRn7gtWQdS1aZaIUh5?= =?us-ascii?Q?OsTDh0R2cx2BQ0nmBLp/jMxpuoglV40g8WR+Q86wry1nHAz2JluWLVIapjmv?= =?us-ascii?Q?om+0TRz4NTKEd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x+Ky8ytB08gQ?= =?us-ascii?Q?1YZsoeGuWRkfzP8Uwjzd+NZj9odCUW6ZuKidIL0egj8FLU27EBlbhhF0db/G?= =?us-ascii?Q?SqOb1jQLTDGAUX7QCIqktlIpx9LdKFUxbJ5SGOl8c5lPcZl44aVS5sQBXENy?= =?us-ascii?Q?rqRu//Z6J105XyCNqOdwYG2Goew9MdtEIpuZ+iA0HGy4s6fUcUoi0/kaqjKL?= =?us-ascii?Q?jwzLbKxd7Nw+XNYC1Sf8KlhxEMjHhm3gAWOBwnLL?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 939865bd-23bf-4a42-e573-08db83295eae X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8781.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 22:43:11.0056 (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: 5bhqjP8/LgE5j7VWpfUrsyXIK0Hp2BHPOzasWaBmjvh5fuPtpwBRgXi9MsopWaryNgm9IZjSrPd+yDQIjMzvEg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8545 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Iuliana Prodan There are cases when we want to test samples that do not reply with FW READY message, after fw is loaded and the remote processor started. In these cases, do not wait for a confirmation from the remote processor at start. Added "ignore_dsp_ready" flag while inserting the module to ignore remote processor reply after start. By default, this is off - do not ignore reply from rproc. Signed-off-by: Iuliana Prodan --- This was discovered while testing openamp_rsc_table sample from Zephyr repo (https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/subsys/ipc/openamp_rsc_table). We have IPC, but the remote proc doesn't send a FW_READY reply. --- drivers/remoteproc/imx_dsp_rproc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c index b5634507d953..ed89de2f3b98 100644 --- a/drivers/remoteproc/imx_dsp_rproc.c +++ b/drivers/remoteproc/imx_dsp_rproc.c @@ -36,7 +36,13 @@ module_param_named(no_mailboxes, no_mailboxes, int, 0644); MODULE_PARM_DESC(no_mailboxes, "There is no mailbox between cores, so ignore remote proc reply after start, default is 0 (off)."); +static unsigned int imx_dsp_rproc_ignore_ready; +module_param_named(ignore_dsp_ready, imx_dsp_rproc_ignore_ready, int, 0644); +MODULE_PARM_DESC(ignore_dsp_ready, + "Ignore remote proc reply after start, default is 0 (off)."); + #define REMOTE_IS_READY BIT(0) +#define REMOTE_IGNORE_READY_REPLY BIT(1) #define REMOTE_READY_WAIT_MAX_RETRIES 500 /* att flags */ @@ -296,6 +302,12 @@ static int imx_dsp_rproc_ready(struct rproc *rproc) if (!priv->rxdb_ch) return 0; + /* + * FW_READY reply is optional/ignored, so don't wait for it. + */ + if (priv->flags & REMOTE_IGNORE_READY_REPLY) + return 0; + for (i = 0; i < REMOTE_READY_WAIT_MAX_RETRIES; i++) { if (priv->flags & REMOTE_IS_READY) return 0; @@ -1119,6 +1131,9 @@ static int imx_dsp_rproc_probe(struct platform_device *pdev) else imx_dsp_rproc_mbox_init = imx_dsp_rproc_mbox_alloc; + if (imx_dsp_rproc_ignore_ready) + priv->flags |= REMOTE_IGNORE_READY_REPLY; + dev_set_drvdata(dev, rproc); INIT_WORK(&priv->rproc_work, imx_dsp_rproc_vq_work); -- 2.17.1