From patchwork Thu Jan 21 01:03:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 367779 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp101941jam; Wed, 20 Jan 2021 17:19:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJz1gS4hBVgLy3E0mA5kN+0ZPVU6qZ04ItyvLaIv0BsPZOL7PnmZ7QmjF614RNMTmwsE3rLz X-Received: by 2002:a05:6402:1648:: with SMTP id s8mr9306556edx.50.1611191944243; Wed, 20 Jan 2021 17:19:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611191944; cv=pass; d=google.com; s=arc-20160816; b=a4Pjh1g5obY2ddL+WOht1jmNiBBYWUA+yBVckdqvBi3FyUbP9LObwTNUJyCHIM1Qbh nOnwr5zvz4Nb9D7LB7l0dljYq0ncoi5pfNp1fYj9/CNW0yL0qZUKdReOHQlINz7zul38 cMdxUv+thyvv2EBTLromOF5+cplHJuPcyPzDOlUcCjJVhoDlcODmYlRJazVEvQvEbHtH HY6tk7onk11LqAwLDAhN56wwTMNoxa/t0tihBbG1H2uTgiCbAWzBcAn4GfdLRPiRdPqS xAcAS6crDNdAL7hVo082bMAGWIPzuxxSQB5pAxJdlu9jvPPz9Qr6ffeLyhJDjWnCialz 2CqQ== 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=gDE+R7Ch/mAEdmQ1FO6tocOoj14gW072NHZg/cEzn5o=; b=zHCowZJyXV+jQ7IQ3SqdUozIULYSOdX5ixqRxYfQe97zV/lVqZsvXj2wD+Aiz7DgSW onv8T5JJMd499zm6JvLOwPpbutpuTEfIq/Qtkl38+tSESDJHnV0eXXkJtqyI7mFnhAxE BOcGLLNV1S+iWqoj+yrzUdfdmp+9cCcogaueIIqDj5yAWgOSEBChkSZBxnIO2voB0Co4 L3BbsVoX/tv0KSmR9iywuJDmVea1tjxUuaZ2gXH+hAW6rKkOXE+VFKx5W1C1C5sRsUBH XjLfQVPnRVw+jxVjMMAx9gvCZC3lZGOXuPwRhOw4KbBg6JMd3+aILCFT8f5lGKT6aQAO 0ArA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=AwrBsCPa; 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 m1si1205693eja.95.2021.01.20.17.19.03; Wed, 20 Jan 2021 17:19:04 -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=AwrBsCPa; 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 S2391717AbhAUBQx (ORCPT + 6 others); Wed, 20 Jan 2021 20:16:53 -0500 Received: from mail-eopbgr150078.outbound.protection.outlook.com ([40.107.15.78]:9536 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388117AbhAUBPh (ORCPT ); Wed, 20 Jan 2021 20:15:37 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MV3EsXNJB6YeNvioY6RN/KNF4D9sqT5pj8pjuHkfIsYnO2pTEh6AL4zeyV5ncO7TKwvFOLPGQQ8l5OgtTtC2EPGdZp+p6BqHKAHmGzcEqBVz9dKutsiXinOnW1qQi/7SWg2vS/QCY9Hi2WP1XyuEm5UAeaz3bgz9HVhdrZbaKKLC/pqGZfeuq83RPUXO2v5FHrr5p3jMPuPDg6NfwYfOUn7ggmfpcBYnry1xyGTpa3INGlq7YsGg+lOOGIFzVA/hxH/NodlJFeS2+Uby5XYnZaL1gNvt9EGojA0EwOuJNyCGKJ6sJegrvM6xTy5zLGwpbdmOaRgEkFtRSMrmt9XAYA== 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=gDE+R7Ch/mAEdmQ1FO6tocOoj14gW072NHZg/cEzn5o=; b=GMFeeXQSzlVHspoiYngFDHFHmhqqlU+PQS+XZ2naZxgjjYxWg33NCi1QlUPWAplRso0MBpeyB5c6v88NaRNuQcD8Pqv7ABev/THfC9/VeEalPAgzuGMBAdkl+m8QYAH+U8LSdY2xfAYmj9VsK4YDZnk6DuUigR29niMrZmEf9vKsR+4hNLhcM2pqxpmTtxsPKNNMq7MjvMkcip+V/wgkZTwn1EOdSYxmCGT9VnElW9AaoWdNW4CLRwABp/bSLlW8l8tQhLMPiEqnFOmRInSVZNkYzfD9ZBiL+I8MgEhfduIk6NhvUcM34IGmkQkfRiy9gmmlNMZqtIDti0HGIXVYlA== 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=gDE+R7Ch/mAEdmQ1FO6tocOoj14gW072NHZg/cEzn5o=; b=AwrBsCPaqn8xFZu7pLoLUr7hlM10gDY/yg2xhDAjM8+cETjX2fDZtfhbs/M5C9VVlUQM398ezq4Vi8+wQgrNGLboFxKk72D0emXx03T7sYFd5B55Qcdp0nqUaAsYqlMk44sxcDz2tFz/8wMO/m65QnAJyHDcM2dFGWerQ14pp08= 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 DBBPR04MB7930.eurprd04.prod.outlook.com (2603:10a6:10:1ea::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Thu, 21 Jan 2021 01:14:16 +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:16 +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 01/10] dt-bindings: remoteproc: convert imx rproc bindings to json-schema Date: Thu, 21 Jan 2021 09:03:26 +0800 Message-Id: <1611191015-22584-2-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> 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:10 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 4519ec66-9cfe-4952-b580-08d8bda9deb4 X-MS-TrafficTypeDiagnostic: DBBPR04MB7930: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: D0AgSx4pyUjnO2wjN3s/QaHwnVC5WK1qu1ucJID5HyYzof3rei1/77kQrV2mXbuAzij2GZnqIdtLhKrgJiyQ1iRglsYBRbrC9e6WYOpiYPRYsXIITSyBj1qlhuhCnCEzO3/FbJ8W4d9vy5JITDkqQufurxuAfdd+xR85F2/hwZ6h/qCHVqPSBSHUFipbw42T9s5On7GYw7rmLow/2uWCU6HpuLKeZnt9HvriucslCZOIcnvenXw6fAPDm0n6VJjH6rLiool5BUaRE6ywScYMq2pv83FCM1GxoNuz0Zu+5a8PmpHqBNxwQ2U/uatgkJDPj3eBgV3VFuQNhwjby/CkGLd8gVsHNKTUzYjvT1jKN+hV30ImV0KLOob1Cw1g+wLuAIEJtoxoqAChlLfjqvINnGomccUqXz9VmziyjneQx13NNOiw1+6re6AfVXgR6ZWWtm2QzS+fRUHUW830u81JmdmGR09bySLDVjqymmYMcUs0OLngK5epr//IoH78UOk/DO2mH8d+dDmOao6U321hoQ== 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)(346002)(366004)(396003)(376002)(2906002)(7416002)(6512007)(956004)(8936002)(52116002)(26005)(478600001)(9686003)(316002)(2616005)(5660300002)(6506007)(86362001)(4326008)(16526019)(6486002)(186003)(8676002)(6666004)(69590400011)(36756003)(83380400001)(66946007)(66556008)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: FyU/9c51Fxpl0IOkLLzqc9asY0i+/4vpa8iqVY3SBFGd9oki3V02K1dfyS0fKISqc6M1VqENimMI9H2ojFdejBr2oFBxHJ7TUTA7RpcNpuGGV9CyMcLM522Ec7H/zrhQipV+kKTLqYpWhddEeKJeNuEhQfkT0FK/ZGQR2/YNqL82mrSZeSoQSEzU4m/NJEvOP9ufksTw9S/MSIi80ESulFOplIZ4TzYETMEOsZtnO+3ojIwPlN7jMYrnctXj8zLt/mgKkwUI6YPElVH4KmVlpVqkDmqu7C0lAafLqfRK2Milu1xzDDBb1ydBsnMLAoU41jZxdufGB2atMJgcuky9rZx+P91egyxrq31SuZJ4RVkv6wgN6rQsmnwr5kN6u5rYlHXcy2NWZY3wF7xRAiph4too5qxvZ65Eu8t7+2W2Hm713maXChit3gWsgQiFoS20GOcHmx2vRwUr4Az5vJqKgBmNBrfAZqnI/ZegyU0ELqMxIfWNh1oBqD6l7U7HfKlKYQrj4+d5t0ze+DBvYQ2+MiYqJ5Eq/jC7P+6BLsNayqsyxU/HVWkbLP/sUpPg7y+Wmlg8hcJyHuekLjOsTDWTp4zzB1OrizGrZMPj4eNMwYdEQZfY0LT2tj789Hc65BmIkW0VIMXo1s0KEC2ZWmNy6VcJZdzhrpJ4FjmIlu4dnpKfyGVCTG1MMUYoSoQux/xu3T9O5usFF1+ZX1g6Az7D1ujonSORlZ4SaTTrihB1iQ+3YlqtqUyJYhyAFXWh9kLQaqDSlnbNgm2O8QME+hc4HKy7vJhRgF5CtDxj/KA56+Fs+JFSK4A+ak/kR+rw4x2n+2U954tq8j4X70x6siu7v+TCy+XAB224VovgX9Xctn1h976I1xm3HUNhKWhUdRJblzXz1gOyg38oRzNb6lc6O0e6k1JVXjVELBMCXVN8ohJKiB82lwSRpsBnC5a1zRyvONdPvm76Hosf5HGNL7X0WXnIv0glNqARefZLB+03bfcSf/o7XillD9Ey1phJnFLi X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4519ec66-9cfe-4952-b580-08d8bda9deb4 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:15.9341 (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: 0HQUQXn1TEm17oRJ8G8KhwWg1CvyJI3C663W9/Vv0dCdNOzTV3FUjXEAJA20enEhgG8q6Nuqh2eXTbgKEXMQow== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7930 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan Convert the imx rproc binding to DT schema format using json-schema. Signed-off-by: Peng Fan --- .../bindings/remoteproc/fsl,imx-rproc.yaml | 59 +++++++++++++++++++ .../bindings/remoteproc/imx-rproc.txt | 33 ----------- 2 files changed, 59 insertions(+), 33 deletions(-) create mode 100644 Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml delete mode 100644 Documentation/devicetree/bindings/remoteproc/imx-rproc.txt -- 2.28.0 diff --git a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml new file mode 100644 index 000000000000..bce6ccfe1538 --- /dev/null +++ b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/remoteproc/fsl,imx-rproc.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: NXP iMX6SX/iMX7D Co-Processor Bindings + +description: + This binding provides support for ARM Cortex M4 Co-processor found on some NXP iMX SoCs. + +maintainers: + - Peng Fan + +properties: + compatible: + enum: + - fsl,imx7d-cm4 + - fsl,imx6sx-cm4 + + clocks: + description: + Clock for co-processor (See ../clock/clock-bindings.txt) + + syscon: + description: + Phandle to syscon block which provide access to System Reset Controller + + memory-region: + description: + list of phandels to the reserved memory regions. + (see ../reserved-memory/reserved-memory.txt) + +required: + - compatible + - clocks + - syscon + +additionalProperties: false + +examples: + - | + #include + m4_reserved_sysmem1: cm4@80000000 { + reg = <0x80000000 0x80000>; + }; + + m4_reserved_sysmem2: cm4@81000000 { + reg = <0x81000000 0x80000>; + }; + + imx7d-cm4 { + compatible = "fsl,imx7d-cm4"; + memory-region = <&m4_reserved_sysmem1>, <&m4_reserved_sysmem2>; + syscon = <&src>; + clocks = <&clks IMX7D_ARM_M4_ROOT_CLK>; + }; + +... diff --git a/Documentation/devicetree/bindings/remoteproc/imx-rproc.txt b/Documentation/devicetree/bindings/remoteproc/imx-rproc.txt deleted file mode 100644 index fbcefd965dc4..000000000000 --- a/Documentation/devicetree/bindings/remoteproc/imx-rproc.txt +++ /dev/null @@ -1,33 +0,0 @@ -NXP iMX6SX/iMX7D Co-Processor Bindings ----------------------------------------- - -This binding provides support for ARM Cortex M4 Co-processor found on some -NXP iMX SoCs. - -Required properties: -- compatible Should be one of: - "fsl,imx7d-cm4" - "fsl,imx6sx-cm4" -- clocks Clock for co-processor (See: ../clock/clock-bindings.txt) -- syscon Phandle to syscon block which provide access to - System Reset Controller - -Optional properties: -- memory-region list of phandels to the reserved memory regions. - (See: ../reserved-memory/reserved-memory.txt) - -Example: - m4_reserved_sysmem1: cm4@80000000 { - reg = <0x80000000 0x80000>; - }; - - m4_reserved_sysmem2: cm4@81000000 { - reg = <0x81000000 0x80000>; - }; - - imx7d-cm4 { - compatible = "fsl,imx7d-cm4"; - memory-region = <&m4_reserved_sysmem1>, <&m4_reserved_sysmem2>; - syscon = <&src>; - clocks = <&clks IMX7D_ARM_M4_ROOT_CLK>; - }; From patchwork Thu Jan 21 01:03:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 367781 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp102096jam; Wed, 20 Jan 2021 17:19:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJxPfPKWR0Iekw4YRGrXllLeLwCwF/n1BPbbx4crKZjnm3M+hZWYEQHrtqXytX+M7N5sS3xP X-Received: by 2002:aa7:cb42:: with SMTP id w2mr9393058edt.21.1611191964138; Wed, 20 Jan 2021 17:19:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611191964; cv=pass; d=google.com; s=arc-20160816; b=xyCu0UY0LApZvzpFsq4gH5YKQmlWzws/vko5KXsxdPiflqrXpM57WJYe0Fnnj25BzN VdYhKp5qF68z8/WvqAJZJo+nZuR3d4UIeUdku9yCPlwooLvjrXRQ2+Il6kW9FFXbg6q3 otfJ21nJeQppjMieEBEKBdf6QwQwb8Ki7mse4sAuBCwIm3mRKtIBnvKkvWt4lM7Bc/iE 8WC3N1spJQ7Y/o/E6ObrYSHIq6TY5N5be/k1BfxRph3EBgJE61aQa29GtMds3zxORO6n o2kVgWeTu2H080L0Xk7MamPaStzsOaOYofuJ9eTrHFrufcZL9NZOyHGh7KSyiYtZfdwF PzFQ== 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=BNa3y1Ol5DGHpCFE597A58hnFNyL4kwr4nxF+dqIanc=; b=jNpPm4kErgqrqcU6LA7yC+9mjfAmqcZbIgM82b3OUkN2++YtEzSSykdi2X8jY9wvUM ESFfLEkU+z8hk99SkKFkDxsPKXRQXW5+SD1tHCO8moV3I7uAbE/5SXiLyVW6G6Er2yqv pEgQuduIyAQkOEq2Cnrqjg09pc1E5OmDu265BHTsTUuvKsLpMULSL2bCMMHSKz4fWAw0 fIuSk0abKtUqd4RAQgyVihkB9cwPxrT0150guePY/TGC0ZuynvDmFm9nRIztNHDZt+Fu VuUDsQPOXPR0wDukl6KiXk002Dqa2aBA2RSGorI3tbYLM1v1Frzn8+rCoqInQNltMMfb +GCw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=rzyAjOop; 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 m1si1205693eja.95.2021.01.20.17.19.23; Wed, 20 Jan 2021 17:19:24 -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=rzyAjOop; 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 S2392049AbhAUBRi (ORCPT + 6 others); Wed, 20 Jan 2021 20:17:38 -0500 Received: from mail-eopbgr150080.outbound.protection.outlook.com ([40.107.15.80]:35054 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388154AbhAUBQF (ORCPT ); Wed, 20 Jan 2021 20:16:05 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L/zHfKPT1w12CBmVxBCKSHhoPF66XCjOX5fYb3bSu0qtwsbKj7PiYOBivKlnfguxGm3yHTlDDbNudGqDqArp34il905oDcbTaOGepCfLwgRn+rMKXT1nK3ci7r+8YviS6WOOG+a4+WJne5S0vyYsIW1qFhRIB8dxfjZ0gkNdMLyclkwS9eF+qLgybW5UmgpZ2P5QH7Mh0OUHPkE5ly2mSgPN0B22PS1VNA5CsCzLJIOfKnbKT5KxxfJkKIs2BSIzHgU4by8DdohYycpBN6lx8UIe66pfspnRS+KkVG7k3B/M8Ae0xeyzNPNrtYkrEdLdRCHr/1AfaAekdC/7mRfpuw== 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=BNa3y1Ol5DGHpCFE597A58hnFNyL4kwr4nxF+dqIanc=; b=lQkYM/KwkhYTUe2kplQLxPW8gcaSQFbufGlioObmQs8X38rddV/r2N1xGg8D6DSivyVM03TKQM3D0cOgm3OP5tWxKtbsjghF6YGF/Pg7OPDFCp+4BjpSXDr6Z3MXVMqJkm/+8I7Bs2/dTuheX9iaGjnFaXhekslMR0DbZh2jivfP9bBV4VIfLtUbXAiCeK75gw/3sqH233/zyx/s5aAHlyQL1wm/ZU9wJn2Y9z9y/r/YmsbFAuAGnIRUBlpgewGxIKqD4SRiavcMciQUHFtHEGXIuDtFojDoZEvwp6j7aPeTRwHbezYLg00a6FOC8vq1D5dHBrMPeMluC0wSdUBe9w== 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=BNa3y1Ol5DGHpCFE597A58hnFNyL4kwr4nxF+dqIanc=; b=rzyAjOoptxriTMcWZ6IUyRA//3xxTaUNVtBJK6AdZi3V5souAriL8+LJiF4UFyJC0rU57UUPLMrwhiXh+Hcxw/toqAibZpJhrIURhB9rwbXktGtyWhKb1+oKwCyH/UqvZY/HLdbZmHLQSKPeuE7MpHU3/+Z96DS3bj7iSF4hIbM= 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 DBBPR04MB7930.eurprd04.prod.outlook.com (2603:10a6:10:1ea::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Thu, 21 Jan 2021 01:14:22 +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:21 +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 02/10] dt-bindings: remoteproc: imx_rproc: add i.MX8MQ/M support Date: Thu, 21 Jan 2021 09:03:27 +0800 Message-Id: <1611191015-22584-3-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> 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:16 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 79d41900-e997-4ea8-e589-08d8bda9e212 X-MS-TrafficTypeDiagnostic: DBBPR04MB7930: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3383; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NwZhlgnS4IRlmUgENF64W0DyGJ9apLw0xrJNE7WhlWQvh0MYBfdbAxZcoqOUWahMcvpdqkpudj58vJQFRXmVTFwNx0ACmCLj6FMqQnT880DUv1pr459XsDAmxOgUyw9soSCcNIDOMxmtBw26b5NyM1TRN7ZjjuVG+fk872j7lgHhiEVrhO8c8aob3I4yau7HVP9qXJoNFlUov/mSqDJ9AQF67tgZg2++9MjwEyiwHVdPQWc3RXZe+FvvsApZ9Mvz7aTH0MdyWG4wb7PIBvYFozSpplf5rT+ZuBYBG6PIjqKfgBi9FxYgOaGUPumhrM6ZOhR0w6aX5kdOsDDjjRckohki6tqzMqJpa9sdUOIlchlk89xKiOtGhjI+mfJohZDIrXez0gj7Zd62p6/spggR5v8gDzRdKjOe0o58zSUDzCZ2xmnbQuZdu1Q4TD0gSEIanZoF4oOUkvKLq/ervEItz5QzhbivGUGK2/LYZzty4FdFmJfxvME2kY3TFSovKLgL/9NV3GpNlrn8ZCNCnepmuA== 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)(346002)(366004)(396003)(376002)(2906002)(7416002)(6512007)(956004)(8936002)(52116002)(26005)(478600001)(9686003)(316002)(2616005)(5660300002)(6506007)(86362001)(4326008)(16526019)(6486002)(186003)(8676002)(6666004)(69590400011)(36756003)(83380400001)(66946007)(66556008)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: TgO+ELnzJHVQ0NZzcKX2YdboXFf17aoJA4POu4XvU6+45yf+kFZ7gWUC+72CfXj9BVpOnbnHcsJLcADVgga8Ezmon+vKA9TP0TdrMEBIGlN4ZPgY7K4iyJoNUC4jM+1hECaq5wb6vpWCdEbjIICWtEPZy7e2i3SVrjChD844LaWzF2vr2kmZmJGc7uHevYpHdS7xdevuTajazXndwGr/oZ1OJxfDMwpHf+eX9w25+v0qTYO5vfk2Dd+R5YWWPnneZ7i9G4rcpfbe2hBTt8YlmiewgJ6cYJ9tnmA5QNabrvQnMQiBXlicWNkc7ScHyH7I7HNzNWlhGSbtrY9Svl+p2Bp+AZ/vbthWXXJQcnR+BtEurjPJ0M981TjrU/OjNMDY7HZHgN8rYxiV3Z2bilEl3U+brw4tUcVviTLVyAfVQZ3vF2UTKaImBIJ8SrRTlszJ5yyEJ9OaoiroMSllWwDO/CSGCy2IC/241JYObIcAiu+2V3nzpWJDwBH40sCgwRXH0Uk+Ni+w4ihFLlBKRzvVxcimmYpqh6c4wZjYEuFBlZkTr6GwnQFLoj/0KbvLOZjNO9PjeEQu45flCnJs/nOnBOKxXcov02wsmL2jDd8BHewCG1Lp87t/yaZ2uM6UGPnZui3ACZWFFpyfwQfK191bf+0fT69W/FTuakMaNb2gMtjzYWwUqOBBxzeVpzC6JLs5m0OVP3MDcdL3bg0tthpszekfnWsi3bjb36P9PePbzj9YokultZ7lzjbKKMMxbelTweFtFPYwS4UTQbAIAtZIHabU127xi+MzYTJbVyhfZGB1UfMejpGqZe26RBiHazc4SyAx52pzxddPsXQMxL8ksuGqICFL7NZa0i0P5JFe8X32Rcr0nQGmeGf/cKboqo2BugGggn26ymQdkbUVjjJyOA2Daa4EiW7KTnvOnV4JbewZJR7hKq1xNo1knXmCOZ05VghSnym5rpFdGX63m5K0BIvisWi0b07mlKe0x5DTAr3wWbrpuJe6GBenuvAA9U3F X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 79d41900-e997-4ea8-e589-08d8bda9e212 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:21.6915 (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: tQDk2MRDMYn2BB0W4Lcxt6kBBK5YfSvZo01vyaho+iGqp/VTx8/fL+euQ/MWrE/pDUkXBqF9K16VuIwauWmXGg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7930 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan Add i.MX8MQ/M support, also include mailbox for rpmsg/virtio usage. Signed-off-by: Peng Fan --- .../bindings/remoteproc/fsl,imx-rproc.yaml | 51 ++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml index bce6ccfe1538..7ae0fca24403 100644 --- a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml +++ b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml @@ -4,7 +4,7 @@ $id: "http://devicetree.org/schemas/remoteproc/fsl,imx-rproc.yaml#" $schema: "http://devicetree.org/meta-schemas/core.yaml#" -title: NXP iMX6SX/iMX7D Co-Processor Bindings +title: NXP i.MX Co-Processor Bindings description: This binding provides support for ARM Cortex M4 Co-processor found on some NXP iMX SoCs. @@ -15,6 +15,8 @@ maintainers: properties: compatible: enum: + - fsl,imx8mq-cm4 + - fsl,imx8mm-cm4 - fsl,imx7d-cm4 - fsl,imx6sx-cm4 @@ -26,6 +28,20 @@ properties: description: Phandle to syscon block which provide access to System Reset Controller + mbox-names: + items: + - const: tx + - const: rx + - const: rxdb + + mboxes: + description: + This property is required only if the rpmsg/virtio functionality is used. + List of <&phandle type channel> - 1 channel for TX, 1 channel for RX, 1 channel for RXDB. + (see mailbox/fsl,mu.yaml) + minItems: 1 + maxItems: 3 + memory-region: description: list of phandels to the reserved memory regions. @@ -56,4 +72,37 @@ examples: clocks = <&clks IMX7D_ARM_M4_ROOT_CLK>; }; + - | + #include + rsc_table: rsc_table@550ff000 { + no-map; + reg = <0x550ff000 0x1000>; + }; + + vdev0vring0: vdev0vring0@55000000 { + no-map; + reg = <0x55000000 0x8000>; + }; + + vdev0vring1: vdev0vring1@55008000 { + reg = <0x55008000 0x8000>; + no-map; + }; + + vdev0buffer: vdev0buffer@55400000 { + compatible = "shared-dma-pool"; + reg = <0x55400000 0x100000>; + no-map; + }; + + imx8mm-cm4 { + compatible = "fsl,imx8mm-cm4"; + clocks = <&clk IMX8MM_CLK_M4_DIV>; + mbox-names = "tx", "rx", "rxdb"; + mboxes = <&mu 0 1 + &mu 1 1 + &mu 3 1>; + memory-region = <&vdev0buffer>, <&vdev0vring0>, <&vdev0vring1>, <&rsc_table>; + syscon = <&src>; + }; ... From patchwork Thu Jan 21 01:03:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 367784 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp105476jam; Wed, 20 Jan 2021 17:25:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLlna3yVI1OAx650JAgq+rF1IHCHVP2f//bR+Kp/Qzqe+t2mF3K29jua+2SWLDgSX53djG X-Received: by 2002:a50:bf4a:: with SMTP id g10mr8946965edk.201.1611192302708; Wed, 20 Jan 2021 17:25:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611192302; cv=pass; d=google.com; s=arc-20160816; b=lMDY/NYHKaBgF+tnH+ubeSaW76S0OjL2dDWA+GPxIG7NsiJFTgs+3KpK9DCBN5wshj OIRjnPDtA6btjvlXtafvtV5OlUED4G+bj51/bklbO8d7oTUbTSXBb2CRWB13LPzixiB4 lUS7xhn/omo9SEuWpfrPSqgo4SU3LXUVr1B6v65vfN88fxcRRIhkSCYVrCg/bqq9T8FI cVYgT5g+N8HUwqJ4xCpDuZllallRKcLhwRokwKHFNzRk01A/J2s++eHnjLJWRh0xnTHo t8uHzBBVpIcN1ou2oo3BroIGQugeItee6vl5JG04zqXib2bY+m885dnC1BLSRR/Pmzhy gd+Q== 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=yOyXY+Wu7yjAZykW6d3WzVozTOhNuNfY+00aYS59St4=; b=ccj8Q+aAE6qZTg8X5+rVt2lutNSC5cCbbS9OSBVHoLSGp3n5lObyyj8gBVo+yLcyfG UM2z0VdPaOpiMUQSldkK5zh98V0NdXZ4qIHJOZzCmEDfo/4gqCnhBbi+my+/0Nse4K99 UWTtj+nEpQv4zrlTV/CFMi41fe3sGwyIHzws6ML/2SS8Iwcn2irZamtaoa6OTxZvynIf zuAUwktPaXK8WDVqWY76Z2IaQjQaPgF+tPQ0dASZNBvRW4rdVIfppzdL9XDKBUYb8zK7 iAGGga7sVtut524KAku7o+zhBzlwL684hyR7W7ZaASks99ZdbO0JeZBP3uCkHV7IFgJH 5thA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=sjnzV7Fe; 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 f7si845020edd.595.2021.01.20.17.25.02; Wed, 20 Jan 2021 17:25:02 -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=sjnzV7Fe; 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 S1732564AbhAUBT3 (ORCPT + 6 others); Wed, 20 Jan 2021 20:19:29 -0500 Received: from mail-db8eur05on2054.outbound.protection.outlook.com ([40.107.20.54]:37697 "EHLO EUR05-DB8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732776AbhAUBQh (ORCPT ); Wed, 20 Jan 2021 20:16:37 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P1M5EhTcI3jkwFdYFSADZfohZWaA5q/pLCFwlKRxidmZft5RbN0Q4LYfPM4SJwz8gh/+V16XUGDFA0i8NGp7AS+mlqH0R8fzWNxzzQDTmIw8GzgBUfiO7mwZ+QGKTB3YXqhkMJZtt7e8wiV7xw1V3jJk2reRLcJPpTl3p94C3ejqcTRkt90ibjM3M/gjk65sU8/fSBrPkZ+mPYp9+7iyX/LYhM/4YpSe1c72e5F5bvtMgHn0rDIZbDUMjTddbSoskrf9FlTq2Ut73j4ZQK0QKbrTjlKSX7mhHeQwF+ehWeL321tqJWM0rzBoCm0Mu8Nr3Nsk1ygCKCiX0EjlVi80+Q== 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=yOyXY+Wu7yjAZykW6d3WzVozTOhNuNfY+00aYS59St4=; b=OCCI4XoZmxgQmQwWwU1WEQibSlG11mZq6anyGEN04UWj+ntccuBpOtAz3A+R4OPZkdjdGO9N6wl/nirnKUDYPF5pnuYd/HzaW7UltwdJnqtFrgUd00dEr/2s8HmRyKEhlT6pfoDvIXyKHXXrvm+RquZiYUJUFhB7ueoEz8R5F1uSovkFl85wW1MfQVVwbJ1doIqyMwqXYbdbeL/tKvf8x2JerJNS7FfDcr/p5snoDsGqFjacZsYLoeArRVjZGC1tUwwBK7Ow3pdW6tMr1tb7Hre0aavIBXGvm+/6i2Lg2xzQ65kUzvrmv8097PA6ilXPzA2y4ugaLvwK2hy2ACK4iQ== 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=yOyXY+Wu7yjAZykW6d3WzVozTOhNuNfY+00aYS59St4=; b=sjnzV7FeiAbb/W1ATiSszwv+1GsJeSBvvLXV4HdMSll1XQf/DfKUYVZmF1ELC1DTn6vmnAVjSTOas+sP+kInMM9jX0EZ26RuHpu5o32b0twwN9JSHXEXGLh7FZyIAYZIvX87zKrIE2g58dGXFe+nMx2hOABXJlxb/JBxd6JtV/U= 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 DBBPR04MB7930.eurprd04.prod.outlook.com (2603:10a6:10:1ea::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Thu, 21 Jan 2021 01:14:28 +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:27 +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 03/10] remoteproc: introduce is_iomem to rproc_mem_entry Date: Thu, 21 Jan 2021 09:03:28 +0800 Message-Id: <1611191015-22584-4-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> 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:22 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 172222c9-91da-44ac-34ae-08d8bda9e5cd X-MS-TrafficTypeDiagnostic: DBBPR04MB7930: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1091; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Dn1ifnbnhZ8C8lY+QZp+REniTnhA+OS/rbAzHsgdO5UUCGl6yDgODocwO/9k/N3F/YvTy0XNX5U4xFNJb4ILTgI19U2jRgjWzDfrTE7f+qkNc80qtxCR3t2UwZFCiTBOL5/QjV68/MbMvwBMVPm6SDpSkqi+eaEqo1ZngdGtGN/grJz6ADNTcPj8jFyz7QmguAfXmpW8jrQGCauCsiE0Atrl1XudhFe4heuEa0p8L2TSKcHW5iKsdP0Q3lLqnM5mgvGUrq1PZAgHXOGSrkco0btl4q7Y6bGxdrCicukSDcev19V6HaCD/zHpSivsiIX3TXZnAwPUKEARuoRZEb3ET/ElruUFif9QiB7j4QPTq3z01Lo/+4Czp6Lff1IcvUelXIZEtQCIphZTokcj2s/PNu4VIe+DEFU/Y0yVM+pql/zvvnyztfMMHybMhnoZYFDQLztauu44ip/CpTpjuJe06Q== 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)(346002)(366004)(396003)(376002)(2906002)(7416002)(6512007)(956004)(8936002)(52116002)(4744005)(26005)(478600001)(9686003)(316002)(2616005)(5660300002)(6506007)(86362001)(4326008)(16526019)(6486002)(186003)(8676002)(69590400011)(36756003)(66946007)(66556008)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: L7/I6XfLMUv/j+IEGcjahsdcMonSM/8z4zHI+BCCXiOrvh59BBke9b1+wBUggKMkw0ytn1FiaceFrsgt5l1qpRD53t3j2SQMkh2cN7OfND5eJKAmPU602J0UDXX6oVSQ8BiFq1bFu4NRpwMNzYYi3I1nYUs7ub1w5mE7qbkFeLxlwygtVH6CDD6zC8LtLTyo05uxeYUxy2ytAsCGtlGU3aZQXw/rK2AeqXgyVr5Fu6f3XooQmOcIANplKfez8EFID9XUe2qjv6VY7kVt3jumrm8sXEv43gReRW2m/L8eyef9UsWuiA+agHXejsZXqf2hs31YdORGgTjSNf6YLCkh/J6L0aONBsX3m+DCt7nY3HZNgW86GzX96+DvvkhQzO99JaalyQi+A6oaAkQDYmkERT66Pel9f5DvpjajiEAtMZa+3E1k9X91uDdN7wFjk3HAzwxJVO7+MFu3UdsbMF+EX5C2XlvsTtunOOMQIRD3Dx4xwexO2T3SSjBFaZJe9+YWcl5UN/ElQRCWSwL+fdUZ9WvDckfbfLadJTHLLCXnmlwlQFjn7oSaO7h/AkTIAJ7jdCwcRZGCvOFVNl1WActYv5kyFi55M+k8Iy+n3PlHRAaPwJ2khX10Dhr7Ulw4ogrSUSDDJl6kBJsgMpmVZ5a6Ah3FyNQcd8NVcU2Ho6W+dDpLlZPvRw15s2tdoi8CGM2d4IMdMOjXUeOyGC/+tCxSj+ZB4MxsQWA3tXZkQw7/mnT/1ZwjyoAK0PSSRgTi1Y5Nn/RD6lFVS3nJAa0LwXqNDX+tPH3DoBTLgmjnvamqCM3oFnvBIn6A17Y/mykLXD8BQjWt/YLti6s/MVTZNcdX0OuJP/KQpUf18JsqPBoI9Irj6x8KpfoavoNY2K6EcG+B3ml7emB52v76FTRWxqTmLcGjXumiPYeTqNQFaGgtGhLWKD7zahX2fNCj3VgR5a2TiuVwfdkBP9gh+2EpsN/o4qDTYiCPWxxXDZhXmG/zbXzl20loi8hWQ5mNzGem2GU2 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 172222c9-91da-44ac-34ae-08d8bda9e5cd 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:27.8997 (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: ymeK+xEF0eT5g7WwyZ1+LzsYK5QoegBCe+h+mPCBr91KOVfoiImByZt0FJ6sgi9GEFPePZxpBg4BNTQkzEAT7w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7930 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan Introduce is_iomem to indicate this piece memory is iomem or not. Reviewed-by: Bjorn Andersson Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier --- include/linux/remoteproc.h | 2 ++ 1 file changed, 2 insertions(+) -- 2.28.0 diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index f28ee75d1005..a5f6d2d9cde2 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -315,6 +315,7 @@ struct rproc; /** * struct rproc_mem_entry - memory entry descriptor * @va: virtual address + * @is_iomem: io memory * @dma: dma address * @len: length, in bytes * @da: device address @@ -329,6 +330,7 @@ struct rproc; */ struct rproc_mem_entry { void *va; + bool is_iomem; dma_addr_t dma; size_t len; u32 da; From patchwork Thu Jan 21 01:03:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 367778 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp100702jam; Wed, 20 Jan 2021 17:16:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJzPIHW1/awbWLZ7xCJkvv/+YYFaaEtUvQ3wh2+YRSoNnrKHzsYSxaFH0q+ogdKmkD8XK53p X-Received: by 2002:a17:906:eb12:: with SMTP id mb18mr7450715ejb.257.1611191819750; Wed, 20 Jan 2021 17:16:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611191819; cv=pass; d=google.com; s=arc-20160816; b=Sayym8e7d4mHtPBnnQ7GMkwIGT4VL13DXMMZse1d+C55SB+KJj+7c1GFLKkKlAEkGL RqNvfEblGDqZN8beyUS7ncFYp+RyQcQb0F/wdVaO1pD3IZEUaIpjpaMSQBO9/g8Kj61a KIi47RV/zVzVVcRJ3C+nfbB/mGCO/43neI18d4rBTl9En7oVUfGOA3O5QDD8I5EFK7fX r8G1i39dge221C8RfcqF1D67W+X/kTj1waja7QB+YlLT+l3x/NVFXlwzFhI1cPIcDRLR rM1+lDpaU8q/p4WN3x5uoOK6rbBNamNbeh0wwEMFbdWwh8GhVFaepnxsdyrc1rj1kK8Q pDKw== 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=fa48VS7cmiROA2onEOhrclcughxuxdqJL9kijwG9m3A=; b=l3uGZ4ovk6CcHNwahHWMhmH1O56fBj/teNUCiepDCsV60sSJv1JV/KfPrPNbJ1LMIT MD//eXR2PdpB7sBjwYFbbYHc9TmqWNvsbFA0OUEHejToIq0z1eadMOm+pi0TelTmcmaZ +Xo5Jdsi79H7jKyHMHWEH51UPjvlWmiEJ1GPx38rBvw2ya6bVvCF79SNFAkRW/WPIjSt yH0jQ2H/kPrjIKOhFDHt+gpWhq3w+DBJKjnkd9peTCEwHBuZ2jlrA/hTA7r7LujOFqFD dxwjF8yjkqO4ohaUGVP/ngWSSCkMAzwU1iIzv8fhc/j45pNrHHPvhFOV2gZfYp0151+3 mdqA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=kxmCQteT; 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 ks15si1201816ejb.197.2021.01.20.17.16.59; Wed, 20 Jan 2021 17:16:59 -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=kxmCQteT; 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 S2391762AbhAUBQz (ORCPT + 6 others); Wed, 20 Jan 2021 20:16:55 -0500 Received: from mail-eopbgr00081.outbound.protection.outlook.com ([40.107.0.81]:11138 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732716AbhAUBPZ (ORCPT ); Wed, 20 Jan 2021 20:15:25 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=engV1TSiCglWHJiDX+ITpYGCLH1IJWKbWEqaSapG32ebGCoPOWONj8CJBqoJj/vaVos8wisxogLzxunljTL0A2TzYtYWP4DW6oivq/cSYxe3VZYylh1NbAaCx3MN7k5TaMCFWDcHNp/dPqh1FxKCvJCLizcvHRidM3KJMnZ108RagGKwOl1OPUGoseXWjNh1apK6PooQhZJ1qM7s0afqUJGE4EyJQhzm7rVpZbi+jsT27OCTOQ7LaaZcVy77fTIH6A7S6JzqHaVe5M6QrhO+e5TIWEN9c8g3e1V/7CsLko43dII9h1mDIjz90DZ/6A3v2Hgdy+HU6KYNqP2M+QL3KQ== 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=fa48VS7cmiROA2onEOhrclcughxuxdqJL9kijwG9m3A=; b=oMXgYB+QgrGcTotfQxztLTkYfucc3v7KcIxVkmV+P8tlkxxvT3S9vxf6iMQJdhRCBtUidOkY0UVn2DYaQ1iHLZ9hQpc4FvDGEVdrRuAy33nZ0bYFM8dzFNN//K0uA3u8HGzYeLyrqP+IKKHbH+EIMBDrEZkxij528nBGvUI1ywyEi1HFa4rQUlgFw41W6tevPGF7a/FsOEKAKO5atpflfqf7oHpxmaUljkQEtsaAsUiN89Cug1kdSq/a18nMrBzlgdQm7I7NETWoaUzruKqrUgeCUQOgJI64+Q8bbDhMOICUkNgiOnOWp05W4k+SE1YxFEQsR/bIMUJNAUMLIyXDBw== 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=fa48VS7cmiROA2onEOhrclcughxuxdqJL9kijwG9m3A=; b=kxmCQteTp0ka/f8QzY6EseR2rgKg/0vqin6N+cwxPPBffqVdbOxBKwGyRqfDJWrXWERXeEaxl3++HOFwNjwDz19mmYiS8AhVdA3BLSyMls4f53b7qAPVDQjYJJjsQNSq6XgBVfdV5dnHY5EhxGy7muqPaBBpKJotdf51d75h0XA= 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:33 +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:33 +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 04/10] remoteproc: add is_iomem to da_to_va Date: Thu, 21 Jan 2021 09:03:29 +0800 Message-Id: <1611191015-22584-5-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> 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:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: b425c71f-e43a-4f6e-984f-08d8bda9e937 X-MS-TrafficTypeDiagnostic: DBBPR04MB7948: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YISWlhQMeLw1Ul3n9jGEtj5Olv5O+aYeZDj2OVpSP54DlJt6N5z8ClxSveSkgc/5+qwj7Dr+lTS1LCaS86toJV6bWTi1CsQTiamAsbfGvAzzpZs83MQClybRHv5oqRCWNNcFZg3sSH2DwfYVUaRJNnhjCaIeReA/qYY1+XxzSHdkrJWC2A2P/NkZcYosREIeQ32oIxNmZXoGNxKzr4hnuG8eYtv6AQHgXa7rumTnLOY3lW5bOGt2feD+f1qLvthX9ySWLAAENxnFfkquvuOsVnt7X+Ncq9lgI5hffmqmBs8stlebHUFR6YSXtxy3JoizL2SVDJ3kOXHPxj3RzP6qvP2Jp6v+gX2QjcXQYZcZH3i8jQVscRAr+0pnhpoXjWBaeSczknhcDw5SQZwVZpx977WKpGMZnKGn7qbTfOY9BeX806QMFgg52T2/DcebkBUuzXp7amT79bg5xcaC5sRtlQ== 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)(52116002)(2616005)(4326008)(7416002)(5660300002)(83380400001)(66946007)(26005)(16526019)(956004)(30864003)(36756003)(316002)(8936002)(9686003)(6506007)(8676002)(478600001)(6486002)(6512007)(86362001)(66556008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: QZ9hSDGpuIl6dPnoSx1isoyvVXzyg2iRyrfl+IIY65aQknE4NErlskeGBkjrZ681eBrW68HqIsjPdOHbjOrM0+5iPXgDBOtCIpRdIXFC9p2bWZ2ikEOWiqgRH31Bgm5gMJ0/jrVmjvEzezTxj+9wz8jkeoMTZVpZtwhVoOWP1AIudZ9z+uhhif9JHSwQu335GnKenZADvEgj7izO2cOJU6RuBgjKqbcIIHQAEZAteRaUs66h7fsNFjxg61yn1YmvIsIR7vBsc2WmOeUMXRZrysj0rQ7LFIuXYobc/9l+9v6o+6oCtrVb6N7YeVxEU2sQEDh8CPkQFcQrYJQSMnVb3BDgeVodyaFNSmiDdRfHNEFzzy1fUIsiQ5o6LzrPZ7OCPzkNfUO79A7fxA3sDg4D2XP4CvCqqTJVueTbWaIrHBCx6VtqD7IFhFcw3QH5xmbOFh+FeAE6Jdln/181jJqNT8ciA4+E91PtAOd3C/pAxyOXH3s0oevqp5xc7rSZOOHHp8ko0L2E/urRtDez4mJBNcpWXoYYghmN3H9FrSmmb4sLC8YCjXQ17PmihknpQHL866Rgt8BZh6oSkzp1TZxM/vyGizyW0I1TKjf0NDlXSADYhs5QkkycGoXjvsalNjC0Q5js0Jcajw1nIP2N3yEYRJxPE5s+sQf1YplA5qk7JuFpggNaeGNNnZp6Vcrqmba6vLSgzApH0EzrrCHFV5rdOqeVcFdD3j3Ah7n3RuYPRz+aoLG887BxrN8Vh4tLZya5keGpeQQYKCnqnz4+NDdhch1GuRv14p4FT/ehMKA6vAE+nhLmeij735gFPYvdiqa5Xl5ms9z649bn38NppvPLV3BtzpfwfAjtgVRTlxb1rw2gZtlz37kr7/q0XoHf20xJT9qsLp/sGdK7Dzzw47sV/gU0OOvGjpu4jmvNmF6vH9m4p4Myfq5iOUSzCg50dAPP3DDGQ3KYwBFPGUbfVqKwAbIfJzLmIzb+qGGEiU37AALU70pyaSqo4NzQgqgW1viz X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b425c71f-e43a-4f6e-984f-08d8bda9e937 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:33.6720 (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: ZX/7+WWq1CG0KTRZ27m8gQSUoC1UsFbPNhRL0CtFTFQ/Ebq5Y2GWTboLtjfCVt0tFum6dsioF1FirmBXr+WwMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7948 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan Introduce an extra parameter is_iomem to da_to_va, then the caller could take the memory as normal memory or io mapped memory. Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Reported-by: kernel test robot Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 2 +- drivers/remoteproc/ingenic_rproc.c | 2 +- drivers/remoteproc/keystone_remoteproc.c | 2 +- drivers/remoteproc/mtk_scp.c | 6 +++--- drivers/remoteproc/omap_remoteproc.c | 2 +- drivers/remoteproc/pru_rproc.c | 2 +- drivers/remoteproc/qcom_q6v5_adsp.c | 2 +- drivers/remoteproc/qcom_q6v5_pas.c | 2 +- drivers/remoteproc/qcom_q6v5_wcss.c | 2 +- drivers/remoteproc/qcom_wcnss.c | 2 +- drivers/remoteproc/remoteproc_core.c | 7 +++++-- drivers/remoteproc/remoteproc_coredump.c | 8 ++++++-- drivers/remoteproc/remoteproc_debugfs.c | 2 +- drivers/remoteproc/remoteproc_elf_loader.c | 21 +++++++++++++++------ drivers/remoteproc/remoteproc_internal.h | 2 +- drivers/remoteproc/st_slim_rproc.c | 2 +- drivers/remoteproc/ti_k3_dsp_remoteproc.c | 2 +- drivers/remoteproc/ti_k3_r5_remoteproc.c | 2 +- drivers/remoteproc/wkup_m3_rproc.c | 2 +- include/linux/remoteproc.h | 2 +- 20 files changed, 45 insertions(+), 29 deletions(-) -- 2.28.0 diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 8957ed271d20..6603e00bb6f4 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -208,7 +208,7 @@ static int imx_rproc_da_to_sys(struct imx_rproc *priv, u64 da, return -ENOENT; } -static void *imx_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *imx_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct imx_rproc *priv = rproc->priv; void *va = NULL; diff --git a/drivers/remoteproc/ingenic_rproc.c b/drivers/remoteproc/ingenic_rproc.c index 26e19e6143b7..bb5049295576 100644 --- a/drivers/remoteproc/ingenic_rproc.c +++ b/drivers/remoteproc/ingenic_rproc.c @@ -116,7 +116,7 @@ static void ingenic_rproc_kick(struct rproc *rproc, int vqid) writel(vqid, vpu->aux_base + REG_CORE_MSG); } -static void *ingenic_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *ingenic_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct vpu *vpu = rproc->priv; void __iomem *va = NULL; diff --git a/drivers/remoteproc/keystone_remoteproc.c b/drivers/remoteproc/keystone_remoteproc.c index cd266163a65f..54781f553f4e 100644 --- a/drivers/remoteproc/keystone_remoteproc.c +++ b/drivers/remoteproc/keystone_remoteproc.c @@ -246,7 +246,7 @@ static void keystone_rproc_kick(struct rproc *rproc, int vqid) * can be used either by the remoteproc core for loading (when using kernel * remoteproc loader), or by any rpmsg bus drivers. */ -static void *keystone_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *keystone_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct keystone_rproc *ksproc = rproc->priv; void __iomem *va = NULL; diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c index e0c235690361..535175f013e4 100644 --- a/drivers/remoteproc/mtk_scp.c +++ b/drivers/remoteproc/mtk_scp.c @@ -270,7 +270,7 @@ static int scp_elf_load_segments(struct rproc *rproc, const struct firmware *fw) } /* grab the kernel address for this device address */ - ptr = (void __iomem *)rproc_da_to_va(rproc, da, memsz); + ptr = (void __iomem *)rproc_da_to_va(rproc, da, memsz, NULL); if (!ptr) { dev_err(dev, "bad phdr da 0x%x mem 0x%x\n", da, memsz); ret = -EINVAL; @@ -458,7 +458,7 @@ static int scp_start(struct rproc *rproc) return ret; } -static void *scp_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *scp_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct mtk_scp *scp = (struct mtk_scp *)rproc->priv; int offset; @@ -587,7 +587,7 @@ void *scp_mapping_dm_addr(struct mtk_scp *scp, u32 mem_addr) { void *ptr; - ptr = scp_da_to_va(scp->rproc, mem_addr, 0); + ptr = scp_da_to_va(scp->rproc, mem_addr, 0, NULL); if (!ptr) return ERR_PTR(-EINVAL); diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c index d94b7391bf9d..43531caa1959 100644 --- a/drivers/remoteproc/omap_remoteproc.c +++ b/drivers/remoteproc/omap_remoteproc.c @@ -728,7 +728,7 @@ static int omap_rproc_stop(struct rproc *rproc) * Return: translated virtual address in kernel memory space on success, * or NULL on failure. */ -static void *omap_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *omap_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct omap_rproc *oproc = rproc->priv; int i; diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c index 5fad787ba012..8df99318f18a 100644 --- a/drivers/remoteproc/pru_rproc.c +++ b/drivers/remoteproc/pru_rproc.c @@ -483,7 +483,7 @@ static void *pru_i_da_to_va(struct pru_rproc *pru, u32 da, size_t len) * core for any PRU client drivers. The PRU Instruction RAM access is restricted * only to the PRU loader code. */ -static void *pru_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *pru_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct pru_rproc *pru = rproc->priv; diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c index e02450225e4a..8b0d8bbacd2e 100644 --- a/drivers/remoteproc/qcom_q6v5_adsp.c +++ b/drivers/remoteproc/qcom_q6v5_adsp.c @@ -281,7 +281,7 @@ static int adsp_stop(struct rproc *rproc) return ret; } -static void *adsp_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *adsp_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv; int offset; diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index ee586226e438..333a1e389fcd 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -242,7 +242,7 @@ static int adsp_stop(struct rproc *rproc) return ret; } -static void *adsp_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *adsp_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv; int offset; diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c b/drivers/remoteproc/qcom_q6v5_wcss.c index 78ebe1168b33..704cd63c9af4 100644 --- a/drivers/remoteproc/qcom_q6v5_wcss.c +++ b/drivers/remoteproc/qcom_q6v5_wcss.c @@ -410,7 +410,7 @@ static int q6v5_wcss_stop(struct rproc *rproc) return 0; } -static void *q6v5_wcss_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *q6v5_wcss_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct q6v5_wcss *wcss = rproc->priv; int offset; diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c index f95854255c70..1bf60dc84f69 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -320,7 +320,7 @@ static int wcnss_stop(struct rproc *rproc) return ret; } -static void *wcnss_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *wcnss_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct qcom_wcnss *wcnss = (struct qcom_wcnss *)rproc->priv; int offset; diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 2394eef383e3..9bec422ccce3 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -189,13 +189,13 @@ EXPORT_SYMBOL(rproc_va_to_pa); * here the output of the DMA API for the carveouts, which should be more * correct. */ -void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct rproc_mem_entry *carveout; void *ptr = NULL; if (rproc->ops->da_to_va) { - ptr = rproc->ops->da_to_va(rproc, da, len); + ptr = rproc->ops->da_to_va(rproc, da, len, is_iomem); if (ptr) goto out; } @@ -217,6 +217,9 @@ void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) ptr = carveout->va + offset; + if (is_iomem) + *is_iomem = carveout->is_iomem; + break; } diff --git a/drivers/remoteproc/remoteproc_coredump.c b/drivers/remoteproc/remoteproc_coredump.c index 81ec154a6a5e..aee657cc08c6 100644 --- a/drivers/remoteproc/remoteproc_coredump.c +++ b/drivers/remoteproc/remoteproc_coredump.c @@ -153,18 +153,22 @@ static void rproc_copy_segment(struct rproc *rproc, void *dest, size_t offset, size_t size) { void *ptr; + bool is_iomem; if (segment->dump) { segment->dump(rproc, segment, dest, offset, size); } else { - ptr = rproc_da_to_va(rproc, segment->da + offset, size); + ptr = rproc_da_to_va(rproc, segment->da + offset, size, &is_iomem); if (!ptr) { dev_err(&rproc->dev, "invalid copy request for segment %pad with offset %zu and size %zu)\n", &segment->da, offset, size); memset(dest, 0xff, size); } else { - memcpy(dest, ptr, size); + if (is_iomem) + memcpy_fromio(dest, ptr, size); + else + memcpy(dest, ptr, size); } } } diff --git a/drivers/remoteproc/remoteproc_debugfs.c b/drivers/remoteproc/remoteproc_debugfs.c index 7e5845376e9f..b5a1e3b697d9 100644 --- a/drivers/remoteproc/remoteproc_debugfs.c +++ b/drivers/remoteproc/remoteproc_debugfs.c @@ -132,7 +132,7 @@ static ssize_t rproc_trace_read(struct file *filp, char __user *userbuf, char buf[100]; int len; - va = rproc_da_to_va(data->rproc, trace->da, trace->len); + va = rproc_da_to_va(data->rproc, trace->da, trace->len, NULL); if (!va) { len = scnprintf(buf, sizeof(buf), "Trace %s not available\n", diff --git a/drivers/remoteproc/remoteproc_elf_loader.c b/drivers/remoteproc/remoteproc_elf_loader.c index df68d87752e4..11423588965a 100644 --- a/drivers/remoteproc/remoteproc_elf_loader.c +++ b/drivers/remoteproc/remoteproc_elf_loader.c @@ -175,6 +175,7 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) u64 offset = elf_phdr_get_p_offset(class, phdr); u32 type = elf_phdr_get_p_type(class, phdr); void *ptr; + bool is_iomem; if (type != PT_LOAD) continue; @@ -204,7 +205,7 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) } /* grab the kernel address for this device address */ - ptr = rproc_da_to_va(rproc, da, memsz); + ptr = rproc_da_to_va(rproc, da, memsz, &is_iomem); if (!ptr) { dev_err(dev, "bad phdr da 0x%llx mem 0x%llx\n", da, memsz); @@ -213,8 +214,12 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) } /* put the segment where the remote processor expects it */ - if (filesz) - memcpy(ptr, elf_data + offset, filesz); + if (filesz) { + if (is_iomem) + memcpy_fromio(ptr, (void __iomem *)(elf_data + offset), filesz); + else + memcpy(ptr, elf_data + offset, filesz); + } /* * Zero out remaining memory for this segment. @@ -223,8 +228,12 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) * did this for us. albeit harmless, we may consider removing * this. */ - if (memsz > filesz) - memset(ptr + filesz, 0, memsz - filesz); + if (memsz > filesz) { + if (is_iomem) + memset_io((void __iomem *)(ptr + filesz), 0, memsz - filesz); + else + memset(ptr + filesz, 0, memsz - filesz); + } } return ret; @@ -377,6 +386,6 @@ struct resource_table *rproc_elf_find_loaded_rsc_table(struct rproc *rproc, return NULL; } - return rproc_da_to_va(rproc, sh_addr, sh_size); + return rproc_da_to_va(rproc, sh_addr, sh_size, NULL); } EXPORT_SYMBOL(rproc_elf_find_loaded_rsc_table); diff --git a/drivers/remoteproc/remoteproc_internal.h b/drivers/remoteproc/remoteproc_internal.h index c34002888d2c..9ea37aa687d2 100644 --- a/drivers/remoteproc/remoteproc_internal.h +++ b/drivers/remoteproc/remoteproc_internal.h @@ -84,7 +84,7 @@ static inline void rproc_char_device_remove(struct rproc *rproc) void rproc_free_vring(struct rproc_vring *rvring); int rproc_alloc_vring(struct rproc_vdev *rvdev, int i); -void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len); +void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem); phys_addr_t rproc_va_to_pa(void *cpu_addr); int rproc_trigger_recovery(struct rproc *rproc); diff --git a/drivers/remoteproc/st_slim_rproc.c b/drivers/remoteproc/st_slim_rproc.c index 09bcb4d8b9e0..22096adc1ad3 100644 --- a/drivers/remoteproc/st_slim_rproc.c +++ b/drivers/remoteproc/st_slim_rproc.c @@ -174,7 +174,7 @@ static int slim_rproc_stop(struct rproc *rproc) return 0; } -static void *slim_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *slim_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct st_slim_rproc *slim_rproc = rproc->priv; void *va = NULL; diff --git a/drivers/remoteproc/ti_k3_dsp_remoteproc.c b/drivers/remoteproc/ti_k3_dsp_remoteproc.c index 863c0214e0a8..fd4eb67a6681 100644 --- a/drivers/remoteproc/ti_k3_dsp_remoteproc.c +++ b/drivers/remoteproc/ti_k3_dsp_remoteproc.c @@ -354,7 +354,7 @@ static int k3_dsp_rproc_stop(struct rproc *rproc) * can be used either by the remoteproc core for loading (when using kernel * remoteproc loader), or by any rpmsg bus drivers. */ -static void *k3_dsp_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *k3_dsp_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct k3_dsp_rproc *kproc = rproc->priv; void __iomem *va = NULL; diff --git a/drivers/remoteproc/ti_k3_r5_remoteproc.c b/drivers/remoteproc/ti_k3_r5_remoteproc.c index 62b5a4c29456..5cf8d030a1f0 100644 --- a/drivers/remoteproc/ti_k3_r5_remoteproc.c +++ b/drivers/remoteproc/ti_k3_r5_remoteproc.c @@ -590,7 +590,7 @@ static int k3_r5_rproc_stop(struct rproc *rproc) * present in a DSP or IPU device). The translated addresses can be used * either by the remoteproc core for loading, or by any rpmsg bus drivers. */ -static void *k3_r5_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *k3_r5_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct k3_r5_rproc *kproc = rproc->priv; struct k3_r5_core *core = kproc->core; diff --git a/drivers/remoteproc/wkup_m3_rproc.c b/drivers/remoteproc/wkup_m3_rproc.c index 92d387dfc03b..484f7605823e 100644 --- a/drivers/remoteproc/wkup_m3_rproc.c +++ b/drivers/remoteproc/wkup_m3_rproc.c @@ -89,7 +89,7 @@ static int wkup_m3_rproc_stop(struct rproc *rproc) return error; } -static void *wkup_m3_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *wkup_m3_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct wkup_m3_rproc *wkupm3 = rproc->priv; void *va = NULL; diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index a5f6d2d9cde2..1b7d56c7a453 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -386,7 +386,7 @@ struct rproc_ops { int (*stop)(struct rproc *rproc); int (*attach)(struct rproc *rproc); void (*kick)(struct rproc *rproc, int vqid); - void * (*da_to_va)(struct rproc *rproc, u64 da, size_t len); + void * (*da_to_va)(struct rproc *rproc, u64 da, size_t len, bool *is_iomem); int (*parse_fw)(struct rproc *rproc, const struct firmware *fw); int (*handle_rsc)(struct rproc *rproc, u32 rsc_type, void *rsc, int offset, int avail); From patchwork Thu Jan 21 01:03:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 367780 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp102031jam; Wed, 20 Jan 2021 17:19:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJx+wmXabLkKVbiVgpHuRlBy+lxUPjN12d7qKWINqVT6aoP2LbrCbKxiPI9yoYjsH4225Dll X-Received: by 2002:aa7:c804:: with SMTP id a4mr6742365edt.297.1611191956945; Wed, 20 Jan 2021 17:19:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611191956; cv=pass; d=google.com; s=arc-20160816; b=PklLR7VkHg2hKPTZ24/Wfxalyn24k5XKHXUZN3hCh7aRsrSy5pNiRAIs2Rlk3Epcg3 3w7XWjO+2tPJ4/+EDiDlidJcLFYySUuFmh0LgjXeS9m4Y9JFfNfZ662RNjbZXeq/jc06 r/0bhtfPc+aOjyh+42JjTLlP4Q5Id9jZzsHMx/4d8UMtbaJBrJ51t+U6s6NMJW518CR0 VifU85Y+pej0H0KhfxTRQ8AJaaoAQIMuNGcTanWenu8JjnWbkMczlbjJQKJvt4pWXWyr Py6s+MnThGLq27G+SCIKp6phKXADcz1yWVqfixAZ4BDvsUk7cMhAgbOt5vaQWEgieEdM I/tQ== 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=XJxrdlT8+OTygEs/swp/bhTTRjULeT1DvjELEua7HdU=; b=oXG7vyEHKgYr0kkU2vp5ykENhVt/UugWRaP/5DTfzRYjS5po8hpAxRs0QR8QZ7hgM3 drop4qJoIczpVGmHSpBKyYr+fazIuJlrQCNTIfOilXwZFOtINY6lc5SxjAfwSSvGlRIc RvSLG/wZ2wEIujXxtusPKxpWN2zO6JnIDhhQ8K+QiR0bmWJJCceBIASO+arprpqNP33s NWQWKrwrLZCkL56sq96d6/pYe3JeRWSnGqzN0olb5Mbo1dpeREDsPzSHmwy4Y35tuVpH xG83WY5CrvdIW/M1NK+GDW9QYSFn0XoG5Ull8A4k5TLTQyHFo/auIcA19p/Vx47Z6U9e drQQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=sDnnSs76; 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 m1si1205693eja.95.2021.01.20.17.19.16; Wed, 20 Jan 2021 17:19:16 -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=sDnnSs76; 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 S1732597AbhAUBRf (ORCPT + 6 others); Wed, 20 Jan 2021 20:17:35 -0500 Received: from mail-vi1eur05on2042.outbound.protection.outlook.com ([40.107.21.42]:16097 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732475AbhAUBPy (ORCPT ); Wed, 20 Jan 2021 20:15:54 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RKBf2iby7JRI8X6EDDD2UtPdrnzFy8w5c45Q3xZuNbadat85Xw7x9ye1KgvX3aLUaUea5CcP3pGnOUThULPiRxJ/NomTdBYFfJiRN+bu16PhR3W5bPVawF6G7Lg4jBPD3i1wjfZiNbZVQvIEgLuSawzB2qgA7ap+wO8uwSXqdGSiBhzkHVBgQhzZgszr3vpBmbbTSG6lsa46q+94aAhv5iXj6Gjt3oXz9xtg0k+iDYB1eI3UNT90/OSzGxKH9aCJmDRGFzFn/N3T/2Z3lUx6vx3+A/eYoWOys+4WFXnErI+xKFOqzdzb665yicDsXOnUaZu7IsrzP9JqGfRSQOFr/A== 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=XJxrdlT8+OTygEs/swp/bhTTRjULeT1DvjELEua7HdU=; b=J9uYCzKjU25nIZoMFMAHbnsG/ghSdIjeRXekvwuwMWmxAyQDQWr4aIkUEMwhbwvCQyeJ+xY+II5c/8UDs5WwPltWdwvEZ+Wo+A8muz9TKt6NiyFkCRMJO8RzbluBBJ+dxNi5Ln4uCXYY2DzONHxKqsfSr0b57pzUrbfELogmbncowe0yg4KJFLhzLSj37wmzMoMcgIdl5BDTFHBhkk5jFF58kCvSMtzPj5vd+zUEhK6M1HNF5RGqWBxFfLYHAxhLw4vFFUby09H68vJzPVHD3b5hQtObsOaAB9KBW9IG3zdkSgbPxW6EwkT7v6or34lgVujNlr2wUgCxYaX0RfXxaQ== 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=XJxrdlT8+OTygEs/swp/bhTTRjULeT1DvjELEua7HdU=; b=sDnnSs76esMHBoYC+nLwiXQcS6lMeCepDrnYl+ubU6O4muw+Ab0hkJRKxU9qz8/jBAEje0FlvS4hb/bv0+oVSvJM4sBPaTr7yuuibuuMLJrmVp+s9Vcp+aoJ9M8aOPgrb3dJWDuUwzGGHNGsflTX1TxTcYpNS6sYX6BXzm99b8Q= 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:39 +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:39 +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 05/10] remoteproc: imx_rproc: correct err message Date: Thu, 21 Jan 2021 09:03:30 +0800 Message-Id: <1611191015-22584-6-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> 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:34 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: cda70d68-dd2b-4afb-b5a6-08d8bda9ecb8 X-MS-TrafficTypeDiagnostic: DBBPR04MB7948: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:989; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4yNyVSLxeTad60rHzetOQrLVsZUIttJQv+Ys8cjMHGRRa1s1XpOFE88ZgNuUrgdwB5JfExRLqbjS1ZgAXPBnP9WNi7QTokQmVEWg749bGQzqIl9PL8Gby7/k8j58F777IADllBvuckVcma+7uGVCbldabRUfHt6H0dkATDjfmDCEFteLDGHFsIucGhuYbkEmFoxDBgqdENJSuScJTbVJP3MS+LaWIp3pEjYTeHw/Std9oyjutjk2IIhFJMpTOrkmipaBo06JNpYUYfXBjRwUfkCeXvqFIsDXZwp1ICZTEZ/DMEWv/oTtTOZpyN3eAvTUIMUEr8CbDEXoxvkNuhm/gDadl3qxpmHaxHM+rjhw7ZOjLBNV6ccA/P1FE+WJuuPkVEx6s0xpZntHNPEF2LWt0o574OjfIT2srdMh/rULQhDgDvU15dAHVOrUvBEyNlOV7VtJEzNFJ+WPSoYDQ00TDQ== 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)(15650500001)(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: sfN+kaXE6gqqW+i7YtVHtZN60cHRXlQ9lH5P7tjGiA4m3HA8relUyVE4xAXxPDk2K4IyrxLoNEZ6Ew5D32IkwPZjsp6t1vssMfdN21i84187iUh4cbJOSC3LNDlncaF1qUCERVMaFLZpxXUhH28fNgTqWJlPBjMJWM2SMt7DngaE/PK6jTsCSDuKoOP9gzccLWbYVHVGmV5iDeBfqGhV1ZSScl1n3B2BbIP2/zzvkOaEw5bg32K1u53WLh106vHM0Nmba+Ng/fLYy4gJtPCL0Uat8+k0Gc/Yx0Gl8G0bz+8ZUXwFkqp5RfFJ21/pxTRbWOb8/8bCB7RgJlZnVZJ1B7r5w+0C37XOG5GV6Gwajmo750xgJeaKj83JaunqroeTqYSJb08RdmJ87Hzycn+oAi1lcsCzbH+Vgoxef0nHzxTVlB6JETNpgZAWxaypBpNdxPq/avtzwyY2yY1djBTs760DZTeaIsDSXqeui5IqwrlTE7X9cS9WpC5j7Qxbj154+RYzNJ15nFBbXbo0uzgsnGYBvXrBOJs/u1VBIV19/MZbvV1jcB3Bj1SKlmC1hHLvAdS667I9dz8ETd50ok0ynsaJLoeyCH4Ojn2N5Touu1emVDv3Irk/b7sGMdxjhBhlbfLDG83f5ZSOXaRPC20CKSRYBC6KMJvHOHar0JTbE1/c3tl0t9dZuX1DEcPXV5tpJmxrzJubz8cLet2jl3d8iBwtP5IX980FzIGqhQk3oIfmr3esMoRfXC+Az0Lg9gGlDuaw0q+rvOAtFSSEtDHblEEnOW+NONwqUSpZrI/nv5yfTK4Yyk0vO3XqQ1DAHEuGsg88FLnNl46flQH4wWajwAg53TsVElkuZTWjLz4tDDsWvgm7hgmDpMPNwHX1l+39NYTkyTvMhb6+HHlp3qhMXRU2kuEVTBWPLNGUoybvQjPbwOYa3+PiUk8DpFVdI5mDgkuJpvnKj5ZU7YGQkYMeWLAs+Zs3KVZDklnpzDv0t7VK9Tf4gctKZ1poEZhXiGl8 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cda70d68-dd2b-4afb-b5a6-08d8bda9ecb8 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:39.5584 (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: Db0KniWb+09Ic59mZzhI996qKlOwAN9d6OlVmXD3bX8XDRPZz4OB+aqX7ww+NylpjXJfsxXwkT/tYJJ3GZwsJA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7948 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan It is using devm_ioremap, so not devm_ioremap_resource. Correct the error message and print out sa/size. Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.28.0 diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 6603e00bb6f4..2a093cea4997 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -268,7 +268,7 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, priv->mem[b].cpu_addr = devm_ioremap(&pdev->dev, att->sa, att->size); if (!priv->mem[b].cpu_addr) { - dev_err(dev, "devm_ioremap_resource failed\n"); + dev_err(dev, "failed to remap %#x bytes from %#x\n", att->size, att->sa); return -ENOMEM; } priv->mem[b].sys_addr = att->sa; @@ -298,7 +298,7 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, priv->mem[b].cpu_addr = devm_ioremap_resource(&pdev->dev, &res); if (IS_ERR(priv->mem[b].cpu_addr)) { - dev_err(dev, "devm_ioremap_resource failed\n"); + dev_err(dev, "failed to remap %pr\n", &res); err = PTR_ERR(priv->mem[b].cpu_addr); return err; } From patchwork Thu Jan 21 01:03:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 367782 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp102927jam; Wed, 20 Jan 2021 17:20:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJyaIfM2Wjwf74POaNcHbKIYuE9M0DHbJJ6xeXx1gCYcU6QuzSRzwjeg533nWIXZYSusXHPn X-Received: by 2002:aa7:ce87:: with SMTP id y7mr9298766edv.211.1611192045165; Wed, 20 Jan 2021 17:20:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611192045; cv=pass; d=google.com; s=arc-20160816; b=p5jn3141y6UTdxbA2v06zIPZchYLsBD/Ia5xwRJrAoDBymLG5AS+Kckrm385YqYQtk 32ayqtp8R9DRSi8Er1oVausXhaTk3WMOaJH62yrcsq20NZCVWQxBg+kb74tZ0C9tqJAD Wm64heiB9e37JzHTtrmPcOzvY9N5JP6a98BSazGkZ6woi9mTX4l2d/oJFlenQVfIFWXN NfNALbBas7QfJ/TuFVnEqRamsqBWPtA4c4dAt/g4rENKTUagioQpQWGE5OBZJMkNXyI8 KwfWP/jcSqBo32s+jxHqM0kDFbBxZ3JZNg1mgDJXq12p2WEVdMfVy4s7we4AhskXXW+G 6ioA== 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=iA0hICE0LUUtNofsI2CVKPKYndKRSzNvzapBpmGwt1QZJz1YoT3ELum8y392OMubrI SSWU3EpEXINCfhj1hpCsJj2lvX17T6Q+NR7Ch95yP31wwYMheK+c1Y02eEKHzsG9VfxF u8jE60z6DkIVhtCQNFf8c/dmrxfGfKd6u5NsjMyLgp+xlW/S3z+ZkuxqEnGQUJvnnyV3 rVfuf5XC0JHSnRqGJQh6R9+lkk4MZ8AFbqZOvkAy4fVd+WGt2wx9ZAILdv93LzPO+w/u LKucQHFSvezx11Cv7Tm0Xy6ADprcgbSVQDqzhVyI0M009hhhVMymijJUIdqnNUeTtbxz SgfA== 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 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 f20si1477945edw.54.2021.01.20.17.20.44; Wed, 20 Jan 2021 17:20:45 -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=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 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 S1729738AbhAUBTY (ORCPT + 6 others); Wed, 20 Jan 2021 20:19:24 -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> 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: byFOzOn9G12/AeOw6OtM0gN6SOP1WCjBAuSL2WmhS7uoboo/19sHPtonJP6xFN+fu5lgiNOKq/LnnXKPA8wNtXtHVNg4cAn3hOHKntmiqipc6kD/Fc3mFujUXdm5y0+X/O9Z2c2Pr1AANGkYWSI/RrvSPhmKdsjtjW97WMMDD26dXXCHbLiaLfLdKza3qRAodT2bvRqsS3ApBvRrduLvdVQbrJqHmoWRp2Pd2LMAZXud4xHDfkPptUuldpOJtxh1DYXAcYAD2IwpoMrg0V5FHNZq6WOD2q+afYTiltpcw58YUX8s9ijGRtGf/WeyQXvsPUCelh/zjs/lAHMJYYlg0LEITFaBNmVwt7Pez1L0d5ZFP60wWJWwI/adBpvWfOjRU8WgHd+yw1qOD3Sx22hF1bfUn71a6+iQ8aEla29Lg1n/7Ypavj5KrOJ6KvIJja+eIp6dYQhsgGOesKRfMCiRU9ndCNRXrd/B8h69EyUvlBbRTkDGMWfiwr48TKIS+Wu8/iI+j0W+5QXnUbUsTZolGK/UMGNbRMyuPsyKAshOxpww5QK3Ae/p6w64vHcvjLByyrKlbKaMvFdMQqzEfkHN5LHNSVhDhWYfFZq1QqslFC2TSKU9cCYlA+VB713Ou10R/IDvm3vjeO87OIjMuDS1a1KY/Fj4ruLkexw2cU3686t9AtlNwe0Zbk+PHj/ycx7ficreHV6RyyozGenh6qyHewXgMBb04QCwPQugi1wlUtwT+Y9HhUqjTDHAbfH9EU0yAHTAsypdWobttJTgoBDvSCOkFvPk1Wpd0zgIsu0+anGeCH0alTbL2vAV8aGG6Veu50seed1qVTgBK1fXqnKv4DS95yUsv7i/Vu0BT7JHsPVqyx89Xuqs4rx8YTTownYyzLwxRb/gTIy/8NArOoL/lq5tuTnLf83JTi+Z9/MYpCSnXra6StR0avZlV0lbVm74NzwCdLcRIvvpGybdmUqDdy1XlxBr/kiy9TMrycLhVW5lutYFhgm9TJUgsf9EQPo+ 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: 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); From patchwork Thu Jan 21 01:03:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 367785 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp105464jam; Wed, 20 Jan 2021 17:25:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJwXgiwgdIwTSx+Zx9y3i14chNbSzoreuXOWRjD2q2tceZEjCn2AX3V8FyXqRyRttkZX5icb X-Received: by 2002:a17:906:94d3:: with SMTP id d19mr7322347ejy.383.1611192301909; Wed, 20 Jan 2021 17:25:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611192301; cv=pass; d=google.com; s=arc-20160816; b=rEE5pqdzUg6AsS8DMQHt4hkRVOaXQNegAs+xrZaUzvlItq3mHX5dnePoVtLxJOEIUx OA3f0SH/b4WHJThYNzQzh09k3MvIWt46j/66ZV6Yb7l77dzfZJdrmzyDZAJc6DhjW+nd 9+S6gC7axvaFqj9mR7x3LPNpw8hnCG3hxVM+wqBYW2dELrSwGrd2UjlBiiH1E8GVvtlm PikrzviWlJ7wGLfUA4kMAF4NEygeqpfygtOcoIynClTGB2B0VdUXsA8k+lRK5aP5XTFF TT1/e9Oqdh12Ccx1OaLpklYsYCyKyPK9rKYoPumJuGvcvaj3eF/vaRU8Fda3mtfRethq zhDg== 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=sPFDy9u0V0n4kcoaeuDH3f4yuir3vLJ07Nxch5aSlRA=; b=jfp2voQ76iK5So+VCvrzDwwuJN8RDS2YpQKGuhkdW/ChQ+tHo0uQVOhKzSus6tsxZN yOV/zAQxmokPMpGMvuAj84XQZOwufiLgrfqRr+xZI+oQxVQw0Whu5TGMIQnDBWoST2ki 7xwIox+zmGLPvbrW7FKLVQYLV8upkTu6Jhx2qe+oN8MxTvrEDSPncFGnbc0wiV7UNVkD T+6qZP2uGV6gyQvC9FNed75+hnvAiLhixoNN5ZmRTAnmDLnpgJjKk3YpLhWkZzlUhRVk Z80zst2cZ7Tkt4YE73/Rg1dQZ16J3Zo5LQ0sh7nu8pClt6WJSiZLeU1rmvbLVcIQH7+x AdYw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=USnf2eVz; 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 f7si845020edd.595.2021.01.20.17.25.01; Wed, 20 Jan 2021 17:25:01 -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=USnf2eVz; 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 S1733103AbhAUBTc (ORCPT + 6 others); Wed, 20 Jan 2021 20:19:32 -0500 Received: from mail-vi1eur05on2053.outbound.protection.outlook.com ([40.107.21.53]:30528 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2391700AbhAUBQy (ORCPT ); Wed, 20 Jan 2021 20:16:54 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WhNGYgUE6yKFjlt5SQ+ybUOqyAAg3HKNJtO7LZCdlADXxxl+YAGD2qkOLPnXtjqNTKZvKgRbFgWriVHfA3d0kybEv6SjUQ767idzdui0dTkYPVgIvpK945G0iD4nFInQLDov8k1IcSRSquDFzk45Z4k18csV1MTaQGtbWU/p14Xsf3h5sYmhJUsXo+0u2IsXxroeit5/PdDQWvZyK85khwjfhTk95KKjR1PyqrhAiD4BLI9AR/nd3wrs3gpRRaaypajOR9Zi/IS2xUO9+oO7gf4koUUIZzO5XK1ouRXV9VpNHGSRV/YvdppHUHOtlYDzDr0Pgxt8f0JwLMvz8Ed02A== 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=sPFDy9u0V0n4kcoaeuDH3f4yuir3vLJ07Nxch5aSlRA=; b=VI4TnN0taJeVDxWKvrGtO6qgF4QMGn00rAqGT7YjyxWyJd+RF1ZAvSVSTQHhFteBsB5BEQ0PZH4sQWgDYXJEghjpirZBE2PTOvhfwP3Ajo0nRW6b5I53H8ZkWtoAMRDiofN+Lt0JzBco84po7wpNVwneUtGTGFwT+M22GNJMce3Dsr8vypZj8DzB2wqSs+06SG+gL7slBCHijrkCZ5aY/9zQCFz1Wx3QyeaKrOa3LJ40RzZORAy7Z/IH+JgGGi7lKYMY+OHYx1vOhnxmxAPqA1QNSFtWHffzYKPmrC/51AaTh+UjdxKPbWbyRLX/Jpzu0NyWysYCeMwJF/o9SkVrRg== 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=sPFDy9u0V0n4kcoaeuDH3f4yuir3vLJ07Nxch5aSlRA=; b=USnf2eVz/cQMOIcp+YP/o8h48knJhEg3mlLpgQ86AgCQHp4riNm5DQzi0xePbJh0BBMqZe7nEAx4DuTsBowqTrBVQOiP+rKMmrHHE4kl1pAnLXt6iwojDHrG5Hj3p3Ej6zzEJssOMW9mcNsPsv9MKguemdKQsEwyWuldA+LFomo= 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:51 +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:51 +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 07/10] remoteproc: imx_rproc: add i.MX specific parse fw hook Date: Thu, 21 Jan 2021 09:03:32 +0800 Message-Id: <1611191015-22584-8-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> 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:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c98ed1a6-b0c9-4996-46e4-08d8bda9f3c0 X-MS-TrafficTypeDiagnostic: DBBPR04MB7948: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3276; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ozKuZvdUoyR5qiIlm4Qy+Jk9kMqrDpIfnUhgHZoRW1fKcVSsXlUFdasoY5HSBOdu9u4LjeDI9CBZjS6L8sAf96VeiRtbvEofyPq5aIIZaIBaEz2ed8FC8UR59H6jATWgcNNoOqdf7o0j/dpvwb0Thjz0izVRgCmssmUzbq2pJPnntN3fHyi8NpEBdVki3vyZgIoLV/2DqP+92ezqc3xvhkF7k8ScSnxe3jg+tIwRtVuxc2u4pSe5F+vGX0TK12CFXBw2fXR8ndGwbvvS2LGDWWgMBbTDsudWLrURTT8ltfx/8PXU5d4FhHctLRCC3PfHzdvoDxcBLHo4B3HaBTDlgoPWKLJvbYW5JtRFk/6YQrhpi//875j4uh3tJEmqzoRmciVJTBwzSXHHlh0B2cKtb4Y6zItiSlDQ+BN5e9pwTZv1zt3rmxRlO04RDyGL3WG2Tlyi++S/+utQ2YbxFxI0lw== 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: KMYh/pyh8LCIOgLD60QCWa9pE9YbXfwS+jf7NML99o2NC09jjnvFpOxb6I4FdXtFgoUeV+l7+zpi60hdIMMvF3ai7Sw2/OHQxinE4zhpO9OZ11Bzk151DUbCb/zOJfyvfLRpuGDkHqcuHuiuqvYoON6f2wJisCxOrhRsByt/hxit0eUQqOfJE16WB/0ikfjR0hn0OxXSEspkpISFSmP6PbcNtnJzhVNDRIFtIWWDS3LKUR45uTbUgHg8GiFl/viYKIZRdFW485zUVen0sIodsSY6++wKQS47zr568paUbdSLxh9dabwM/xIVg+79RCP0PK/5umVbqYPpHcH/FHUAVUZ2waOEOza5jl1HzxKbFrxbEPGAYUHtIOWObvCZPV8liJUEyvxjfiSTzouhKFv0ZTLkminzVMafor0hcQqAmcsDt/OVuq5oEZLh0BydHnymiigm3OyXGbGHc3lN8+61dz1/zcL3y3/1oP/fKurMfsGAM/6keF72+fysX05aJiWoe/IBW5txIHHPKKWAFeI7U8XlV00hWVZCmSb04RPcw5pOELy8xZVmSEhKMIgUoY2fLxGvLHYHbs38l6ISbawynjp56S2qpuM1DqvnUAouvDxNe92zYvEpvam3q+KNAjV86jSfZMj/lW5dFYxq6HFZp2Z96R2GPp02thEF6N/OcktD3L9EsuEHbDW3FcnJfz3TJ+/6GyWAc/eG39cA2ooLoYySafW8UO8XvnnxS3ncg0rkOX9pLvHDeYuN4dINTZFs9yMW+Nx80yply/W4guWcWbS3idL4D/yBORj+obJVTCDXIaMnHB3m/Xs9UfQUGfKJd/JFnYpdTBHBUzJ7SB/s0HgEm8xSmAaVFpFVbJuiPGthj8wuFWV0Qvja6zavZpZamguBIVx1UrUAYbZ9rkTp1EJmbKaxSp6x3LfP6VzDvBvh421BdxOPyyDCYp3joA+HB1RxsowTAeZwLtQBeV6snaApowpgn+t0btrd1poS+vopXQbya1GjUS7j6gBPmH4e X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c98ed1a6-b0c9-4996-46e4-08d8bda9f3c0 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:51.1571 (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: OvsV+FQ2QzOF7wG8qLnIUYkaQtB35yuPQBTWufNUeUX2lUfYYPRz4qjA4YkYYrmeIgjIJkXemEI7MzjopZCrzw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7948 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan The hook is used to parse memory-regions and load resource table from the address the remote processor published. Reviewed-by: Richard Zhu Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 93 ++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) -- 2.28.0 diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 47fc1d06be6a..5ae1f5209548 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -241,10 +242,102 @@ static void *imx_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *i return va; } +static int imx_rproc_mem_alloc(struct rproc *rproc, + struct rproc_mem_entry *mem) +{ + struct device *dev = rproc->dev.parent; + void *va; + + dev_dbg(dev, "map memory: %p+%zx\n", &mem->dma, mem->len); + va = ioremap_wc(mem->dma, mem->len); + if (IS_ERR_OR_NULL(va)) { + dev_err(dev, "Unable to map memory region: %p+%zx\n", + &mem->dma, mem->len); + return -ENOMEM; + } + + /* Update memory entry va */ + mem->va = va; + + return 0; +} + +static int imx_rproc_mem_release(struct rproc *rproc, + struct rproc_mem_entry *mem) +{ + dev_dbg(rproc->dev.parent, "unmap memory: %pa\n", &mem->dma); + iounmap(mem->va); + + return 0; +} + +static int imx_rproc_parse_memory_regions(struct rproc *rproc) +{ + struct imx_rproc *priv = rproc->priv; + struct device_node *np = priv->dev->of_node; + struct of_phandle_iterator it; + struct rproc_mem_entry *mem; + struct reserved_mem *rmem; + u32 da; + + /* Register associated reserved memory regions */ + of_phandle_iterator_init(&it, np, "memory-region", NULL, 0); + while (of_phandle_iterator_next(&it) == 0) { + /* + * Ignore the first memory region which will be used vdev buffer. + * No need to do extra handlings, rproc_add_virtio_dev will handle it. + */ + if (!strcmp(it.node->name, "vdev0buffer")) + continue; + + rmem = of_reserved_mem_lookup(it.node); + if (!rmem) { + dev_err(priv->dev, "unable to acquire memory-region\n"); + return -EINVAL; + } + + /* No need to translate pa to da, i.MX use same map */ + da = rmem->base; + + /* Register memory region */ + mem = rproc_mem_entry_init(priv->dev, NULL, (dma_addr_t)rmem->base, rmem->size, da, + imx_rproc_mem_alloc, imx_rproc_mem_release, + it.node->name); + + if (mem) + rproc_coredump_add_segment(rproc, da, rmem->size); + else + return -ENOMEM; + + rproc_add_carveout(rproc, mem); + } + + return 0; +} + +static int imx_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw) +{ + int ret = imx_rproc_parse_memory_regions(rproc); + + if (ret) + return ret; + + ret = rproc_elf_load_rsc_table(rproc, fw); + if (ret) + dev_info(&rproc->dev, "No resource table in elf\n"); + + return 0; +} + static const struct rproc_ops imx_rproc_ops = { .start = imx_rproc_start, .stop = imx_rproc_stop, .da_to_va = imx_rproc_da_to_va, + .load = rproc_elf_load_segments, + .parse_fw = imx_rproc_parse_fw, + .find_loaded_rsc_table = rproc_elf_find_loaded_rsc_table, + .sanity_check = rproc_elf_sanity_check, + .get_boot_addr = rproc_elf_get_boot_addr, }; static int imx_rproc_addr_init(struct imx_rproc *priv, From patchwork Thu Jan 21 01:03:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 367786 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp132368jam; Wed, 20 Jan 2021 18:10:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJzGIFVPHk2I2nWyTY8lCPCj3P/f1q6rRmcDoQfYw9lLpXM3wRcRfL0AZfEsHZU4ACBRBOue X-Received: by 2002:a17:907:3e02:: with SMTP id hp2mr7546838ejc.411.1611195008244; Wed, 20 Jan 2021 18:10:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611195008; cv=pass; d=google.com; s=arc-20160816; b=bOGqO6ys3PoEwR5ucjN6FOZ8702Da04CAZCxjnYuP8bKx4s0T+oDeFIYc8NaVoxNSZ 8KfOrHGAhP/ihsp9ql5VQNX59oaWTR09L8Q9w9NRAHBtFQ6ZC7cEYabSBC1PJ0u0KPqn oNo8l6vYXNofnjyFMhUkRrHjIssAUfrjiZXQ6y/5sFzGYipk+AiSMI+4yH10GBphtQd0 p2zG67OixPtFfiV79c8hcqRLVn1CKPPMZYcvNe8Sfw4hZXk+5QNuij/EXdHIB5CmYvdj lTqPDhOPENptrV1PiBAIDb7W9DGxpsQ2tx/G9WsEkC5PX1w2+ZgJAp2Gxrl5gbqBM9zq hm3Q== 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=/EMRt+7Vmm+PEYZgd0CpWpVOf1tt9M0R4iS+C7cKihw=; b=y24h+x8sp2M9PL7yPUNM3HvURk/t6bamXOeiwiyGYLiTwHpVyCSHjbQ7UHWYhnOGbv ToBOHubQqe07Zs0PiwMNPVvfn5TeYmkSDSVvNvp4XDQxO76BvCNWloIOlwp9hwSNIcF/ aq3GgjPwFK2/J5kdesb1kSTTqWRAxtH6dTzIIqme16zSo6mIJJBKreziHuo/c0hcpyHS EOx+/SaB3MK+xdScaDhHQ57x/N4kErovXjC1gP6d9vw5cYanOhCkmmB4Bt0qXmAgXH4g xzz+qVnONYwwwZMK/G1yK2q7XhSErS6kj2HL1bMIUWFlSqs3y881NDnMg18Nx6hWlEXm c3Dg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=OPDA1Lu3; 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 f7si845020edd.595.2021.01.20.18.10.07; Wed, 20 Jan 2021 18:10:08 -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=OPDA1Lu3; 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 S1729581AbhAUBoL (ORCPT + 6 others); Wed, 20 Jan 2021 20:44:11 -0500 Received: from mail-vi1eur05on2053.outbound.protection.outlook.com ([40.107.21.53]:14177 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2392031AbhAUBRY (ORCPT ); Wed, 20 Jan 2021 20:17:24 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QF9Hy5kcLmIwhdYdFCyiIVcJ6f+lGaYhrom3ez7cqEve4ep9uUeHEU0GK8RkTg5miEjTRHJVh3ll+eMZeVDnIK0sqI9KsXR3ZcZvQb5E3je/3CNGH4Jx+5ySUQQMyQlXoUyTWjcKcTf5PE6PYhybcD7opVVAVScqnS3+kal5rEGQz4YAAAVeiWcVc/ds8qdM1UKL643LBTynXl5p3Wslc2GTdO3nhDFx0aizjHk7ntfZUfIpTQHRUpD7VzlsueJbH5yD1QFmnPY3+ojKrkKc0kwPejY6hIbREn+ZT+Q7hUdmjDDJG9Fbl2xJ/Ji49G9HMRutvM2xS44LKduOFryXeA== 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=/EMRt+7Vmm+PEYZgd0CpWpVOf1tt9M0R4iS+C7cKihw=; b=X/Y0eSWgGonGxntKQ5uRCXI1D1uogJIqs+w9v1X6sHZH5Cfu9PCy+uDUakyeez8kDLvhNqhH+pMcbq1dVyVlQcUhn4wJ516x4KuE3CNQ2t105l4YzG129OxNRLzr8rXrz57isYL9QJKAecc0PqXpTCdOXCe7WYoiQqaZMYdX+4Jakaz/KNgcsnmoouj9sWlM+uhFRyRbH1ZNv7DKFak0CfJt0LEMVNaS+RY8wQ8Oz9tmOb8b12Gskw9Z7q+FDFGRVt7Jyi4yHZriQrXLM/eqOH0IAHHZtPKV0Jw+w1DikielUN/+/fxPV64X6Ay7NhC6D69naB1D54R80oZitCc1Uw== 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=/EMRt+7Vmm+PEYZgd0CpWpVOf1tt9M0R4iS+C7cKihw=; b=OPDA1Lu3YLnS99bN6cfSN2R+UbGwq48JTyVquOXMF0Ywdnq/K9Wey+CFXLmaunTb8gc/o7XGitQMOfTWVp1waEfffKJfLURRZDNPWgGe7aa2XlPfvL2dp/IigSlmg1QC7jp9wtsc4fD7Op3SSI9JX1MB03hu1xz8ZBQPDXnmS9U= 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:57 +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:56 +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 08/10] remoteproc: imx_rproc: support i.MX8MQ/M Date: Thu, 21 Jan 2021 09:03:33 +0800 Message-Id: <1611191015-22584-9-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> 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:51 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 88895b26-4e4a-47ab-6e23-08d8bda9f722 X-MS-TrafficTypeDiagnostic: DBBPR04MB7948: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:158; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bCuYMllAcKvtDwK0yguKbHF79ZYLM84vXAUAWHV5VqBBOwOhH3lKhOJ5ihr5LzDsEgY03gD4UZcsyvbMtDFT2U4rzPl+gLjON0WHcuRnz9ryTwTYBvq31hDZflZ0fqieLo5XM/5Qmd7N9y0Aea2wePCRtZZ4s1cmbIanPYyxSRVWAKKo9RkWjyJuno4tDFfbrKLN22sp/oiz/ncw0g15uPHKrC643UCjRb2S4iw/v8eFArBx5FGXYsQc3wCcxmFMQV4Fmb2vzOp0J7FJqW1Zz2mABTVba64BpGACNg87uczdEgu2/4hFqf5DIRVlZw5HGd78oDISe1tG1EPv7BtG2zHGxCmAx6cAUj4HuTp0RTB+cg6veGsYCCoi4976V6UWTKOG/bQXACh2TKMBb4xjhklIldBu50GAombkP/sG/8dX7cvf0I5/zBbeHf2pMOuz6nAl7S5dIBNjGCL+5EH48g== 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: z54onQsVZ8k4cy6NiQOrPXSs41SgXh0PVpA+Q0xO//MCrWf4ddDhBCPoRq0kb7HrkPitS3KiNYxUK2LJONeARN1qtez8bxW82VRk5JCh88SbcY7P8VX8HR71OzY43isDBoFwwPtd1ZeFIFODrXORR5yy3sYPy8F/lNM8TE0/5eKPS3TCxpjXiuJDgi9xQnTNt6ry2UWmzJX0GBH3902c0vwlkLKpez3b5ozOtaLDAaJdD0EIN2axZyMFI9DwnBNioEgwwPD8wXTSCx19rXuhlSp+vhatcPvV8dbUXjCvVHlafbZXTstBOJA1Nx5BCs/WEFNFohf/65/HGm0dKn9p5ZvPN27i1Wg3sF/y1dcMX6G7irpNuLuojAL7RhX5OEK5S5nwU9LVFc9KpMU31Qnwan0zvJ1JqOzQHUawO4z6zik1qgw5siqSpbmXdfvOpmSu8yZB9agxUOK9Me5y7pL93oninCca5ST+P0AzFK3+J99OBueYuf4+eWoLkLuFh0wJV3HSHKP2nQCf/pURg0owBw1w8b1D/Q14x5VnNRKSgzLXQC+XyddC03wOf73j3bn97iZv8AKH0huZGEtcDU5ndDVzw1kAqkhkv6b1n+g2Yahp4yAXITESQ9hCAl0Jh4b9XwHXGhlQDqHnqxPUbk0k4OCO3AndzSNft5CYBZN5bs073Beef4waig4gGIMhxpbzlE9GIZN1DfleaxppLftUMvyoD9qdHQH+/BFZbrFV8zqiuoPT27FsST05EAa6LQwRTqCjkC6r7pK5wt7ZdCuZ4RF7Q01twXUSWl0yFkHh94FS7trn4Rl9HOcLkmjUzIFQ0nPILOCHwIPS2gm2/0UN9YMcRp8/6bRuqiCRfA4ogdjTbCGeWLVOikW8WFnAbRUfftBDtLqeeG1ghdKL2GT80vaNyCa/J8r6PE+LKGevBlANd+AQuoTXhntGCAFsc+6Be1nEKTaLcjr5Kvr4hApVaOq49LQuUS3DfVHrT9eKhDfyLKV1pBYiUPff6rZ6mw5s X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 88895b26-4e4a-47ab-6e23-08d8bda9f722 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:56.9245 (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: 7A+Fjx8OrUqgu/AJ3QdJEA5UfN4YQoUYpjqhAeOOA6V6nEqsv7QAH5MCuCU98d0CjV7l8EbXkyKUfMGbzkfW9w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7948 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan Add i.MX8MQ dev/sys addr map and configuration data structure i.MX8MM share i.MX8MQ settings. Reviewed-by: Richard Zhu Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan --- drivers/remoteproc/Kconfig | 6 ++--- drivers/remoteproc/imx_rproc.c | 41 +++++++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 4 deletions(-) -- 2.28.0 diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig index 9e7efe542f69..86d99229e8ab 100644 --- a/drivers/remoteproc/Kconfig +++ b/drivers/remoteproc/Kconfig @@ -24,11 +24,11 @@ config REMOTEPROC_CDEV It's safe to say N if you don't want to use this interface. config IMX_REMOTEPROC - tristate "IMX6/7 remoteproc support" + tristate "i.MX remoteproc support" depends on ARCH_MXC help - Say y here to support iMX's remote processors (Cortex M4 - on iMX7D) via the remote processor framework. + Say y here to support iMX's remote processors via the remote + processor framework. It's safe to say N here. diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 5ae1f5209548..0124ebf69838 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -88,6 +88,34 @@ struct imx_rproc { struct clk *clk; }; +static const struct imx_rproc_att imx_rproc_att_imx8mq[] = { + /* dev addr , sys addr , size , flags */ + /* TCML - alias */ + { 0x00000000, 0x007e0000, 0x00020000, 0 }, + /* OCRAM_S */ + { 0x00180000, 0x00180000, 0x00008000, 0 }, + /* OCRAM */ + { 0x00900000, 0x00900000, 0x00020000, 0 }, + /* OCRAM */ + { 0x00920000, 0x00920000, 0x00020000, 0 }, + /* QSPI Code - alias */ + { 0x08000000, 0x08000000, 0x08000000, 0 }, + /* DDR (Code) - alias */ + { 0x10000000, 0x80000000, 0x0FFE0000, 0 }, + /* TCML */ + { 0x1FFE0000, 0x007E0000, 0x00020000, ATT_OWN }, + /* TCMU */ + { 0x20000000, 0x00800000, 0x00020000, ATT_OWN }, + /* OCRAM_S */ + { 0x20180000, 0x00180000, 0x00008000, ATT_OWN }, + /* OCRAM */ + { 0x20200000, 0x00900000, 0x00020000, ATT_OWN }, + /* OCRAM */ + { 0x20220000, 0x00920000, 0x00020000, ATT_OWN }, + /* DDR (Data) */ + { 0x40000000, 0x40000000, 0x80000000, 0 }, +}; + static const struct imx_rproc_att imx_rproc_att_imx7d[] = { /* dev addr , sys addr , size , flags */ /* OCRAM_S (M4 Boot code) - alias */ @@ -138,6 +166,15 @@ static const struct imx_rproc_att imx_rproc_att_imx6sx[] = { { 0x80000000, 0x80000000, 0x60000000, 0 }, }; +static const struct imx_rproc_dcfg imx_rproc_cfg_imx8mq = { + .src_reg = IMX7D_SRC_SCR, + .src_mask = IMX7D_M4_RST_MASK, + .src_start = IMX7D_M4_START, + .src_stop = IMX7D_M4_STOP, + .att = imx_rproc_att_imx8mq, + .att_size = ARRAY_SIZE(imx_rproc_att_imx8mq), +}; + static const struct imx_rproc_dcfg imx_rproc_cfg_imx7d = { .src_reg = IMX7D_SRC_SCR, .src_mask = IMX7D_M4_RST_MASK, @@ -496,6 +533,8 @@ static int imx_rproc_remove(struct platform_device *pdev) static const struct of_device_id imx_rproc_of_match[] = { { .compatible = "fsl,imx7d-cm4", .data = &imx_rproc_cfg_imx7d }, { .compatible = "fsl,imx6sx-cm4", .data = &imx_rproc_cfg_imx6sx }, + { .compatible = "fsl,imx8mq-cm4", .data = &imx_rproc_cfg_imx8mq }, + { .compatible = "fsl,imx8mm-cm4", .data = &imx_rproc_cfg_imx8mq }, {}, }; MODULE_DEVICE_TABLE(of, imx_rproc_of_match); @@ -512,5 +551,5 @@ static struct platform_driver imx_rproc_driver = { module_platform_driver(imx_rproc_driver); MODULE_LICENSE("GPL v2"); -MODULE_DESCRIPTION("IMX6SX/7D remote processor control driver"); +MODULE_DESCRIPTION("i.MX remote processor control driver"); MODULE_AUTHOR("Oleksij Rempel "); From patchwork Thu Jan 21 01:03:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 367787 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp132851jam; Wed, 20 Jan 2021 18:10:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJzB1PZFc65dsrlPB+7iGOxZDc7UGmkx2M9hi1GrBr1lvyHlLvW6nrOyrJwgB3g2IponSHpP X-Received: by 2002:a17:906:3b11:: with SMTP id g17mr7647484ejf.473.1611195050365; Wed, 20 Jan 2021 18:10:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611195050; cv=pass; d=google.com; s=arc-20160816; b=NUysmsO+9Q7d9NyR97SxzNERbkvJeKtrJYUn4qFcjsYsBnifksO11QcLXdR1WH8DwZ gKtaqt8+XL5g3G4tysfKLgfumzZlrtAAwnt5SMy4lgCrmJbZIXs+sJqHTLMB7I+GnYQz SKxe+FG3uzDpnoAUb1BN5SMJaEhHXhHwhbW3qHextPDArs+vGL8SPSgKkZWr7gF6XP97 g4JqcsSzIHKlz1dxuMfFimA8j5f+USoVz984qABMiIaQ+XsaLyibvziacGyxJtRo2MOJ L7Bez0xt/kEwTCi+yIiopMVqGocvvBlBDeHW/AjZ38Qp9t1ucFT/eJfcoSmjMWi6KOL1 /4hA== 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=rI+IUMb1+JCMowDxbZUaZ3xdAvqxJsUkD8J2FuBMne0=; b=BXTXm/mMDnJS4flhIz37stBTEQy15MShrEB6GlULB5iQMo6+RdeXtrEg8bDXR+Nk0i bPmwipoHnAvvbTZ5sWsWZKuQbGpCO3dkvyeHb2S+7BKlaq3ubhDy6KcM5eo+Sm+V1vq2 aq/KH3YOifQKZKzril1yHRhLFFgvqzS2gGpbyV0nPyv5Ft5r9VcEhVsr2L4z7CzurT1K dRU2g4cR5pV2YXbi64vJGnbXUEs8Katy1Z7R2VYJMXcKYEIYUOMmLE8uzljruRBaClr0 qfhxRHmxrxmkSPKIO+YFefjhb2uEY0wre2ps7tFvSYz0PsHEkuuLLs1SLrJde8jrVNxA i7Cw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=aBmSOGy2; 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 f7si845020edd.595.2021.01.20.18.10.50; Wed, 20 Jan 2021 18:10:50 -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=aBmSOGy2; 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 S1729013AbhAUBnl (ORCPT + 6 others); Wed, 20 Jan 2021 20:43:41 -0500 Received: from mail-eopbgr00081.outbound.protection.outlook.com ([40.107.0.81]:11138 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2391883AbhAUBRO (ORCPT ); Wed, 20 Jan 2021 20:17:14 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IsRonzgyxudGLmBdlL6RSfDkAi57wOvqvIBAaM6ggL9EN1VzkKpzf7gDioLP7V9/vEsOZw+Pc96pv1wY2nqxuRRTIOC3cLJiJPwtgnBR+x/b7LXy1zyaPEq/hslR7DJIKf3sJ3HrOdNA5Wedcot95L24PMUy5FYVt9FjeVRD4oGe37ThMMt7wdpXwql0pBq2Pc9kap4oPcKxgdvXjdDg4Cy/Fzwz7h8I/LNIT30NCkRDVDEed+SZ3+amPsSoOcYvIfgXbUXiKFzCzVPP87LL/j8LO/qUvtgw3RUT/iTyK8Didyk75jDPEfImdrbhWFv+ww55RBl5RX8JnjfpPoukXQ== 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=rI+IUMb1+JCMowDxbZUaZ3xdAvqxJsUkD8J2FuBMne0=; b=kh0rmusw9PnmmG3wSxww6sOymZ21hZFBthLEnDFGjLu4GYv3iFHwrwM/5OlRzQpbJYvs6YATP1HgnPyzlhZETkIgVLkrkW9DRihwjdc5QbhL+XpO1oVjB8iaCzhjsEfk+9AjRspHngIbDgC2X6N9a6dCFU2MQY+9XA+EXsKPbz6oPO++EyJPCW01cJRTCapDCYFWbtDnsHnGrFipYHnX2AmCrf7al9ZtI8+JQJ/IdWDQ3iXSdSY9xNVOKwaFjCdYOigDq8CrNh5hl6sx4spLrfUARsgDumk7AF/4Ylqgh1dx4v5kJNT1OIVUJMr5Njy8pCXsT1rPMMP4R9+f38tvKg== 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=rI+IUMb1+JCMowDxbZUaZ3xdAvqxJsUkD8J2FuBMne0=; b=aBmSOGy2NFoRkAeYF8V8cAjm6feC5NG40vkdTW4yqEV//86OdXpVDhvd9Jpx9dVEXCYPMJiYcfckWtiRV0vaPIJKkVxSl5wsepc8LD4OXRAMk4FosGRDkmczizc+wzQhRdBkKjL4cu2cUF138OSB2A2qwHQ0adepu45Zp8Ji1iU= 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:15:03 +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:15:03 +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 09/10] remoteproc: imx_rproc: ignore mapping vdev regions Date: Thu, 21 Jan 2021 09:03:34 +0800 Message-Id: <1611191015-22584-10-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> 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:57 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 73860709-5ab3-4318-b6f3-08d8bda9faa1 X-MS-TrafficTypeDiagnostic: DBBPR04MB7948: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1247; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BcXWNgaC4F1m3n7WxDumbhBJ/mPIcl/IvpGq78QGjJfeAhxzZVRo1z9/5YK8S2nCvZRi5VVQcJHutY3KYOg1V5+2knF0/e5gCnE7ANxsQFpRyD3DctUOGJK1GDLiqhtR6tSzk31ty7bMIt8kHxbnmNFWTz0QJJNpr8SnMvgFCgjYwYyccfQBuTi95zR8zOXyCLxqwxxWgX0UejhjMFyCslrckRDGY7hfXXyxeCYbBH4vj/iNOUb9MJv9PDJ4QM7kn0ikL6gs3C1luvOlWLhkvDcTugHCbHyMb9XA1Cpiv2Q2Z6acVeVZl4m5EjE7xWTsF5n3ZYJUDp9PmUXsTy60CWDPSmW5AJm9fwcqE3cbbcHCv/IGa/gMMbWai39T2ErS2/44fGqR9NCdQfwa8iyc9M5MHbphywhuimI7VZlLRqlH5PAgXm5hw2+NDWj6ufDGqV4jt7snyI+RLODcQKVWnA== 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)(66946007)(26005)(16526019)(956004)(36756003)(316002)(8936002)(9686003)(6506007)(8676002)(478600001)(6486002)(6512007)(4744005)(86362001)(66556008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 927zAcV8xOlNVcgXY6uO/w93hhf1ChxVSkm/HmYkWuP6dMDNhpb0vZM6fOJN+V5FxOW6Xjsb/m0q0a+Q9xbQSXYhs3b9ui5julv1MLk5V718rSfO47+PADLX83SimagIsuEoC1tZYXddS4HWsslKJs6nWTBlaNFOR4cY2SjyF64Gi8xS7DuZ4AXNhJNXNuBRLSG7av19Jtp1lEvRX2mX/Yr2jKHBfDSU5fWh/OBFQMw5YtDZ+K8a6pkz1zXl2EA+wP3D0PTh/RLB/YbfXPP1jvqPWVhcCWr3nSGMHlULlJHcpwzDNo9vgiW4Z+Rj9gWTuSGeglCT0gML38f9zRW0HDxVV9BE6n9bNpXv/RDtzbpPNqh/h60yOTInV/E8oUSJRXhhkZYnXl+LmBMupdl4hKbdNhB1HNWm+FeHnzoMczayOfS8kgqZkZB1sKiZUAVWLP0GDSWz5awf0Kiqw46V7IwHRbZMNiDXpl4H0IjnpRqHOhbauPo1oA+gfIdJYpk5Cm4jiuTFtNaraSZcDDXQ5fY/FSdrLtVskj8HHHcvtPGsQLZod8QONPXEOARLnFTA6lQLNmEH1aIfRC/bwToBCM8Pwi6Lx7vz3Y9Y+nn5XYGIlzP4Ubi8kfKrrQhJN25hWVbFxqZvtTTQ6eCfe7NlwigNUgduQITHqyIBlCq0YEgx7vqqLgi0E7Ovlv4VVbySM4oVF60bxQEPuI/NRCXJs7l5hZKDDhCZRdy4raViaR8FbK/775Wdx3SB8fCv29LvvV8iOyE37x2IHlvamcpranftNCr82DWhFV18mxR8NpQ34AKTnAxLabGEm2JziDS8SuFLsQtZYQsCvaIAfcqPa9QLCH/qTUP9LBEFkmH0XdyXLpzV/g+mHOxc5vi7GA5fxdt6OGKWiOGPJmnf8T4Z7Mi7rjFDh6qF2mVOIm2PzMbCs5pK4Zzzg/FpJt6MBr4n9OsMQonAA5WariZ5SKw/+CZCF8f+2ORNjvdenQKuQgbCIWruBUdFwqV9IWf/kG3S X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 73860709-5ab3-4318-b6f3-08d8bda9faa1 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:15:02.9987 (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: 3IogGmJDU/06inWtkPKWj6Yli2awb4aR70SCdBxC+VScFSm3ngWi01TmeIbhVcLIRLOJ3NI0UMMy//XFXZLAYA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7948 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan vdev regions are vdev0vring0, vdev0vring1, vdevbuffer and similar. They are handled by remoteproc common code, no need to map in imx rproc driver. Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier --- drivers/remoteproc/imx_rproc.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.28.0 diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 0124ebf69838..3685bbd135b0 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -417,6 +417,9 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, struct resource res; node = of_parse_phandle(np, "memory-region", a); + /* Not map vdev region */ + if (!strcmp(node->name, "vdev")) + continue; err = of_address_to_resource(node, 0, &res); if (err) { dev_err(dev, "unable to resolve memory region\n"); From patchwork Thu Jan 21 01:03:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 367783 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp102932jam; Wed, 20 Jan 2021 17:20:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJziNIFB9wg6yXTzetN96OhTTr2xI/4JMk+GqzzIoKaBJvKqDzEzMm9zqB3YiwBmCzmVg86x X-Received: by 2002:a17:906:6a92:: with SMTP id p18mr7312750ejr.308.1611192045551; Wed, 20 Jan 2021 17:20:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611192045; cv=pass; d=google.com; s=arc-20160816; b=HEZpJMlqpNHbj4bQGHUS+4M1cqIGeNoKvFkxPfnIm1jR0ZVZJl/k9/xf5tuIF5kNZK jdqckqA5zqBAF8W/KKlMKlYyQcLeUGJ1VZJkB2q1kGPKgGrX7ZoufFVDuxTbIkeYWSTs oBKcRen7PQxdb/mmBouh3Ki/whKGh0PBw932TO2scH4snUzc9R211nx8PoD+IQfry56A AAO8IukHR5bCj6UWKxOXwXBFIVd4TKHQ7B8AM+WZmonGKOLr6l6YAlvvepIKfNkUO2io sgB6/7tXPh1HaXNTLeyEg3lcKuvzzJe5z0xCmr9TPi1UGTZ7be9jFAsPNDc6HG4TgNhb 1K7A== 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=w8prA6N0tCRFNc7f90wFWxXTMw+oe1yZsZ2xi0+JrHI=; b=s4M/SMWo48UlUP9Kdi/8GO6YV2iy0Ty2J7O+dsrngblLfRCke7e2nfeor7puQmAOwk +x9dcvTy7vieoLChXO96dQ9Kd1nD0+xeX+KqS7NbgltQW+9G75eFPqTQD/ol6brOIUyF NIkSD5ItYHqaDy8cuKBvZLCrLjLA/M7hkNzumNX0dlaMdrgC0al1JFIXzebJBwccds6D bCI2n5ja6LCP/26BHha76OCt08C8/ziQXZz2xxK/hMWiY75KUT+D7+TKjfey50QYZ1+z LOzkXKg3UK4rHnGDae7Dp6X/ail4+ZIeKGaPMXv7YZ30qanGUGGqpWNOa76aIOMCbcNV rrDw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=Z2UKOg3p; 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 f20si1477945edw.54.2021.01.20.17.20.45; Wed, 20 Jan 2021 17:20:45 -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=Z2UKOg3p; 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 S1732305AbhAUBT1 (ORCPT + 6 others); Wed, 20 Jan 2021 20:19:27 -0500 Received: from mail-eopbgr150044.outbound.protection.outlook.com ([40.107.15.44]:16604 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2391294AbhAUBQb (ORCPT ); Wed, 20 Jan 2021 20:16:31 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PSyUsuTKY97eehCYAgdq/j3NgB2DTfdj15dkKqsNCfE3ri+yUcYFZLI72loIb+uJ5Mk+gwy27PjvM1JQ0s84fEWRErDan3lgo+RihTX9QIazSTtlEX9pTRj1uzlssiELXgX9Y1NGEWm3zpNV0oCl3+4BuPOmsD+IdiCoKJSCVwk2n+9dRT+T6UOrNl4YmqbHBW2kYadA3rKXRTYLfSJb6l6O1obkmYD6rv82PEebCz+kmRScZFvKBuZo/e9LOQcd2PRAbIJ8xwY4pIZ3IScA+DRQnaCjEchbzUI3qrew/Cxw4jcWnVt8J3MZMuIexj8Lj2XbW5eeUir15kMQSgLT9Q== 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=w8prA6N0tCRFNc7f90wFWxXTMw+oe1yZsZ2xi0+JrHI=; b=Lj+DwY1v5MTdnUr9D4s7PQHtgHEdviwMtXpmXwAkMAtjpbXxCwgUxJsIziaevkTRRSnEAVXUR23nlqdf90Sc+PdX2VJDe/Ci5tZQtQg1/DSytrTXkobAOKXdOFfofg+dpn2azXdrJaKpys7SCSrqT3ye7K3linXOw/ggMQxKLMtcZLXjH/fSMp/fJvFZiURRbapMUu9sNjZY07X4Y4XDAMBndzHYK7BwiNyy+PJTcBR/3wYRjZVRR9lx44wl6Cc0xJGdLABsEnnfVkPFp5aO8pl46OgjpUP20ViRd7rIalX1g7Bub7ebj2iFSRs0gurWi/mNEqIP1h1k5CK7ZAgKEQ== 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=w8prA6N0tCRFNc7f90wFWxXTMw+oe1yZsZ2xi0+JrHI=; b=Z2UKOg3pUrvmWrSXDlqvCXM6CoD8vEXQ98roNLVXZVjxDfstlnwPRoPoG2cHJKWM6RssvjSpLGiW3fF3eheQdcJ/I/eVm5y6s/ua2G4sV8RnmjiSMDQwsf3P0O49PFpU+UlVgJ7Uh7u2EQ32ozVwaqkQt+4DOy+Y4GsBz8XCKwE= 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 DBBPR04MB7930.eurprd04.prod.outlook.com (2603:10a6:10:1ea::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Thu, 21 Jan 2021 01:15:08 +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:15:08 +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 10/10] remoteproc: imx_proc: enable virtio/mailbox Date: Thu, 21 Jan 2021 09:03:35 +0800 Message-Id: <1611191015-22584-11-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> 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:15:03 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 820dad94-a1ce-4732-bdd2-08d8bda9fe35 X-MS-TrafficTypeDiagnostic: DBBPR04MB7930: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:751; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0IFYKDe/+2wKgFrltGstBIOn4yrtw4Hnh+c+LD9+IYQ7CYeJcjtTAL6TLHxkZqmdLBgYFfkQp6x1aU3cJ4SkWPWL5W8d3ohLkLnPBfFyipfMZ0vvrxBQ5Fe9u7yPItV+XTSnRRXGil2kZiWTPvIv0wU09pXZ2z+ioUEShRweO/ZQ7iNbdgKNWhRE8ENQyhGWhh7P5lWVidePeIphtiA3MquDINAfRdQLeX8gRv3dK8nYjxLPTlTGY0qOQ8ph4myjsdAYGxDLya5/6hVRj4VoDrUeo/k5HUIVA2+n0y8O1HElsjXE0xr+JQ3V5rylhzpWunpXxqqTexDkXNRBygcB4hNekgksR4bwXOHinkIwK4Ge+UvmK+iiCX3osYIIKA20fDcUtCFt4UbC5ylydA24gjuf+Xe1U/OHzBy8iecp33m8m0etYrmE37xf6w/9D40yLT/N5aB3hdAMeOsSMB4gRw== 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)(346002)(366004)(396003)(376002)(2906002)(7416002)(6512007)(956004)(8936002)(52116002)(15650500001)(26005)(478600001)(9686003)(316002)(2616005)(5660300002)(6506007)(86362001)(4326008)(16526019)(6486002)(186003)(8676002)(6666004)(69590400011)(36756003)(83380400001)(66946007)(66556008)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: AvmRhOBYjXRvSrkCM2QQpc23rOK832Gg5pX0C3rNZkM3BxTiQN639ExTL+/LyOAZus4UK8tPnt7l/QJXsl9v5B8T+p3h3MKA0R4AnehGvtvcJUGzv2MP1jI9ReZvp20bcY6u39X2tbwAdRQdSWZS76sXUastP2YoxFkB2iA9ZYWu7DEA83VmkFUanqjWwZTgz1g1FFLExcba50CU8AOD7B83XWpqMymcmgbWJj0etiG54vm3b6nfGXUQkNS60rLibc3RpqqA4ke2JRhCbgOOnEK1nKCWFvFOACIhvaljz8DvOf1Kk+3lrOGQYDQEbqKFUwC7gxFdKLcGWqH6PKLY07qDiYznB1HOWXXcVdCahKRQuoVyja+ZbXER4NHcFUNUkhFl/nhgH5/QVsXBZ1M+7i5XPhh9/oPsU+lRkbSgFsY0R0ZaryJmjTylX1sC4/218I7Dawt2heHalFcpAijQs7WoIQb+P8ZGii04xbMly5kaz2Ta+lwN95xAGHL3N/ults3eiBG8RpNP8557jaPQvCWPsFSPzYuOwUPWcTuuGmhqM5LPGQKfFiivjt+q8tMo/1z8+WmJl5T1wBs5cUsMGCnWKKoYssoMK3eTbjfQjgE6RKCXI9WBB1czmbg63gsSG+3DRc59Rl+Q8J8KC6AUhgbzEJ2kYchic2BP7QK5WmeH8AEXEoDzQd1xz0x8gMRLUDAhlB9jKwnT+XBwmEN1pVUJj4UW+NwcrVYPcCp1YmXtpWKfhU9ki5aRDSw6bTfd17ZF3aMzoePGkKLfdrImKxtXBZzbVCGq4ri1/KFWqH0ei/XyzCUe5Z1ds463/B5Dz4oKs5P5DEXVCrUv3OxtOV+Fa+kM9nyczOWn48unDQXwxkDjdzqEa+ttcLFUbHZiuq9+gmjONuiAkLKJM3n5nh/FJ8BZy1yqYmQ3y6LqgRkygInEtC8lfuiToCcCyu2L7dbBWhhScs9abRq/4zuSpGLYMjNw9GbDB7E7PnCWQpcizILi1aHVdA9QeMgO8XJp X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 820dad94-a1ce-4732-bdd2-08d8bda9fe35 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:15:08.7801 (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: ZxSohkGoNoI3fkQyvQ6+EVkBXPggRt+QulbILTMoYsOrIt0zHVgiF9SFtYlYv4RnCeul5GJd3xcD0pYhB1x3aA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7930 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan Use virtio/mailbox to build connection between Remote Proccessors and Linux. Add work queue to handle incoming messages. Reviewed-by: Richard Zhu Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 116 ++++++++++++++++++++++++++++++++- 1 file changed, 113 insertions(+), 3 deletions(-) -- 2.28.0 diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 3685bbd135b0..90471790bb24 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -15,6 +16,9 @@ #include #include #include +#include + +#include "remoteproc_internal.h" #define IMX7D_SRC_SCR 0x0C #define IMX7D_ENABLE_M4 BIT(3) @@ -86,6 +90,11 @@ struct imx_rproc { const struct imx_rproc_dcfg *dcfg; struct imx_rproc_mem mem[IMX7D_RPROC_MEM_MAX]; struct clk *clk; + struct mbox_client cl; + struct mbox_chan *tx_ch; + struct mbox_chan *rx_ch; + struct work_struct rproc_work; + struct workqueue_struct *workqueue; }; static const struct imx_rproc_att imx_rproc_att_imx8mq[] = { @@ -366,9 +375,33 @@ static int imx_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw) return 0; } +static void imx_rproc_kick(struct rproc *rproc, int vqid) +{ + struct imx_rproc *priv = rproc->priv; + int err; + __u32 mmsg; + + if (!priv->tx_ch) { + dev_err(priv->dev, "No initialized mbox tx channel\n"); + return; + } + + /* + * Send the index of the triggered virtqueue as the mu payload. + * Let remote processor know which virtqueue is used. + */ + mmsg = vqid << 16; + + err = mbox_send_message(priv->tx_ch, (void *)&mmsg); + if (err < 0) + dev_err(priv->dev, "%s: failed (%d, err:%d)\n", + __func__, vqid, err); +} + static const struct rproc_ops imx_rproc_ops = { .start = imx_rproc_start, .stop = imx_rproc_stop, + .kick = imx_rproc_kick, .da_to_va = imx_rproc_da_to_va, .load = rproc_elf_load_segments, .parse_fw = imx_rproc_parse_fw, @@ -444,6 +477,66 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, return 0; } +static void imx_rproc_vq_work(struct work_struct *work) +{ + struct imx_rproc *priv = container_of(work, struct imx_rproc, + rproc_work); + + rproc_vq_interrupt(priv->rproc, 0); + rproc_vq_interrupt(priv->rproc, 1); +} + +static void imx_rproc_rx_callback(struct mbox_client *cl, void *msg) +{ + struct rproc *rproc = dev_get_drvdata(cl->dev); + struct imx_rproc *priv = rproc->priv; + + queue_work(priv->workqueue, &priv->rproc_work); +} + +static int imx_rproc_xtr_mbox_init(struct rproc *rproc) +{ + struct imx_rproc *priv = rproc->priv; + struct device *dev = priv->dev; + struct mbox_client *cl; + int ret; + + if (!of_get_property(dev->of_node, "mbox-names", NULL)) + return 0; + + cl = &priv->cl; + cl->dev = dev; + cl->tx_block = true; + cl->tx_tout = 100; + cl->knows_txdone = false; + cl->rx_callback = imx_rproc_rx_callback; + + priv->tx_ch = mbox_request_channel_byname(cl, "tx"); + if (IS_ERR(priv->tx_ch)) { + ret = PTR_ERR(priv->tx_ch); + return dev_err_probe(cl->dev, ret, + "failed to request tx mailbox channel: %d\n", ret); + } + + priv->rx_ch = mbox_request_channel_byname(cl, "rx"); + if (IS_ERR(priv->rx_ch)) { + mbox_free_channel(priv->tx_ch); + ret = PTR_ERR(priv->rx_ch); + return dev_err_probe(cl->dev, ret, + "failed to request rx mailbox channel: %d\n", ret); + } + + return 0; +} + +static void imx_rproc_free_mbox(struct rproc *rproc) +{ + struct imx_rproc *priv = rproc->priv; + + mbox_free_channel(priv->tx_ch); + mbox_free_channel(priv->rx_ch); +} + static int imx_rproc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -481,18 +574,28 @@ static int imx_rproc_probe(struct platform_device *pdev) priv->dev = dev; dev_set_drvdata(dev, rproc); + priv->workqueue = create_workqueue(dev_name(dev)); + if (!priv->workqueue) { + dev_err(dev, "cannot create workqueue\n"); + ret = -ENOMEM; + goto err_put_rproc; + } + + ret = imx_rproc_xtr_mbox_init(rproc); + if (ret) + goto err_put_wkq; ret = imx_rproc_addr_init(priv, pdev); if (ret) { dev_err(dev, "failed on imx_rproc_addr_init\n"); - goto err_put_rproc; + goto err_put_mbox; } priv->clk = devm_clk_get(dev, NULL); if (IS_ERR(priv->clk)) { dev_err(dev, "Failed to get clock\n"); ret = PTR_ERR(priv->clk); - goto err_put_rproc; + goto err_put_mbox; } /* @@ -502,9 +605,11 @@ static int imx_rproc_probe(struct platform_device *pdev) ret = clk_prepare_enable(priv->clk); if (ret) { dev_err(&rproc->dev, "Failed to enable clock\n"); - goto err_put_rproc; + goto err_put_mbox; } + INIT_WORK(&(priv->rproc_work), imx_rproc_vq_work); + ret = rproc_add(rproc); if (ret) { dev_err(dev, "rproc_add failed\n"); @@ -515,6 +620,10 @@ static int imx_rproc_probe(struct platform_device *pdev) err_put_clk: clk_disable_unprepare(priv->clk); +err_put_mbox: + imx_rproc_free_mbox(rproc); +err_put_wkq: + destroy_workqueue(priv->workqueue); err_put_rproc: rproc_free(rproc); @@ -528,6 +637,7 @@ static int imx_rproc_remove(struct platform_device *pdev) clk_disable_unprepare(priv->clk); rproc_del(rproc); + imx_rproc_free_mbox(rproc); rproc_free(rproc); return 0;