Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp402152pxb; Sat, 6 Mar 2021 03:42:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJwY2PKhBWtKgKXR5gF2AgDLd6cEQLENLuFFzfW2VuITIo1pPw1BI7YOCEFchFv7BjLza6s+ X-Received: by 2002:a17:906:79c7:: with SMTP id m7mr6323596ejo.337.1615030952953; Sat, 06 Mar 2021 03:42:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1615030952; cv=pass; d=google.com; s=arc-20160816; b=rTJwHRghPS4pCbm6tqpvUh43QzcoGhqPTmAnrmjQ5t1kxuv9zIsKR2crOnYn3/DAAT nJohru0Q3N0odlDzER1m1fEhotHmPu8llFv37NeJ3sMR7PkpaNSF08glfjBGsMLbByra xP511y+vreennYjEBKFxi2XnWoTh9wCx4JbGGt02QbKigFXMa2TfTu8PkC7TtaIHFv0l rpOUU2GZ1wfsnvv2HoYS/WBb3/HekyYWvK+7h4cCyFejhSzWl5XqbApeqKTfiZTwpyhD rHQycQ7JM8CYOepEDgpg+eM6exkLRA5dFBWki94RqP6+VKHm7wDgE8lM58gA6zsedvoT E29w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=nJE0Ov249gPUdtT6ZeB+lf9+Z+9T/yJFkeTd4I25VJs=; b=oEPK8264wYByDVr6gbByFXBo/hdim+hJsd93ygpxt3W8LCKJ51iXahz7lTHrYIx7/C SF6QWb+8WwarnsDhwd/N+kIX/4m16gWV2/8l3uxMDo7yVChZ4YQUkpSeArsmG0Ksnw1O wcp1MaOUOO+gPURswmGKND93HO+cZGObcorw7mFy3Iq3tAClu2zsYLRazbV8/8fKGaj3 tfk2dIP8xOlhmzKv/U1ax2EbZ32Ix7nYuCsMyyWlRxZKWw2XtrBgDajruzR0/0JX8agf dFFpszORNBxnSjNvV2w8xgQCpEweLaoKevH3/XF0Fs6NalSpVYGVNHq2HhPyJFn1cVzU Zx1A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=gt4GVwrk; 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 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n19si3489729edq.224.2021.03.06.03.42.10; Sat, 06 Mar 2021 03:42:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=gt4GVwrk; 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 23.128.96.18 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 S230510AbhCFLis (ORCPT + 99 others); Sat, 6 Mar 2021 06:38:48 -0500 Received: from mail-eopbgr30086.outbound.protection.outlook.com ([40.107.3.86]:58510 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230458AbhCFLiR (ORCPT ); Sat, 6 Mar 2021 06:38:17 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RLa4VmYqrWoVCGkcEGEopF9j0Jjn3dXjVxWKmetfYDvMdpZNZinOe2wlC89DkiMN1AyHiB7mU49GEF1Pp602PUgbEw8IIFvIzSfonbZVflvxI55h3PxbUknYXAasPUHGaS6bFGo+zrP/T9ookzDvNmmbdfswcC5YgR3Xmt49gyDc0UB3Q5/e8pm7bcvMjaaE3bsD6g2RvPgPinE/Rq8gBCZop6O/M0QTEK02iO3CnP9Fl7WGvtQXWChreTokTpmvbipUEJRhpwuJ8vOLwfokApmAPDNJ/aUHQd2REpL9/0RuE7DdN6gqW7Z8T/eOghkwvdc7fz8HuQAmrUE4H3lucQ== 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=nJE0Ov249gPUdtT6ZeB+lf9+Z+9T/yJFkeTd4I25VJs=; b=mfIaMJ805RdFGw4UlDfAKf6ChBFBw9YSv6IJhYCx9e9/DNDwZPomZVAkE+Nb0OXvF1BxFIiORRvO8rw8wlujSsgNLrqsXpfPY7SdMfJ4WR56C9picG6SBPxuc8xeldANgK/ccoT+rDSbADo2xGWU9bvpZOXhn1vCScvoBx+5Stxl/geujGs6QpQyRDcgdDuSboIvD8I/3NXJUklUCuJSff+4DKJcdIvSa4wT8CqW6vU3KZNnkR02zpGBsmJ7xp+/numEKSdfJ90/n2Ty3nx6+G8A8ZqUDKsWORWdlZ4GGTNfcu4i8mEnS5Fn6jUCpWkam4XRDsSEA/tjb/nXy1V3jg== 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=nJE0Ov249gPUdtT6ZeB+lf9+Z+9T/yJFkeTd4I25VJs=; b=gt4GVwrkM0Q1JXS+2YNh/YAduEbOml7p9lYbgnPVdtGDmCt39IQIbPPCeDQ7FRxiAyJ/JeOqZ2NjNj9vGOg/s46wukgjxSYlvInuhbGbozjSJgerCghfKe/gGC0o8lGMlCG5gVhAovcJ4eof59Cedtbkog8PSNCwtOua+Gkt7SE= 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 DB8PR04MB6618.eurprd04.prod.outlook.com (2603:10a6:10:10e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Sat, 6 Mar 2021 11:38:15 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3846.054; Sat, 6 Mar 2021 11:38:12 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, agross@kernel.org, patrice.chotard@st.com, Peng Fan Subject: [PATCH V13 06/10] remoteproc: imx_rproc: use devm_ioremap Date: Sat, 6 Mar 2021 19:24:21 +0800 Message-Id: <1615029865-23312-7-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615029865-23312-1-git-send-email-peng.fan@oss.nxp.com> References: <1615029865-23312-1-git-send-email-peng.fan@oss.nxp.com> Content-Type: text/plain X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: HK2PR04CA0047.apcprd04.prod.outlook.com (2603:1096:202:14::15) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by HK2PR04CA0047.apcprd04.prod.outlook.com (2603:1096:202:14::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3912.17 via Frontend Transport; Sat, 6 Mar 2021 11:38:07 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d0927e6f-c1b3-43c7-ac9e-08d8e0945284 X-MS-TrafficTypeDiagnostic: DB8PR04MB6618: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:849; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Fupdrjoj6yyVmMMGc51CoOkknDKF409cPtLVuqCpbiqanEBN0dAxtH7H3Y16MOvUxtgXDGHTs3MHKgREMVOdnGzvHYqgJPXGDBGosM1UFzsQYJbi/u0XZYJ7I9kKR5QYavmfMl2OaNzxR3Bu2MGE7mc3Pt/XGuqvfFRahck84Iu4LkyOL1kccBjtaaXWJgVLNuhQY6Hi8M7M/Ie/2Ga19egG31zIm+n1ly18E2uUXNe/wHpx37x6xARINPMqhiSfzwtNhD+iSEhUXRKwgD6iFKEc3Jt1W6TTdMbtGggc368V1r8Tz5Dyy0ZGers2G5gYvYNdpuskAmnssEXvT+ZGdL65c/UVlK3X5AMUMikywj89pxWjwzZXrEXZoMpOTqU9/BbH9+LQ2hRaCiTAhOHXh+tbALsR2s7Rp5whrNCYnYnsQsTo59XhN5bBhbm2uAHZEYRyFqGWHr5Q7M+av4Tw52UaO+YcXryuKy/UUnI4FwGY6oEwxhm8Z51SLoRZ/pOtBEOuTIOQSx/x4iBJVK2XDAeJ8/CYjZMTfifzp/ETig9iDsj6Q4XHZyjpL37SUbeT3nY2/RDpW0gWzSLx/5Gc/w== 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)(396003)(366004)(346002)(376002)(39860400002)(136003)(83380400001)(6486002)(9686003)(6512007)(2616005)(956004)(8676002)(6666004)(69590400012)(86362001)(4326008)(66946007)(6506007)(7416002)(2906002)(52116002)(186003)(16526019)(26005)(8936002)(66476007)(66556008)(5660300002)(316002)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?zEEUYS7EuPYq/uBuiMd7Bx7OI9ZaComeVXz3o+pn6FVv4mob+W3sPuICJ0ez?= =?us-ascii?Q?VzN9eOJQ1zWtpzi/e6OIzml36qnuQ4+WxRq/PpU39wzgmIjR+Gdte0AdWt+e?= =?us-ascii?Q?cgUT2bpYNp6RHvcFu9DzMryw4xz8VteiJwTAnOekt8XiLSghDJ5yx7wIJTMR?= =?us-ascii?Q?IMPpTDFdWu4tIDQuCschrK3Qm9WicApDj3Rr564/SJXxRzzOVGwl7BW3rLgm?= =?us-ascii?Q?fdi38aLo7eJ3Q99zCei79w7KIM6h81KtlURoTz7oiALN4UnSXnqtqFTQBugp?= =?us-ascii?Q?JEC6vkMTkPuOPKxwwfcJ9Wu8elkKvZ6Wl2ie7B6pcpebKh6mw0NZP+updQRq?= =?us-ascii?Q?DegPfXVnI4wtLMtQD+LY8SfxeRSce3E74+6XPQw7+uLGwmRtQuI1qLWTK27n?= =?us-ascii?Q?lz/StATY6lIFbzVBLGVvfOJfkUoGKr8V23L+i1uXOit7B1BGMnVkyzdP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rmjtW?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d0927e6f-c1b3-43c7-ac9e-08d8e0945284 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2021 11:38:12.1151 (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: OYMaM6x1Qn6wsQ1w7gPmsd/oKgEwKNx2X4L014e2wSgKELgELYmtgqSYGv01UHrYPrgRWbxLjU/PToSc2C+J4w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6618 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Fan We might need to map an region multiple times, becaue the region might be shared between remote processors, such i.MX8QM with dual M4 cores. So use devm_ioremap, not devm_ioremap_resource. Reviewed-by: Oleksij Rempel Reviewed-by: Richard Zhu Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier --- drivers/remoteproc/imx_rproc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 2a093cea4997..47fc1d06be6a 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -296,7 +296,8 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, if (b >= IMX7D_RPROC_MEM_MAX) break; - priv->mem[b].cpu_addr = devm_ioremap_resource(&pdev->dev, &res); + /* Not use resource version, because we might share region */ + priv->mem[b].cpu_addr = devm_ioremap(&pdev->dev, res.start, resource_size(&res)); if (IS_ERR(priv->mem[b].cpu_addr)) { dev_err(dev, "failed to remap %pr\n", &res); err = PTR_ERR(priv->mem[b].cpu_addr); -- 2.30.0