Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp280966pxb; Thu, 31 Mar 2022 05:25:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDffhHkFK+U15aTrr2jNf9Blu76qFuYqiLhM73xOKVzRTF+VqBlB/ElU+/6SK127XxWovJ X-Received: by 2002:a17:902:d101:b0:153:967c:b1e3 with SMTP id w1-20020a170902d10100b00153967cb1e3mr4877367plw.42.1648729550126; Thu, 31 Mar 2022 05:25:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1648729550; cv=pass; d=google.com; s=arc-20160816; b=DKm5it3mRQJeJiZHLYpd5tv4TGHZbOUjMUVEw4Qk7EfDlylAG2xPdJjbD7vPERAOwt mbpWd4bneVfBi827nP3mCjDE5nI9608GUd0L4gsN3cCH9Ld3xk7sXxLMAiMaSE8I2M9p gUL/ftPIrqM2Ky65s4VKFMIxKp+0f7GY2ltFaxrvwxhZFoKj2bMETjau+14n2l/+gj/x +43mPoJVMeBINt/Ca+sDY9r8zexlLHSZdTb4JymOYoTzK5dlJ5qr1Dd6VhoLDB3Zyd4n QrHkhUom1co4/27OchLVRYylNbfaB+D8cCGS2BAt1oY0GZ1BSTAqI021YBhqHw0wsBZK tOUw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=CBl6S7O1KPkuv/nBrKr7G5FEj4H0sPIBb+CUEOHg/q0=; b=NmwkZy27bgcSDhIuO1cMJqAB2Pkdc6BAElFwB8EAB4zq2C+DPx63kUbQpz92ORkQHd NLTC/QRsixhpyMFfkuif1RgeXGEM59KAoKKFIVDnsrXu8BBYIy4mhL/tV4RqpRuOKJ46 vqNF1QTlKIXf0Pi3hNznra6bq0rTnIqv03zCl6Nmi15UVpWvx7YG1Tm/VGaY4pv33WrV lGXciqZ3dcEvohTfvCgdrTLL3Q4O9BQuzS1asUjZMUq0B2upIUZJJs5I9PKRQ0sEMGil nCGtWnCm3kxUqkVWEoRpgtUPfEZEMeGZxZhyTFSEivYxBT+fBej9TTfksqLEjS0ZbVsw ZS5w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=hiZL+gO1; 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 h1-20020a056a001a4100b004fa92f57a9bsi26622802pfv.278.2022.03.31.05.25.37; Thu, 31 Mar 2022 05:25:50 -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=hiZL+gO1; 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 S232574AbiCaKeu (ORCPT + 99 others); Thu, 31 Mar 2022 06:34:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229624AbiCaKes (ORCPT ); Thu, 31 Mar 2022 06:34:48 -0400 Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00081.outbound.protection.outlook.com [40.107.0.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B6D31EDA30; Thu, 31 Mar 2022 03:32:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nlyblrfTqS+OKBtl3CWBJRtDH7XM9WK/xVMujZVQxstVztK3x2cbg0A4C8jldxhFOlG37BOEhVf/kqupuTvx1P/quw9bi71mjJRMgAhXhx1rIekebD29dgra6PjWDJs1RPgJRPm5aX71jpGjgKSNRUdSyNq4SCs+KGNB+6Q7/PFlEN5Dz9j/fkgJwGmogFGBbPiSa1uuB/SEeRmUbQStPufzKU6lYIULm8FQQgMjx/QaZBFaEdINWEX72/aSbKifi4XNqVfDwXpTmb/e6YNNLgxMUrHQmvEgQnVl5Da8I988sM6uDUsUPPTTc8B8A7AZdU/IuRDOrPtJMBaEarxh2Q== 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=CBl6S7O1KPkuv/nBrKr7G5FEj4H0sPIBb+CUEOHg/q0=; b=TsBKr598fM7QqH9s0MfNUi/1F/CSh3rhl9oHXLvhetUNO3onw6i4hxxG2i6/0O3DgqWQz09UULvwJzki8jdnNPLE4euiOdgqqMyw7b89i4SKTNu9Q6eBSH4u8e/rSoGrj+FZgIFS7oGcmX0GKQu3YH/5FMtpZ01Alf8PoTB5KXm4ndNjRs1JtgYG/uUmEWKFEyS9Uzvyexruh0svwUkGqkmwgbWVumSkPYJthtliS+BTV5ni8G0neBlxGpedkSi4tM9kdIJ5LfpN7/aeVlktYAAeiXx2P+Kx2G+hlv/wpOipEOkU3W4Kd+vYjguH3HsLGOzWHSP1G5X3DanO6k2c3A== 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=CBl6S7O1KPkuv/nBrKr7G5FEj4H0sPIBb+CUEOHg/q0=; b=hiZL+gO1lV1vcSvZ78gs2lX16rOuMb/mIakyiy95fM947Rk/jkC5v4LaTGutZEHmJxDAtEhWCcEj8kgtZAoKr8qu+AZq3SGYMj3+CX7IHmBjNWXk2xXx5zxeXiz9YmsJeTuEqmIZmrp2RpVEO44+ySjw7og/1IQHec0K3hxVFrY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from VI1PR04MB5151.eurprd04.prod.outlook.com (2603:10a6:803:61::28) by DB7PR04MB4171.eurprd04.prod.outlook.com (2603:10a6:5:26::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.21; Thu, 31 Mar 2022 10:32:52 +0000 Received: from VI1PR04MB5151.eurprd04.prod.outlook.com ([fe80::bd5e:bb79:2c17:302e]) by VI1PR04MB5151.eurprd04.prod.outlook.com ([fe80::bd5e:bb79:2c17:302e%7]) with mapi id 15.20.5123.021; Thu, 31 Mar 2022 10:32:52 +0000 From: Daniel Baluta To: linux-remoteproc@vger.kernel.org, mathieu.poirier@linaro.org, bjorn.andersson@linaro.org Cc: s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-kernel@vger.kernel.org, shengjiu.wang@nxp.com, daniel.baluta@gmail.com, Daniel Baluta Subject: [PATCH] remoteproc: imx_dsp_rproc: Make rsc_table optional Date: Thu, 31 Mar 2022 13:32:37 +0300 Message-Id: <20220331103237.340796-1-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.27.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: VI1PR08CA0235.eurprd08.prod.outlook.com (2603:10a6:802:15::44) To VI1PR04MB5151.eurprd04.prod.outlook.com (2603:10a6:803:61::28) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c5955d00-2ff5-42bd-2742-08da1301cf1c X-MS-TrafficTypeDiagnostic: DB7PR04MB4171:EE_ X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gD5cj7yT79rEZYm6jDDD6RCJHoqOfUc9E0eho4jzqZ2MD/jUkX1JMy181soiy4V1ANdMPe23hHKPVFcGQnjXki0b21+bV0RddxNlj9HIi0yaaIht9pD09iDrjyC2to1INMd0xmUCjL5St0fuq015Thy7iPcLRLS73YVeoB4CMqTv4KprjQhzfFV0D/OU2RIKuC6RK4uZAxqyCpgvrsZQ39beP6vAiuJr2v5hJ8FX+tq6271XefjP8QHtETuG9wEBjT9HruTeCe4uEcCiQzNKnWJgVJUiM9RMQmLwztvaba7nCoogRnfm/fGLikYGigMTIxWgoQ5Ph2UF4dOcLASaj3jQkojXgOHsPyJy3L79pB8lG7Hzz/EvzXpkTU4k5C8mVUsWbXtcoSx11HmYAM+uEEbJY4GKNhQ16Oia1tMu4ig2DgZvmc/WK2QmonbLWCZkjRNERQzuVOeTAMleYmaGMaKuuXovVNy2JYRkKkgAZLOlejVdXrIq01FXPgVQkF+zlkH6RrcQTNuLkr1VEGnkWIkFDnIB8sqZ2KESq2vYVv8t6baxy6aRJziGODyGScWxgyAyJFlFrujM1CJk402bMbFjNVfbh2egaVCVACAjT0WhVLPRK/xWA8uZCNfhVi3raTbksAOrK5f7fUBVUaUkl06MoqeB4kssEfuyfzMjwkOmkKexomyOnfAvV3hGo75ig7sw+ekrYXR2g5DW6it1LA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5151.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(4326008)(8676002)(86362001)(26005)(186003)(1076003)(66476007)(66556008)(83380400001)(66946007)(38100700002)(316002)(38350700002)(44832011)(5660300002)(508600001)(6666004)(6512007)(6506007)(52116002)(2616005)(2906002)(6486002)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?sj+nmsipTfQP2ZWBsWWq7rKr7EQs4qQ9zeMewZ2QiRoJ1ayrIKE3XS6fhxzw?= =?us-ascii?Q?PwihAWYm77Dk4W8R4EzwM2ar4uLENU7VBJVoj60859XF8gneG9+09VS4uWt2?= =?us-ascii?Q?zDhK+oBwzr7xA0ZD39ia4B0FHPtX8AeS/8TV3Ph6smijT/9F5aS+v68L1YfW?= =?us-ascii?Q?0w1Kg+cCKWO719efMfPAoyFfV5Z6FpYWa8xk1M51FJkWxCNu8Z/CJjdlOk3F?= =?us-ascii?Q?cQzoaqQp/CFE0n+O64Vn3fTf12fw0pCA4DMqo5W9C2qEHWtM6uNWXCQSBl+H?= =?us-ascii?Q?bVK93ByKvD1hN+XYohem0fRivhry9abZSUJVk7ituS0wal/n9WjqLcxt+zkh?= =?us-ascii?Q?HMK9wgIH/Y5LLxjRJDwA/b97uhg3wIwjo6zKUURu68FNAzj+t9U7BpDh+pne?= =?us-ascii?Q?ugshtRsPKufeZ9+H0ni6QyG9IsPi4UklgqlaRZHjHiGwsUK9UbidSBnqH0Da?= =?us-ascii?Q?Qostr3CxR0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=?us-ascii?Q?3yRZe2nqYoDUg77P9h/KwhpwAQ680xWDGDWwJqbbsXRbfXMUCqoAh2PanQmi?= =?us-ascii?Q?rW0LK1J4ijixcb+TGJTo9+PesOuYVwZyq8jUgefHawCw7v5MmDeZgW5JRwFg?= =?us-ascii?Q?SINGxyfATthmFbcyf9o2u6kggmIFNhcJBxVX6Pm4C1XpXg7534Bf8X2NLHA5?= =?us-ascii?Q?TZQfo1eb7ZgiERtQmjhFvib1P5YHwQTe8t+N66geJp1DXAeHKKyToEwKeaKt?= =?us-ascii?Q?Bq8Y2VNnjMMtjUUp1dKFq96XOF+In7l+wsu4BabEKTaUvb0Jfw2GD23+EHrr?= =?us-ascii?Q?nHt63SxjmomQqUbDQwb9+vZYY9/8Lt10NsMqQvnAbQM0oPySovcJir4g5W9e?= =?us-ascii?Q?IyCpAECefg=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c5955d00-2ff5-42bd-2742-08da1301cf1c X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5151.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2022 10:32:52.1813 (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: 7MNh+yiBIm1BEG67/v8H8YqGPmFGsYSsdAQLigFU+0+BnTOqlu8GEQj4vME/NP0fWHAeLxjsmUpKExDItM9ElA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4171 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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: Daniel Baluta There are cases when we want to test a simple "hello world" app on the DSP and we do not need a resource table. remoteproc core allows us having an optional rsc_table. Signed-off-by: Daniel Baluta --- drivers/remoteproc/imx_dsp_rproc.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c index 2abee78df96e..987ab1add761 100644 --- a/drivers/remoteproc/imx_dsp_rproc.c +++ b/drivers/remoteproc/imx_dsp_rproc.c @@ -802,6 +802,14 @@ static void imx_dsp_rproc_kick(struct rproc *rproc, int vqid) dev_err(dev, "%s: failed (%d, err:%d)\n", __func__, vqid, err); } +static int imx_dsp_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw) +{ + if (rproc_elf_load_rsc_table(rproc, fw)) + dev_warn(&rproc->dev, "no resource table found for this firmware\n"); + + return 0; +} + static const struct rproc_ops imx_dsp_rproc_ops = { .prepare = imx_dsp_rproc_prepare, .unprepare = imx_dsp_rproc_unprepare, @@ -809,7 +817,7 @@ static const struct rproc_ops imx_dsp_rproc_ops = { .stop = imx_dsp_rproc_stop, .kick = imx_dsp_rproc_kick, .load = imx_dsp_rproc_elf_load_segments, - .parse_fw = rproc_elf_load_rsc_table, + .parse_fw = imx_dsp_rproc_parse_fw, .sanity_check = rproc_elf_sanity_check, .get_boot_addr = rproc_elf_get_boot_addr, }; -- 2.27.0