Message ID | 20201204074036.23870-3-peng.fan@oss.nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=P42T=FI=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AEB53C433FE for <linux-arm-kernel@archiver.kernel.org>; Fri, 4 Dec 2020 07:14:19 +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 5DFCA20639 for <linux-arm-kernel@archiver.kernel.org>; Fri, 4 Dec 2020 07:14:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5DFCA20639 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.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=H9IXtrbdwLPEFmk+g9eEyFCpHoMU2YOtOnFtLq0+VTI=; b=zY9HRgyzQOtuurT+pYydOy/BM klDCNA8LPcW9UWDKBG5m9vud8OCiV8KdMC+KBMjGRr2Fg8G3PJQ+1JDQOfLR2EH1JtZct2UCzPGaD glCN4R9rhPifSOpzjbt/yoqcC87YAJT6fl43uzInsMjU2lxhny1Af6U2DACHuPKAPyEM5OxxNoJcB tKmJ4JGobTZ0kN1eff/CadnsMJkbg8RCXFv15c2GbMfwNJ2z7lPsIM0xyO7wUOdOINm2jq61O0PXs /XVRy/UOTGFB0q0tTJKSp1TECkABn3KBfuimxfMyPnVmrXrsT4Om5DcdjJ2YQuXwU1+2d/wx3yw0k 522A3Hs9Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kl5H4-00051A-EK; Fri, 04 Dec 2020 07:13:02 +0000 Received: from mail-eopbgr60068.outbound.protection.outlook.com ([40.107.6.68] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kl5H1-0004zU-HF for linux-arm-kernel@lists.infradead.org; Fri, 04 Dec 2020 07:13:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nB13aqE6GqesOgiB6a4VXnUGmWvzdjKObeZ4ZZiS0yoUZEcREA6baMAw7Nx2+Zt4ENWhg9Hz8lFGvIAN8gE3NOT57YvRPHDuTmwzI18UHrpb6gA+pDmtS+TCS1jbXoaymSEyQNJLFyDEi9tonbq3fFYB4wNELaESNHVe31/3YSSojzPCdiekSFRzy6xaX9eNPsSVShu25tPnezbuulbES89gzIzji4Vi/bcqqLLaS/YVFtnY0E4aa+udDT0j3JPyBreOqYmLbvAkRvnOwmwiEOvpAQz56/R46NXpeOI/jUhEYcswHgHM5VceGQaFot7MGgtg9/USnw4Bk4DmrGBmrA== 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=dIrXfbf48ik12T5YEmhpeZUyRG6RoaYP6vbqxR0GavM=; b=EpXE2QgIZL9jMPON6HkLisHSwMrGUTO4VHwXuaInGi/sXBLUhlT3750QTy7Ij0f0W7mFjNcs7TRThbl1A4J2AD4GJMYJ619geo1dAECEjM5uw6Ua0kGf8w4Lp3ins6wSFZd5wLB2D98DpyV/MHDOHLl4Hh0Kxpl6tevVUPSgWxOWm5BwrDFAdROQa+pwlxYO4vPLiiiju85oS8TLC41SFuGVFJREnFohxTEYkTBxKgMhOwr3qi/SpS78yen0VQ2p5prp9PDYtCZOXVk1mdA+uC1fKeSnxFRettrWgcux3HlJwzCNU7FaG+Rxq+D/K5e/95feK4Xamd7x2n4WE/LLEw== 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=dIrXfbf48ik12T5YEmhpeZUyRG6RoaYP6vbqxR0GavM=; b=mSEjtu2ejUpOc9vIBbDzMHopPTafo/gEgReYKJ1CUnzCWZOQUpv0uIBlMOFxAAmUySaR2ecGenyPqJhvuC8It9WJyjIqiXYeK9tQFXLi3zPTPLJ/4gXu0LEOBbbYy4WxI5b6HrCRadwZTmtveCurUGBsP0zp6t9OV6tPNA8or9E= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.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.3611.31; Fri, 4 Dec 2020 07:12:55 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3632.018; Fri, 4 Dec 2020 07:12:55 +0000 From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com> To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de Subject: [PATCH V3 2/7] remoteproc: imx_rproc: add elf memory hooks Date: Fri, 4 Dec 2020 15:40:31 +0800 Message-Id: <20201204074036.23870-3-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201204074036.23870-1-peng.fan@oss.nxp.com> References: <20201204074036.23870-1-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: MAXPR0101CA0069.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:e::31) 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 MAXPR0101CA0069.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:e::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.17 via Frontend Transport; Fri, 4 Dec 2020 07:12:50 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: e4be73e4-01d3-467d-90d0-08d89824059e X-MS-TrafficTypeDiagnostic: DB7PR04MB4633: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <DB7PR04MB4633C2ECF4D23A15B686A1AEC9F10@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: Ijgu6WXqx/VReIfVLr5ow/FeGCfG9WkFfZz+38VBK7yee1vLxgotK/f2kTJ02XzUzJKUzADYJwkOFoQH0eSqOSiPhrGikXPVgCKce4QxDMcd3oScX5ZNH/OKbHeWtqllOSjlxnnS/Atowi93DeViBqVdF15c7CKZbF9dTTKPLnIImw0kOiDx3qdr94lXCiOOmOI3DIWzT69z6erYYi2BMJpCv176dCUGcMy0TQtls0pd/N3VchnfFYaVR1iMxcbhxHkb++9CMDgVVRPefpGS8e/EzZ5N3jZ+CkToW5bVkyU2m0abq5LP1PWnoFAnzFNccaoaxJgi5k6gUVc1+209hg== 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)(39860400002)(376002)(366004)(396003)(346002)(136003)(2616005)(86362001)(52116002)(6512007)(7416002)(1076003)(66946007)(66556008)(66476007)(478600001)(316002)(186003)(16526019)(8676002)(956004)(54906003)(6666004)(6506007)(2906002)(26005)(6486002)(8936002)(4326008)(5660300002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: fKwjOBEQEfYKyf00zoNKMnO92D7O+OfCRqB/0ZuaPkOwJBXhYzeMnmJDvHlyMcXwBeUhanS39nx/8MPfIp9+ioBIT+7p3kIU2I/S3UpuFj8REVBa4DTpNZCWApTub5EUKU7Wb155k000m/ngB/mFjvmKZ8u0yIs/KLusIH55T4E0AoPQZcSuB1ESBLSFa+ntDuNJo6I/DPU0K072MlFV/MdcBKC1+3m0HrRHWPxDsMN5YQfO/YFOe85uLX0KcmujtLsOaft/q68M5dlNmg+k1fQW8vTGGZ3daHJcPapY7U2J6hckvRMt2yI9obGV9JvziI68JiF0NUTx1onylowGD4j7YrLGvRsMihTfQpHEHaC/t24FEdravpSCo1qDpoaSp3Ipj/a75D+yyqE9TYzFsdnoRYhYSYkLrp5e7SjA8dUhastX3taZjEGozapvghCLzvVeaZzUgZYq68HGRgBLiv4kcsE3DsVrkJp6A+C+M8z7+oxNK1XCptessWcxzlN8FbQ6Y82QUiqT5B7C80nudzJ7ghsuLTSbwkjELBC8rv8sTGc1tlV/6a8jgNaj28EyA5GVZTu6bAHNkTOPBzhylTAK4cGRFBbZ7imUw0qQYy0FeIIa37UPIsR9GCPSMYJHcBlp23XbsB+O/7WST6nkntaEX6z4X2IKNPUR6IsJeX3/hsFumCYwU0Xh0SFYQDIRLTr7zbT2KK5TsViMRjBRPpOyExRcaC29NG0yerexTOz8/NkwTBWgQ8zbi56wXVn3t09efQgxZ0QZahmv5xCKThpcmUs7LIkV5pQ5ZQIECCh5kBU7JQdy93SvoSYkrhSzPAYsW3ovWGaPb90H/uzctBugeztXYT6ze409XdLWjmjFcRknhCcwtVk0/iTK68ZEbCPOvDmxX2qdZJ0M+azXnTuVY+VxgSyD1bTZdFH2pSKTCCDu5clOFZ0LYVkWvD3Hp8mEHjx0aAPBBuZYQNn9ed+PXfeqBRMmi8+0WxFmpUdc0XnZvoEADJ2mFWX55wgT X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e4be73e4-01d3-467d-90d0-08d89824059e X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2020 07:12:55.6356 (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: ULTq7zogRYgjZBhf4V37NeMporycGSBMSdXN2TMLIkryGQH0O+RZrS6s3e0kkW78HSYTfuw0qPcld+onvTGtsQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4633 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201204_021259_593447_A3637939 X-CRM114-Status: GOOD ( 13.63 ) 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>, shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, festevam@gmail.com, 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+linux-arm-kernel=archiver.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;