From patchwork Tue Jan 19 07:35:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 366139 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp517416jam; Mon, 18 Jan 2021 23:53:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5ZXptdGJtP/EjzmVEhNMVl2GJXV4RMICR+A5T+0Di4o/U0SuAYwFQ9gBx1IP3Xw8uQmLp X-Received: by 2002:a50:fd19:: with SMTP id i25mr2210043eds.386.1611042818021; Mon, 18 Jan 2021 23:53:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611042818; cv=pass; d=google.com; s=arc-20160816; b=BEH5/Vemsj6oYpBvQCQKb2zVavNBHJoa7Mo/6Z2hNbHI2FWmGt/U3fzOw/iXCVG/R+ ETizCeD50UR09NPl1brhE3py1KJNJyEBubKaDbACp9j4xOUhdfmOABRI2qzlkWqNpiwp G6qKHn0/vi8VE9vZoGzDRnjMsLgZBpSZCIXVWT9Qa33fldwAMOwth2ys5g83BGXfR+cO OnigFr6pQARkU1ckPWtYuPIXhU7AwDsq57u82F9Jj+RqbBcJOM82Ti8j7f0T2oYi+5O3 8B8Xhe8AyMQxXbjaPdRySnpdndXPIf91B0EpbEMlfvcYvUXU17pAPbTxdeNpp/VnFC2I qudw== 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=DX3bIumvlP8w50WFWrdJ5JNRE2VuVth/v0rMXw3E8+ZBGWxk1ZQpmM38FovmWSUQVT xEJ1YtSX7MTlZSrL+6FkhrBgBRKUnb3t6yy9ivQyVkw2fsgUAusUUIjpzJJideKfkcVf aivg+6kf9i82easlDUOXoRySd1RtPRgxgtm1SmTx4VtLOFGTX+bz9+IKiTxXuUrRQg/t 4/aZvldV9PDe4vigZ2Ien4t1PPCRyAZk3+VP5WmEWydjUW+ATRoxSQPitAima0uIlvIg 8qAx6nGa0iVnXFna9Yvgk5H+VX3PVEKxMG1/9lcs+LgNs770fayyWHkCVQ3DswCrgaPk FaQQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b="M1+Z/7Tk"; 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 devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 v1si3167966ejj.430.2021.01.18.23.53.37; Mon, 18 Jan 2021 23:53:38 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-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="M1+Z/7Tk"; 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 devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 S1731347AbhASHxc (ORCPT + 6 others); Tue, 19 Jan 2021 02:53:32 -0500 Received: from mail-eopbgr40048.outbound.protection.outlook.com ([40.107.4.48]:30438 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731464AbhASHsa (ORCPT ); Tue, 19 Jan 2021 02:48:30 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jEUC/Al0Q+OmeGLRmclRmnMWrHA5r/GdudB5pRuipgg70QeYVXrEguQ1URLlAkjX8/o8W1YK0oBu2ajIRIKwlHiQZExe9Sv/seWclKo96Kbu34gPbRPByZfvAwJQ54HfGOk54CYCddzLMlVQoNKm90ZIXspkReZu8glVg6gTQPdPZTPQdCswyvGrHeV8tO5XoyZ1Q8ogc1VzpU2LevWPLMT49ZS+djpoMp4PgHJyFzVFJKmb3GcFQD78N5/5ZweZt1PEOBWMkE+s42WmxvY0/flDVRpRT6B4zwF3tMSEVcY/KrDukbZH4ONcZXrIFO2pF8scKXf2NFkCawe8777GyA== 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=J0zU+CeOeKWicFwLolgf/Sb8VzCP+jaHgmv08smTNpF2cDF4ImW1tM2OmX++4K0LNCaY5rLBZnGED6K4I7RLwjYq6L3/GBUWIw2ZBcntNXaJLGgJkPi7NSbyVvVqqgnLYQElIYfAwHZvDJvJHpRy4OSkXhveRrnb1iVV+tI0etIY2kqYaRGnJJu6y6vYv9l8lDhbz5O4OrybpQ3D985tlGWgsqRtuc2YftWRCS8f8iYGRiG71lvcw7dJnXPJ8VvsbS6so0iDJ4rQf8txRhRxZzS9OVLtmEhDwOfoUEXrsNMhtyHcnxgpd91w//JQDbDyj7LVTa6nnItEK7avdfcsng== 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=M1+Z/7TkCPHHDeP/NethO1zvrwizl3Y3UaaYMw0wPsOAMgFtr0MId7Y9EsxA2xNi/zpplTVIG0RFEfxz+DrgqnBlzeXNKPPFAKZDaAfcw+k3Ac5tzHScT0cwAW1j80HDFuCaEZleUoqH+lgZSXL2ooahE1NJGcT5m9qlyKya+tw= 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 DB7PR04MB4492.eurprd04.prod.outlook.com (2603:10a6:5:39::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Tue, 19 Jan 2021 07:46:10 +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; Tue, 19 Jan 2021 07:46:10 +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 V8 06/10] remoteproc: imx_rproc: use devm_ioremap Date: Tue, 19 Jan 2021 15:35:07 +0800 Message-Id: <1611041711-15902-7-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> References: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) 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 SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3763.9 via Frontend Transport; Tue, 19 Jan 2021 07:46:05 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 6b201de0-e5be-416d-0ed1-08d8bc4e49ae X-MS-TrafficTypeDiagnostic: DB7PR04MB4492: 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: zGa5jenCbuzX028KGIWZFsGlk8mEQOPtv+rM5mbgHL6UxvQlkS57OrZiRxaH5DtoQGxiEeso/QhPadR/EU/Iy5JYzzYjQNOcuH0YAV7DBpD+wBdGoJcTKvL1/vLMaOeMc7CM5DyirjLSjb+Kfhz/PBhzYu517AEwavGpgdLkUj9BoOGf8ceTml3pePEK3Ln7p/AQvDLJKyXbFy4TYgBsTGIsJoug3tkt5jSvH8KBN/xGMH+QQDsqd93ozIrDhzAqA3Qb6OyaGuDI8FExIPA35B2tlkRi4bGxxcqHmSZfHcI6+UxPHvZEKYdYjjFW/1StIhEq8SyiatwKmAe1Xd1x0bZPPUndBM6JyV5XrW44XQ1MexhizNoXrWargJdxjMizfbILGFSe8TFjd6JtYbXFK7tNvpvxh3A+oLDsO+aofvQ/vsGW4ELkhImMHEedT9QBsPSrwwFP8fu/kA/QqW1Cww== 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)(5660300002)(2906002)(66476007)(26005)(69590400011)(4326008)(66946007)(186003)(83380400001)(6486002)(6512007)(2616005)(86362001)(36756003)(52116002)(8676002)(6506007)(498600001)(7416002)(9686003)(16526019)(8936002)(66556008)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: pnOy5WynSXsZ0MchRDwwg0msYQSw8/TYQu27Pd8NbiE287+kbxuVaJIUd09DGUJIisDCcxcFgMx1AQITgb7ZicnZ2Qhl1HXKbZ0HmXyUvE3db5tQF7wS+3n7yDv1PrHJ0vWiZe4Mr6TpugwZkZKLXQYg8ITuVxw2R4oU/mHJcRTrERUJYd3ivszYHRdDR7pOylmgiWgDCChXQAWXJQVkKCZSDVdBPho5ZJV8t4e2dPxGvIl0MBy/zevq0QZTXGiQimgGOk/lLvMPieL9IRLMWiBnvSzvySpNXw96s3+SvMSX9+KNcOBMkubeO7I6K+Mn8fZHTFurrzjygDqwCJyyQy6L61tiUPJEEdlN9OtTKV32EiANAc6GX7pqGTjQCgQ/HyMO+ugEFh1PsXfvARi2dW0qXpTFJM4pGpAzXbB8G6r+qSEA+toJloZNDGh4YNfsV+kD5IVntuQ7sRbrw1xx/pmPqkHV1DAlb8X1b9wYFl0dfw3u8IcPBvLbmrQIHGem5eilM0i5c1P8bZrBHYXAj2DMMkKY2aIV2rBek89YoTKEpYr7siBVgOSkvXiHRoxSm+m0M8lkNnPUaYe63TnMPyLZqiNOerkl5aTvrh88TWyaEnZJv7K+oeDhLnKYuCChYp3lOl60yfKsFq7+tAXKw57KJlqnNr6E9KQ1w1pHzp1l/AoqvzBUprJyiY3a56ytwF2QbVMZwdcdvokoMXu/2GJhWcP/tVf+bRlAzmgWJuaCySJ+Rz93dXgekZTXNEaAdeyZAvIz8z6mTmkPazstBOY/FppdXfg6nScTAQFWrCVkXb0a/ADEjIk+H3QSP0zuctXfnIFTW4l6/3CBsFMIzpcyQm8THCzCh7GjusYKNKEqgoP0YQmBXbSu6ph9ONLqtrHtcxJSE95jsbb8NpUzUieQcPSZ7NL4drcrZw30c/M216nw/aygp8O2gjH+fTEiDb4+s24SsQ8VcvbWn6Pp83N+w3wUYMSR/GzRcMsV42vabIZDrvqjus/VoNlfk0sJ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6b201de0-e5be-416d-0ed1-08d8bc4e49ae X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2021 07:46:10.5938 (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: X/HEb232l+Ze/pqxplC2zP6psdpj2qJPOGx1D+w6kNvlz2h33SMLH11XnTh83IU3HuuNLcE7mKAaRHm9sFjbQQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4492 Precedence: bulk List-ID: X-Mailing-List: devicetree@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(-) -- 2.28.0 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);