Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp702199pxb; Wed, 20 Jan 2021 19:11:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJxocxVmpphoXk2LbMCSH5bGP1LIskvhUuGpWlUIXD8FsPMjMTv8IBpt6lvlgWEEkQiOrjN7 X-Received: by 2002:a05:6402:2289:: with SMTP id cw9mr9384638edb.319.1611198665160; Wed, 20 Jan 2021 19:11:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611198665; cv=pass; d=google.com; s=arc-20160816; b=cfBusd3s81Qm4d+Ftx7exG1rfQ4Qan4TPuaWPU3UEzXikfhmqeqbWZkBKnPZQqiqT+ m3eAS73B9sCQwcdgI24fVNmqdud6Z+3/ckHpM9W1eEukitjG8jYWs8b3QMIns6i/fnYe fORd+AMZd2oefNTLXXQFIqt3DbplhNr5bI/3Pm0qwMyY7MdRj6EUBxEqKFdUVnbV4qsW 9PIwdrEYpjz2SEfA70AS2zpfJXjdqVUrh5ektAcwxJ4YqOLA8MHnxTve+IpPDnPoGtKJ pbrG9Y6pSQD0p0ufFEMKpN/Y15ulWw3wYOf6rldWg/Vsxk4gBKd3Y0a6kPIP97f34ovm zdaQ== 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=NrM/10lxX+u8ygpoSj3Cn75qK7g8pM1NhQgG/rAaoNk=; b=cmzylX/FvvVtD0yp9MfW8UKGfatUyL4qH1AycB+ciTNmPl+fod0oAsu9M18pcTmRQR BQVnzp7lOw18qRc8VRWgqTEIAIflI+yzpHI/w1CHfq0muJJ+BEJysCZ9uxkxvVEliU14 DYjWKGECF3L8NlCtzV+hAdEzCCvw/EQvhNaajpc+zGI/y8vyC89XNVID3bSX+QIzFHU8 s+wf+5TjwDkgb14TXVUo03fgi69WbXTLwIwkyeQLi7RGn0636cYhc3lNqXu/35+GQKdM HpgIJkK0lwcE2ibEg2k8412EeKMYjJeoWzzwuU5z5at08XJUjDD1jpEQlcB8cV5thWCR bMOA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=j5LGOjIl; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=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=pass (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 w5si1636215edv.470.2021.01.20.19.10.41; Wed, 20 Jan 2021 19:11:05 -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=@nxp.com header.s=selector2 header.b=j5LGOjIl; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729699AbhAUBTm (ORCPT + 99 others); Wed, 20 Jan 2021 20:19:42 -0500 Received: from mail-vi1eur05on2088.outbound.protection.outlook.com ([40.107.21.88]:26411 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2390695AbhAUBQY (ORCPT ); Wed, 20 Jan 2021 20:16:24 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=neDpiKGO4rGRMFlN2UWxUsqadd99bTb2qg6Ykk341oUUTibgo2gLugEmvpLh2AhK7U2uLgPx23lrBmjsC5pEBSz82LqaAHYIXMg/XwRLtAt2/V9BDjibH2c6qUrTvSaKfTkP+UOoR4E8rel9q955710VnHYVQQr/M7ykiw4rmVLg+7fi5HHf079BaKUf1XXhV/UuqJPGQ67fhmhhCwgZFwL31CQngl+Pm43G0M1d4iIv7vLKgcP9JkO09LXGghjBynPBp+/zni2wpSs7wOguAVXoApdvmpKumsA6WlXu9h4fldKFihXHgh4/w7T5z8iK5qAkH/w0Fo/73ct4TW36nQ== 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=NrM/10lxX+u8ygpoSj3Cn75qK7g8pM1NhQgG/rAaoNk=; b=aTpnFsuNA59iQC1vZOCAxDuxyCuW+ZgcbQ8Pl/VWDsXhsSkdMb9xOCZR8Pzf9YBQ8jwxeFRrMy04+4aanutrxWlDgnKWHOlwV42W6R2gHgiItzysbGrhTrr5ETunC3HcQx8zje/XdeW3gf0woxuNBvvf7F1RuMIFhboXoixvK5FLhdKDvbCT6wrveg0Ioa2Zz8A9rTallIOPveq70QqZFnDxcY8mgEDdgVjjmO743U7gXF4wpeNEuG2gkVhuC99uns/0rM1vQTsD8tjs4empw9kBgfK+RvVO7JfpP2WQvtiGC++ZqTd9kwBwDMS+M+DMfZ5cIMJE42w4Ao+m7P0V9w== 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=NrM/10lxX+u8ygpoSj3Cn75qK7g8pM1NhQgG/rAaoNk=; b=j5LGOjIlFhTkl2xwcFbmkOuUVSdAbGUrzoipuvl+42UP0t8EZIZDbHf6nEuNCmqkrtiqgLT4PGVEiNPQVruw6UPY8sxN2A9dbAlDvf2+T7mBLeKgsNMbkCvf830+w1Ne34WeFcG2P71s2AzYhkrBX/mFcixdkywFOunNbxz+yic= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DBBPR04MB7948.eurprd04.prod.outlook.com (2603:10a6:10:1e6::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.11; Thu, 21 Jan 2021 01:14:45 +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.3763.014; Thu, 21 Jan 2021 01:14:45 +0000 From: peng.fan@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-imx@nxp.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 V9 06/10] remoteproc: imx_rproc: use devm_ioremap Date: Thu, 21 Jan 2021 09:03:31 +0800 Message-Id: <1611191015-22584-7-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611191015-22584-1-git-send-email-peng.fan@nxp.com> References: <1611191015-22584-1-git-send-email-peng.fan@nxp.com> Content-Type: text/plain X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SGAP274CA0018.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::30) 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 SGAP274CA0018.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3784.12 via Frontend Transport; Thu, 21 Jan 2021 01:14:39 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: b995e028-906b-4362-f1ef-08d8bda9f02b X-MS-TrafficTypeDiagnostic: DBBPR04MB7948: 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: KdikDrbC1KaYlYsjxl/nT6YDwHaeqrqeAVkGODSwpg0DlxICMGZDLvBnJipSbsVhmHAhKO5mRmZ9bTmUUmdETFZPE7x5F7cHZ3T/iFjxSTawy/6Dr7AHhuZRdwFuQM1LFyxshKy/hk9ZVJcVyHJIM3WYEJaxeT9DWk5it6iTRyFARqAhGLDKnwmmwa3G4xo7iyPnMVnpKC3ukkXKgv5gSir0vkShCGI34G66Dy5ONDuj4nYfSNyvk82+usOkRmQL/Pc9jX+Ihkm29yPPgl07Eos48WZnSgnjwEq4VsdQILPbdM3+473KJHpLIy/CO2AmOq1Bc8gzPpGMSIBdwEl+01vR074W9spoAP2wv4GLr1ZmR0rthbjotn4LMBu6hCl2V+nzcfdbFa3jbAqGsTEzkDzh11YoDqr0FJvaUuAP8jLgycsPahxbLyF08kusR+sgsYyobAuZoPsM8329YzdFuA== 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)(136003)(39860400002)(396003)(366004)(376002)(346002)(69590400011)(66476007)(186003)(2906002)(6666004)(52116002)(2616005)(4326008)(7416002)(5660300002)(83380400001)(66946007)(26005)(16526019)(956004)(36756003)(316002)(8936002)(9686003)(6506007)(8676002)(478600001)(6486002)(6512007)(86362001)(66556008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?byFOzOn9G12/AeOw6OtM0gN6SOP1WCjBAuSL2WmhS7uoboo/19sHPtonJP6x?= =?us-ascii?Q?FN+fu5lgiNOKq/LnnXKPA8wNtXtHVNg4cAn3hOHKntmiqipc6kD/Fc3mFujU?= =?us-ascii?Q?Xdm5y0+X/O9Z2c2Pr1AANGkYWSI/RrvSPhmKdsjtjW97WMMDD26dXXCHbLia?= =?us-ascii?Q?LfLdKza3qRAodT2bvRqsS3ApBvRrduLvdVQbrJqHmoWRp2Pd2LMAZXud4xHD?= =?us-ascii?Q?fkPptUuldpOJtxh1DYXAcYAD2IwpoMrg0V5FHNZq6WOD2q+afYTiltpcw58Y?= =?us-ascii?Q?UX8s9ijGRtGf/WeyQXvsPUCelh/zjs/lAHMJYYlg0LEITFaBNmVwt7Pez1L0?= =?us-ascii?Q?d5ZFP60wWJWwI/adBpvWfOjRU8WgHd+yw1qOD3Sx22hF1bfUn71a6+iQ8aEl?= =?us-ascii?Q?a29Lg1n/7Ypavj5KrOJ6KvIJja+eIp6dYQhsgGOesKRfMCiRU9ndCNRXrd/B?= =?us-ascii?Q?8h69EyUvlBbRTkDGMWfiwr48TKIS+Wu8/iI+j0W+5QXnUbUsTZolGK/UMGNb?= =?us-ascii?Q?RMyuPsyKAshOxpww5QK3Ae/p6w64vHcvjLByyrKlbKaMvFdMQqzEfkHN5LHN?= =?us-ascii?Q?SVhDhWYfFZq1QqslFC2TSKU9cCYlA+VB713Ou10R/IDvm3vjeO87OIjMuDS1?= =?us-ascii?Q?a1KY/Fj4ruLkexw2cU3686t9AtlNwe0Zbk+PHj/ycx7ficreHV6RyyozGenh?= =?us-ascii?Q?6qyHewXgMBb04QCwPQugi1wlUtwT+Y9HhUqjTDHAbfH9EU0yAHTAsypdWobt?= =?us-ascii?Q?tJTgoBDvSCOkFvPk1Wpd0zgIsu0+anGeCH0alTbL2vAV8aGG6Veu50seed1q?= =?us-ascii?Q?VTgBK1fXqnKv4DS95yUsv7i/Vu0BT7JHsPVqyx89Xuqs4rx8YTTownYyzLwx?= =?us-ascii?Q?Rb/gTIy/8NArOoL/lq5tuTnLf83JTi+Z9/MYpCSnXra6StR0avZlV0lbVm74?= =?us-ascii?Q?NzwCdLcRIvvpGybdmUqDdy1XlxBr/kiy9TMrycLhVW5lutYFhgm9TJUgsf9E?= =?us-ascii?Q?QPo+?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b995e028-906b-4362-f1ef-08d8bda9f02b X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2021 01:14:45.3637 (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: r7z46wDPxh34JyYZZTJyfAFOuoPAhH++OwjyP6UJuqL4KWQCDVHBAhLdXnBQCeCWvbfjvYhwECpFQ44vpC97IA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7948 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.28.0