Message ID | 20200927064131.24101-3-peng.fan@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=f/Zv=DE=lists.infradead.org=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0AEF0139A for <patchwork-linux-arm@patchwork.kernel.org>; Sun, 27 Sep 2020 06:17:32 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CD324221E5 for <patchwork-linux-arm@patchwork.kernel.org>; Sun, 27 Sep 2020 06:17:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SsmoBfuM"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="eUdISZ/W" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CD324221E5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JQ8YIRFkOt7NDs82AB4oga7LmsuvtaUlEGVCpg25v6g=; b=SsmoBfuMigJjahn2i3QJx6rcd 6R4+tw/Hvjtqib7UOLVsJwCCGTL1F2aCsM0cL4mx32QzWqwpKk6qKPgRpLOWGFo+tN4/6e/Qh6yHp 55Vq75yOyK79G1aE41C9L8S5A+bOTf7uXNEqRBazLo7HQq9yU4p9YPkyXZLgNAK5FnGBuWVmCw4XY VBl3TgPCV7ue8izql9T9cGbLJS6EZKzcivfAbFkby1S7VaX+U7vVWLBjst3UbFqwIVNOmMkGtfU9e EIParLKs6jmTE+MZ+IFBoZwB7h2hAipMooPUlXHCdaRpAuxH3WcM5Y2zIghI3YTm6Ok+bejFMW0y6 gsqDXnDOg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kMPyE-0001mG-OK; Sun, 27 Sep 2020 06:15:38 +0000 Received: from mail-eopbgr30064.outbound.protection.outlook.com ([40.107.3.64] helo=EUR03-AM5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kMPyA-0001lS-OG for linux-arm-kernel@lists.infradead.org; Sun, 27 Sep 2020 06:15:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FiUWoq0dwgHdRLcadbVTIjAlHwoUlaZ77zhcbRfsb98m6YKj5aIswqqiF4In/3C9YlScnqg0NM4dv8GfGuptdxW9JRCoTnT+Nh/jq5tvIJ44NAc+bARmzLNww47hYsKFRmQ0rWrv3jawi/o7kMS1L3W3xyosgQ9Xo4bVdNLg9PTQHpcHFx5oSn5WS9xH5Y7xy8FeRKYOgxHbJ4dqp9aEuNbhdE5ChtbXXjZ7HIh85BtZKYWrVKJL/XIXMr3qFuepsBcwTtKh57p2vg9fGXSoWWWYMe/1VBU2WxiapP9NQkFd29soFEwJ7r/75hQpggPLXgdvEIQFf+z+1GpkFLWa8Q== 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-SenderADCheck; bh=A1ufFCrXLohwqXvo9epGDFyJ+Lt3G1kTh9Y1fPu0SPA=; b=c6uAVmpmMztp/yfJAyOksa4FRdk7/6gb2muhfvp6HdKsYP2MUjXK1RiIto2ngZhd5s4ata1faTTlek0qESMwz0KhvSbuJUMW3JWLHtzLl4zYHU2KV1lAKGg6waYAX707SHac07eyUZCF4B/PveSVGv4Tq+D85kSwSKARYrq6c3E5N+bokTLv3wpn+Q3zne4KFksc7yNGP3v8thQJxapqsw6/VdvId3RjavsCzevG70bxCptHBuTTmJFL5vmwH41D7HFZklVwm+Vmn+ytJlUdYECCiSOrxSbt42ZFztCtd91VC0YnFOzB1CpZmido8bUjZTLIbYmOTKXOwYmF+TMvdA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A1ufFCrXLohwqXvo9epGDFyJ+Lt3G1kTh9Y1fPu0SPA=; b=eUdISZ/WdjuyH5EkViFl8FtGnXloFWFoVfxlZD5Lz+NF83tzmheOKxio4V0kheW1WSNPZ5L0L09KjfhPqw/5+DNe1ZoPMO/P9aA6sg7cCDNk3rvyOiXYxtw0sBCKmeQg4GGMGhZa/txqFPgDdnKGn3QQrZxccru4pldtEbYKnZs= Authentication-Results: linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB4633.eurprd04.prod.outlook.com (2603:10a6:5:36::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.20; Sun, 27 Sep 2020 06:15:32 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::35c5:8c71:91f3:6bc6]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::35c5:8c71:91f3:6bc6%12]) with mapi id 15.20.3412.028; Sun, 27 Sep 2020 06:15:32 +0000 From: Peng Fan <peng.fan@nxp.com> To: bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org Subject: [PATCH V2 2/7] remoteproc: imx_rproc: add elf memory hooks Date: Sun, 27 Sep 2020 14:41:26 +0800 Message-Id: <20200927064131.24101-3-peng.fan@nxp.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200927064131.24101-1-peng.fan@nxp.com> References: <20200927064131.24101-1-peng.fan@nxp.com> X-ClientProxiedBy: SG2PR04CA0178.apcprd04.prod.outlook.com (2603:1096:4:14::16) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SG2PR04CA0178.apcprd04.prod.outlook.com (2603:1096:4:14::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.20 via Frontend Transport; Sun, 27 Sep 2020 06:15:28 +0000 X-Mailer: git-send-email 2.28.0 X-Originating-IP: [119.31.174.71] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: ba938894-6fcf-4f6f-d7cc-08d862acbd5d X-MS-TrafficTypeDiagnostic: DB7PR04MB4633: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <DB7PR04MB4633149AEE1682F9556224A888340@DB7PR04MB4633.eurprd04.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:276; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Oek+gZLAMG4FTt/wKOwduDC494YzEAyo7dwr16sinwDJfqj01J2u8VU5dxPUz9jnBRNtDwtvlXsjTDVonths8bP+yS2AW5STcJNJR2+UhD1ruvWSQ+8uscQ7rrYnPmXWSUw0ecOCviTAJdEmq+nDrhdT5zUlNmyrPkWuNQ+QdB1ZnL0rEp0Ot6j2k1hjBpAc4VGFLU9bD6xB4w81Hvy8jcrfINj3PAN3SNo9DRkGb1OgwntI2IrWQk+FWQCHFZzcS50D2zyjAWNT2EWFl9mcjDJe3lfppIZrKyarDVmNlajXgKj1TLLGh7VEHvnjgfeUtQdkytawFC2ycKbPw/ATAEOlZH2dCDpACdIxt2wBbR/LoI1C1Z98hdjBcOa6nnld X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(376002)(346002)(39860400002)(136003)(396003)(16526019)(186003)(52116002)(7416002)(6486002)(54906003)(316002)(36756003)(1076003)(44832011)(5660300002)(4326008)(8676002)(2906002)(86362001)(26005)(956004)(478600001)(8936002)(66946007)(6506007)(6512007)(2616005)(66556008)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 0ade2zpT9vV6Yq2Te8jBbyNxPh/VT5QFxOg3kJxyrnHVb3U6Ld5CAQ+M54n/u26OE2zNuKTvsgBUhbt8qVULbzBHdomVxQumvnI6I/XWlmoI3YErgaeymMnbnru1Q9t+0P3Phb2j9Q1oKNIt55EGQOazuXcYDEqbM5rVyBUu5kJnLV83dbU7dKVTkFoGf/zX8lvrPZdFD5gjvRHnZETG3B/HRJBS/LE17eo/sm0ah0iJVfu/PGvsJUSRcpaj+SBOTYe9Hmn1Y6UN49IYg2899c/hW2ANTu4ubevMCdmfQNBTc/rgyS8kt3W4sXyvPC2R2atMRu3m1CzqlAX6eYaCt0d3trHwks6Ys75o4xIZvspddrrSHn1HVF25sDLNTAAcdH8jybe5k+CRnIL2A5so2KPzCJqGejhDHMp/JDh36CkjK1AWsFXGG7F+EzuY/TZiCsA76hWNh1mKy5HzaotzQZi8HI6XsXn/BK8Plkye/E9LUAozRFd+P6NwdmKJyQTeAFUT4pSw5GyPXIbt8YdsMNmk3cX+4r7skRDdRBncEpkkHPJJzSqdlhnGVRh5O5F/sKtiVT3woTcPFU2hmY14PECBACqi8hGcxqCOomecITtkw8l1ipE65kzj3Pfq5RPnEyw5vKOXekvfU2bLph9Y1g== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba938894-6fcf-4f6f-d7cc-08d862acbd5d X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2020 06:15:32.6005 (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: GKg62lxt9bFWpNqnyPJXAKDEjXxakOlC7k4JAIyGZqHtrxJq/CWLcNzSIKnRxmsyI7g3DQziNu7JDR6LR/s5DA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4633 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200927_021534_807289_31CEB0FA X-CRM114-Status: GOOD ( 13.42 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [40.107.3.64 listed in list.dnswl.org] -0.5 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.3.64 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Peng Fan <peng.fan@nxp.com>, Richard Zhu <hongxing.zhu@nxp.com>, festevam@gmail.com, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org |
Series |
remoteproc: imx_rproc: support iMX8MQ/M
|
expand
|
diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 8957ed271d20..d1abb253b499 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -6,6 +6,7 @@ #include <linux/clk.h> #include <linux/err.h> #include <linux/interrupt.h> +#include <linux/io.h> #include <linux/kernel.h> #include <linux/mfd/syscon.h> #include <linux/module.h> @@ -76,6 +77,7 @@ struct imx_rproc_dcfg { u32 src_stop; const struct imx_rproc_att *att; size_t att_size; + bool elf_mem_hook; }; struct imx_rproc { @@ -310,6 +312,16 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, return 0; } +static void imx_rproc_memcpy(struct rproc *rproc, void *dest, const void *src, size_t count) +{ + memcpy_toio((void * __iomem)dest, src, count); +} + +static void imx_rproc_memset(struct rproc *rproc, void *s, int c, size_t count) +{ + memset_io((void * __iomem)s, c, count); +} + static int imx_rproc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -340,6 +352,11 @@ static int imx_rproc_probe(struct platform_device *pdev) goto err_put_rproc; } + if (dcfg->elf_mem_hook) { + rproc->ops->elf_memcpy = imx_rproc_memcpy; + rproc->ops->elf_memset = imx_rproc_memset; + } + priv = rproc->priv; priv->rproc = rproc; priv->regmap = regmap;