Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3919085rwb; Mon, 16 Jan 2023 15:14:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXuAxuqhOhcj/gXc4R75jNEr94apa0g+ZpsSpMWzOgGYMSWfI0gvJuCkwQrwlp7ZqzIstXDr X-Received: by 2002:a17:906:edac:b0:844:1d1d:f7 with SMTP id sa12-20020a170906edac00b008441d1d00f7mr672125ejb.23.1673910841782; Mon, 16 Jan 2023 15:14:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1673910841; cv=pass; d=google.com; s=arc-20160816; b=Twtms314E3NivFFBvWFr3L4D2KdbMUhshhxfK+p/DoNIz8HLZVgdY70E0o0Jb39p9r UN3WC8RyqGR9ld98B6nbK6iOtG7rV8wlDY9GYFRTvUHiNEbosm9yfOytwPrNVNb/D4BM nagswwlrmi8Pu0LmrbC1uvuHFOH9dJZ4fnaIdFT1izW1wDMFc6ga8LNXGtHp8EG6DqDm LYB/to/WpjS3ZHz3qkNMHW01LRhDLO6g0FkwwVq1r8x/EEkCNd2GB+gM6PXanh22/CzN V+lpCfxmrpIAsP+wvH17tTfgFPYi/jKDgHxZC3Qk+wuOj06a2uRUJuXWrlNg3w+nqap5 dslw== 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=7MW72iVyfS+GVVhp9E6ZcxVl44gtRKH724lhg4hjY0E=; b=bS8X5qUIM/Yb9dtsZ8ZsQDs4aMXJU3+en7td+uUfHPox3PgrDK1n/LTgHk6OrUxx1J ShP359QuKAiaWE2uQvXTeIK62godBJXOyyTapHw3Q20qxrtakVev/fVHwXoL1MBRCj68 HJWaqexPV4e+Smk619J+RLdhf+bcXj3c+UYYBaUH3V4X3+EOyeFz5B8E694KCuKF1uah 1aSPzY/OdCL4VYYdbR8llRukNSl0n+fF7L728qmjqP2Lh03X1RI+DXGOoH3xihf3S8t9 YElmUsqaokltFGL/TBIjPcYMStflMyY2OtMcoaQ2d9nzDxv2uS3Acwf5vGtyf6/V7SXs o/9g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b="J/nHiiR4"; 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 hq18-20020a1709073f1200b0086fd54a8f19si5958527ejc.63.2023.01.16.15.13.48; Mon, 16 Jan 2023 15:14:01 -0800 (PST) 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="J/nHiiR4"; 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 S235043AbjAPWy4 (ORCPT + 51 others); Mon, 16 Jan 2023 17:54:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234952AbjAPWyX (ORCPT ); Mon, 16 Jan 2023 17:54:23 -0500 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2050.outbound.protection.outlook.com [40.107.8.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A9C927991; Mon, 16 Jan 2023 14:54:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PPsp6Gr2VP+RAlmanXDn2l6dLd8yxVQtCwwe4/04MCicGR7bKcLWYG2fFR279v0r8kQrdVSd6JdrVbmIbravebAYd+JyJtiGuPKHsAYlIGLnvOvGARUUe8rIz26hRMcI9wZzADaRh/BrVXSWqvFZzfb4ljOwYqxBqN/z1O5HCoob5QlEN1wydKFx6N0TKs0TDJLv1jk6W/l2qa/HyjGc/Ile9hCCW1asfaBM4igJ3dcT0LPed2g03CFeOpIo1FaFiCo3PwXzowVlOVAgGlWuB+FP51eXWJkurSKh37RL6qJUJIzfNZbNXZPf6ojcGPE7BdGOYInXjhpl+Uoz8ZxK/Q== 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=7MW72iVyfS+GVVhp9E6ZcxVl44gtRKH724lhg4hjY0E=; b=VQ5D5F6koI9O8983r8G+3rTg4Cp+gzW5aovmIfmRVOvu/h+Nh4lJfZa+Omq0PAP2v5lGEmGKzjuBp4XczW5a63F5O6L4MRgdOaS3/OgcMZdY9e4RDzZsAZHVyz0WEDsZv0U3EJxBYczUgoq968iZKSDzmCLfdhwVXBYLMLwpMFTRxjeqHcdkRS/xNX7zroLKAS36Ws8+afDmrP6JOKMip9nwDxa9nKWJncG+oULwa9cQN0cruH4BXFSna2alkDfMuoCfO9iVxmDTffXDw45319chYDgVkxHL666RqB91gCpK74W5sXXov/o3rKLhe/IXIuTH8GDR2bjnG39IQ0IIUA== 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=7MW72iVyfS+GVVhp9E6ZcxVl44gtRKH724lhg4hjY0E=; b=J/nHiiR4VmlcsLtDPvJZ+YskJ3tcAl0orR/7S8RWPBxv18jB7KpbptT18XUlAtYBAaG9o/pzP9oUSCHnwjGvTTtk7jB/OiZjCEAmkS6n/zud2IdMsCy5ToHNLKVYr55qHj1Yylyle2n5ghAskyDBtiVUuH+LftubPmfaUp9D2Ds= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DB9PR04MB9628.eurprd04.prod.outlook.com (2603:10a6:10:30b::14) by PAXPR04MB9140.eurprd04.prod.outlook.com (2603:10a6:102:22f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.23; Mon, 16 Jan 2023 22:54:18 +0000 Received: from DB9PR04MB9628.eurprd04.prod.outlook.com ([fe80::aec2:20b6:cf99:2886]) by DB9PR04MB9628.eurprd04.prod.outlook.com ([fe80::aec2:20b6:cf99:2886%4]) with mapi id 15.20.5986.019; Mon, 16 Jan 2023 22:54:18 +0000 From: "Iuliana Prodan (OSS)" To: Bjorn Andersson , Mathieu Poirier , Shawn Guo , Sascha Hauer , "S.J. Wang" , Fabio Estevam , Daniel Baluta , SOF-Team , 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 Subject: [PATCH] remoteproc: imx_dsp_rproc: add module parameter to ignore ready flag from remote processor Date: Tue, 17 Jan 2023 00:53:43 +0200 Message-Id: <20230116225343.26336-1-iuliana.prodan@oss.nxp.com> X-Mailer: git-send-email 2.17.1 Content-Type: text/plain X-ClientProxiedBy: AS4PR09CA0017.eurprd09.prod.outlook.com (2603:10a6:20b:5d4::11) To DB9PR04MB9628.eurprd04.prod.outlook.com (2603:10a6:10:30b::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR04MB9628:EE_|PAXPR04MB9140:EE_ X-MS-Office365-Filtering-Correlation-Id: 89519b81-dc6b-4809-2cbc-08daf8149901 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: eH/H7RT1U2nGMHP5DKohvf76cI6AryJVVIhA2zSmCcY0s2oOQlRT5K9dXLqAMHzdFwXJGq4OjLNEv1cjAkN2zpqvUIYh1NMN/ne3TFcOySSdNHb3D3BKev4JB2v0y6frYde8MpSY/4Z0OCDYNg2qD+9m40WR8VLb25jMN3VURpSwXmwC6C7tTSJgjOLKl6niwahobg2gFjlN9D+2sNKmuKqKpgdTcB9erHGVLJ2vxxMdjjeuevYfkFuVbTKNdSu1QXgkAXsBHCEcqePWGaGLfhxxiAlUAWRe+/0FcClxEXAUGzDcMsF/h4b4DA6/jguqVNbu6U92wNjDKlhu6UgaGqo/zhVBmAm4F92deHti1SJ6IUIOCqUmfNfNP/xMLEai1wKC0GO227DjIEFEKGEm68lLTrYQpGFx10wGBWv7g0HsVaVVnUReHC10TiKxCnXX/nI5TClKJkHNEuAVOWdRVe7oLxTUJiUt9Oo3N7Z2y9mSZXN1ufL0Av5t7NxmwDFNcRGcbAVJRKrdw7M3AdnJQxbz15B9+Rdwf6U+5oBLOaPqxOm4mVqIgZep8jvYRrmBXcnsW5FzmTKXjDtjPl9aXeq5qjBxj12W4MqwrpdwULceKROQ8SXHePNU/EUgcn4bK2QnsJ50fICDE/SNqgO0WreLRpiKEYsRW/x8Wcbz62BnAsmQhzXYEfVS+1P3aXnK8rP13nR7+0E712uHyKcWdw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR04MB9628.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(396003)(39860400002)(136003)(366004)(346002)(376002)(451199015)(921005)(66556008)(66476007)(4326008)(66946007)(8676002)(8936002)(2906002)(5660300002)(38350700002)(86362001)(38100700002)(52116002)(478600001)(54906003)(6666004)(316002)(110136005)(6486002)(41300700001)(2616005)(1076003)(6512007)(6506007)(186003)(26005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?DZ9zYIgcUgKnwJ1TfOs562b7bzgevdBm8/s+HKwqx9E9xxHu4QsRWgtdF9oP?= =?us-ascii?Q?8DhbZgambdi32yzO7cCVQZdtwcKatmy8/i9zxAkaxa40gfToa7aasW7fWXIz?= =?us-ascii?Q?FAS9Y8i66nWuW+SdOSDTacWBaNrv6DGEnIw4oJSv37XyEpPodKQ3NYpIIzMv?= =?us-ascii?Q?Z/yYPSsMpAHSogXXf46RV6069aFqH4FKkC2Jmfnwegq20Y7tgcu6Ec5In0vQ?= =?us-ascii?Q?cKk193Rv96uQlnOKuH7O5w5rJZ1l9VA4V7qmzydSV5GGZb9zrsZElZCdOubL?= =?us-ascii?Q?ahT4F7RrK+3pRtLTXHDu/ScTxhPZ4Q3Lr7DGWGrsmgaiyFjWxzo/Lxz2X5e6?= =?us-ascii?Q?nvoxHvP/6rm3kRDMPvR9459IYHD3c1K5SwIhx2IMeajG+b8aqvxluWHL5WcL?= =?us-ascii?Q?S/0mumks+zx8Y+1jg3q+QXMHi1Wv3H+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YOGwmVbLBxXenxFNf4zSjBitpxQdRUnzXN8qv0GJtIXrJrUkELU?= =?us-ascii?Q?wxieTywr9Xg4Xw6t6ow8uGeiHEgBspAUYpL2b6M8W5I0/rJ8B9BK4EUgmXE6?= =?us-ascii?Q?P2hpt72Sk++9PcVniFdjd5Qk5H/9Xe5mWcxTdWyBw7zxghPoVPMuF8tjTsVH?= =?us-ascii?Q?Rfz3QExUy6Z4/krL6TzTevNlcxeMyivc3U8KFIBGETTJEVV1tfzpK2ZoVhnB?= =?us-ascii?Q?XTmEvjXmZXeuSWhBygMgMy1BRX4gHvB6gbF3Mb4O?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 89519b81-dc6b-4809-2cbc-08daf8149901 X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB9628.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2023 22:54:17.9808 (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: mkEV+o5DaMeRtxzFX9V2XD5Q5sS0TpVWQDJbzYTxY/fLuThYs1NYjr6SAWjEKVQs2H//zAKMmcRbHSG2YTgm/g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB9140 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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 a simple "hello world" application on the DSP and we don't have IPC between the cores. Therefore, skip the wait for remote processor to start. Added "ignoreready" 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 --- drivers/remoteproc/imx_dsp_rproc.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c index 95da1cbefacf..ec298f8b019f 100644 --- a/drivers/remoteproc/imx_dsp_rproc.c +++ b/drivers/remoteproc/imx_dsp_rproc.c @@ -26,9 +26,20 @@ #include "remoteproc_elf_helpers.h" #include "remoteproc_internal.h" +#define IMX_DSP_IGNORE_REMOTE_READY 0 + +/* + * Module parameters + */ +static unsigned int imx_dsp_rproc_ignoreready = IMX_DSP_IGNORE_REMOTE_READY; +module_param_named(ignoreready, imx_dsp_rproc_ignoreready, int, 0644); +MODULE_PARM_DESC(ignoreready, + "Ignore remote proc reply after start, default is 0 (off)."); + #define DSP_RPROC_CLK_MAX 5 #define REMOTE_IS_READY BIT(0) +#define REMOTE_SKIP_WAIT BIT(31) #define REMOTE_READY_WAIT_MAX_RETRIES 500 /* att flags */ @@ -285,6 +296,9 @@ static int imx_dsp_rproc_ready(struct rproc *rproc) if (!priv->rxdb_ch) return 0; + if (priv->flags & REMOTE_SKIP_WAIT) + return 0; + for (i = 0; i < REMOTE_READY_WAIT_MAX_RETRIES; i++) { if (priv->flags & REMOTE_IS_READY) return 0; @@ -903,6 +917,9 @@ static int imx_dsp_rproc_probe(struct platform_device *pdev) priv->rproc = rproc; priv->dsp_dcfg = dsp_dcfg; + if (imx_dsp_rproc_ignoreready) + priv->flags |= REMOTE_SKIP_WAIT; + dev_set_drvdata(dev, rproc); INIT_WORK(&priv->rproc_work, imx_dsp_rproc_vq_work); -- 2.17.1