From patchwork Sat Mar 6 11:24:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12119899 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FD06C433DB for ; Sat, 6 Mar 2021 11:39:45 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 58D9364FEE for ; Sat, 6 Mar 2021 11:39:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 58D9364FEE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HnxND5dR+Be3BLUhvaEIQ6imUCZ86sOZdIyNTC0o4XY=; b=MY3efi6gbzR0ECCVVPat/Z2qo 6VUpQ9qtRUSK/5UuUdy0ctVp7TZzrbQiC2A3V1yOf8LBh99n2wgNw0qoPNqp4pyYH4TVgqQvpQt5g PhS9N+8rQ17oOC1LrM/6gqAFOb/+Cuf2G/ccihqm0dUxHpeJslSeHvJoh+fwh6KUaeBpwz4lnpuMt mCpJHC+PKFEj6EZytSIgVGpwOBSJnW+PmYymFIDrK6eqyE4P0P5js8HWbgY0cj4pHnaAwcw++tQIu eU5fsmbuKH8TwhNobq4CJhkkTcX/n7CxdFu/zePVq7iUWOk/0Q2n21/+0tEFOlB2uoJuy0bfxgeqR pUoQj4Xfw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIVFs-002tgv-TF; Sat, 06 Mar 2021 11:37:57 +0000 Received: from mail-eopbgr50060.outbound.protection.outlook.com ([40.107.5.60] helo=EUR03-VE1-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIVFj-002tf5-N1 for linux-arm-kernel@lists.infradead.org; Sat, 06 Mar 2021 11:37:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UsStnGwphUccFJ3fya2lUKhlK6XutLm3YdtaXF0yn0B5P0a8Zmi8qm8LROyQJbE/m+MfbXpFVkqLR8VRsesa5XpxyCoqJhN/ApBJGG3EUnjVGLtOoxh3FmPghMjmlETyoV8SPRXBHn0nQ4ipmeZgudltiZcj9cIzkKOPNrX5wwSvBNDDCGmQPFgxpdlAuXbrs8IodguJ4riNoZYZypZX6FoCDJCF83xaZQ0LG3RFqioa8rHCb3L6QCXkuRhmiYeWmk+GB1xzfE9ZpAzZmEINlo6LZ3n2zeFPVP3zlHm8i2WI04F+g4GgpddfGZaQfsDVh+fqFHbtaO7uEDJNN2pEaQ== 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=9A+XP/uWsN0e/CRatf8DaJuBGXINbHwchccy90gEerE=; b=dHAZNyzbYM1fA0SJ1a1WSCgg8TeQLTCAXmaN89jc2TWrl1EyqzIa4YeINIwE44FLTBb3qC42rOlBNdcTxO7PyLCzjtOKRxJ355DADaTYVXPDfbz4O2sAaG8AJBj9puepUU6EU2JxDWwWbYJHrHIl4CHv2d5tcWqwdUr1g+c1+n0RqYkPz4xCYE2D3sZFpyuaLrVpwfCYXpjxQSL2+cGOEPBmS4+Xrzsyp4AQu59i3iFOflMhRP+MmVy74MAIo86KqNoe8IUzyExQuJyu6gMDPNS2HY+y5qD1LcVk7SxcAE4jcJU4I0sEn0cJ+N8NgPkiJM0BVotZtwHcWNEgyLWLtg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9A+XP/uWsN0e/CRatf8DaJuBGXINbHwchccy90gEerE=; b=N8DiV844EGhtNutiZJi+R1YmsNU+Z4K29g0WRpjo+hCXRwcLAFiUjf+r/Zr/YxVe8Iz1t4OK44kI/p4IzV2DYvpUhHuBfXyyE3nYCRz6RZBLQWaLZy4V6QDH6IMS/xysreKcE5dYBb8y02TzVYJi0g4pfOG4hk4Bygrb2YfRDXM= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB6PR04MB3016.eurprd04.prod.outlook.com (2603:10a6:6:a::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Sat, 6 Mar 2021 11:37:45 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3846.054; Sat, 6 Mar 2021 11:37:44 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, agross@kernel.org, patrice.chotard@st.com, Peng Fan Subject: [PATCH V13 01/10] dt-bindings: remoteproc: convert imx rproc bindings to json-schema Date: Sat, 6 Mar 2021 19:24:16 +0800 Message-Id: <1615029865-23312-2-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615029865-23312-1-git-send-email-peng.fan@oss.nxp.com> References: <1615029865-23312-1-git-send-email-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: HK2PR04CA0047.apcprd04.prod.outlook.com (2603:1096:202:14::15) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by HK2PR04CA0047.apcprd04.prod.outlook.com (2603:1096:202:14::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3912.17 via Frontend Transport; Sat, 6 Mar 2021 11:37:40 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a04b62fa-d58b-4dc2-9af6-08d8e094426d X-MS-TrafficTypeDiagnostic: DB6PR04MB3016: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WM1ISYpzRGXhm9NgbGQjuZyzFH70EWSwglWCVdYpPrNiEA8qBBDrAH8YmxW+CKmU3DXvfS+Q8Pic1HMKflPwVosusLQ0jkjwO1apGPlNirI1/EUZiOQhgS9uLJ/ooW+n7wz2vrNcUdepaZUkSnVHJUn2zPxHqpyMqikMWV4Dc6nMkYvU6LPl3GPbzmwAKt+oPgHUJPGn6i4bikts2r5XrHrWfONd21LTdesG8fEpkObB+CGYVX3tsdxlwipcgbm+etikB2cU+bOLeVXP2Ac1PTQpbTLn9/alXUbla40HG9w2mPLkVhvzD4vkOHI5k5sgNyxfyBa3iG4uMgjfT/Z8hwCPV6E4RBZKPP71xpej0ngiYiHx78RnwtEfU/yarGrQYqi1jbPCi1FQUHpRV+HqqVaMk4a6MsE6CDadyzze6VbTzUuShCYAbU+T+jZ0ACqDhmBlQSH/vrF9GDC777Vk0cv/ritVbxIIiGi8aL5rTiUIlGayjYlTpairddtatB7xwEj03eiiX031uGnQaFg+4O+kHZWqsYLvMepTYnrjdqPvmhfJSHs3fgJW0gGeSGtvEqnfzylxcZY0Q9G07mYXLRFnxLy9MuRHDX13r6VkaPaOet3TpsHsbp0zjK/Cwq1und9LsIV7agyCT4bzkARepg== 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)(376002)(366004)(396003)(39860400002)(346002)(83380400001)(8936002)(69590400012)(8676002)(86362001)(6666004)(52116002)(956004)(478600001)(5660300002)(6506007)(66946007)(26005)(2616005)(4326008)(316002)(66476007)(6486002)(6512007)(2906002)(7416002)(16526019)(186003)(66556008)(9686003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: W7ZXXEn5it7mGW2UC/gPJTDICm/DfSMStum/J0UhQ1P0z6PJ/TElW8UXe2tOrhxEMy2y7QUYxKYJE8+y3C9pK9eStOwDeU0oGPjDD1pVKMUZM5MqW+4cRBpOJJPm6Ttg0GV6VuJh6Uh5QTdfNnMWQS/miIx9vHATEEwR2MGjzz5fyRhyPN+5mkGtpj6m8IG9vsFBMQ04juQbXNkRBtumjyL20AI22b/dwLoLjWhh31QDtDzd71OHn4QBlIb4qEjBeHlR4+FFyuUxl/iLbCYwmfbWPjGQGq1cPYj33cHLce3HjLhtvB9QQRR8GqTxNRAthIiurUQrNdyeQsOpCQBkj42bY5k2JJ5YlfAjGXd5PFPCEt0l9kx6655gdXFVxXgAoFFVrZtsMMdZUG/iN13kjWhsTRBeJ7bUaMkdlJQKiUIeyKkwKtG7VhdeuCRAP99L4mWFoodTrWfL621Yl0NlawQ+r3Pirq2m2cd6Zdk/oaEBOCRhi0Rk2tJPSvQvee2fNwCNA0Ra/JlvU3vxVTUI7A0IBL7UxOUxGs0Q+hAhot35XgzGx9w3CLE2LxjFS5Uur2o31jh0rGs0xYxbW4snnTEB6R2vH+cej5VH3Vc8P6+7Yo0yrDTy1RwFpxyDOEAmAHuO8YRkG0ZOSk+QsoBDQ5t6dyFYpEOyVRPTfbWJVbjgn7CzLOLaIChaScAz7L5h020ZheDjIp0IVZ5NJ6bYqIm0sO+ea17j6zvDZxz+GOKyx6ba7ORK9iUO+QtsnEaz3uzXh0p0LQOWBG4Yy5baPHnvnDbgSOvsnqUd+29QDG2gstGNZTmez+OMz6Pj/Ke3ZGh0bHWrYJYdv9UPjQ4S6/zyWfLl/hBVbqQoc/S/WGT1ETu6Z15RDLQssT+QN6gzCKi47uOA/MBnLGJnrkuKfgm361yumBoLBEZaKvDa3MOkxdj3D8cF276ey35VfMw6+ejJDABnkETcT40X1P+G5AqeiMk/tREKxVbAj7G4yjPW0LtOPiNacCf0PHvFaUadGHRJsGwlnN/EfmycjHz3pDlt4B/QdBHSD+b4p93qioaUZVqA0GvvqcAfB6y/UYpm/bCocVYOMzqGs7RuK4rHRu1EZX7vlM83ZxUO8jL79h8sWnbwMg5fBRT8L6uoF+ISO1ynxmOv80tPCPDN3nFuhAo4GGAPdNGkFCwMc5iOfb44Bx0haYdiXtbARfWJvY5RoRXX2/x+BVQ2mcf0Z87gsihzzz+m9QW7DVr0hHdz0m8hg0W92ngi4TUo6zUg6oCeacdH+CXL6EBREbwQpAoly/VapTW6/6ElTzD2FvdUOa/zLMgXEYtizDEokk73xeYg X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a04b62fa-d58b-4dc2-9af6-08d8e094426d X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2021 11:37:44.8975 (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: sZpznS4GMsMQ7mbAyz21VDCOaqyb4hAmGbpIldy8DkyJ4kDNUbZxkydttSF0UgxYUEmtK7AHbLKR1Xku2406jA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR04MB3016 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210306_113747_860157_1EAF109F X-CRM114-Status: GOOD ( 14.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan Convert the imx rproc binding to DT schema format using json-schema. Reviewed-by: Rob Herring Signed-off-by: Peng Fan --- .../bindings/remoteproc/fsl,imx-rproc.yaml | 61 +++++++++++++++++++ .../bindings/remoteproc/imx-rproc.txt | 33 ---------- 2 files changed, 61 insertions(+), 33 deletions(-) create mode 100644 Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml delete mode 100644 Documentation/devicetree/bindings/remoteproc/imx-rproc.txt 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..54d2456530a6 --- /dev/null +++ b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml @@ -0,0 +1,61 @@ +# 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: + maxItems: 1 + + syscon: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to syscon block which provide access to System Reset Controller + + memory-region: + description: + If present, a phandle for a reserved memory area that used for vdev buffer, + resource table, vring region and others used by remote processor. + minItems: 1 + maxItems: 32 + +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 Sat Mar 6 11:24:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12119901 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA4F3C433E0 for ; Sat, 6 Mar 2021 11:39:47 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A3D8765017 for ; Sat, 6 Mar 2021 11:39:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A3D8765017 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Jo7Ap6Fd1XAsXWVyCxdSoxS7Bhpn1bgkzZZdn2au1jY=; b=cPntQKe26oYkolP/2JyLn9oQQ wRVfG+/MdKx5hpKgiJYW9yCM33oJFsy1DkGDHytXZ66qzNoZTyE4kGt1vhLJtvdx6S1x4wMSvwtYK jZoxOQ5/9J3UMW7S1p9YbetXUcSdvchm0OacJtz82E5r5SsBd08jXWX1jOJW03UFJyhr0pbeAXmlQ AtBUnwvemoWgdkWmA+NUznjYqX9OvdAzQu93W8f4TQ22JGY/Pd8ZM+xTWjvX7VM5iJe0K0n7877wc vNvReKUG9eIVJDTpJR9jR0yYJcvUTNp2rf/BZoEkfOsicrvFHUUhYBAVNe/0ySjfTLgUqvnxBuFdN YVEAeuwmQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIVG3-002tjN-PZ; Sat, 06 Mar 2021 11:38:07 +0000 Received: from mail-eopbgr30066.outbound.protection.outlook.com ([40.107.3.66] helo=EUR03-AM5-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIVFr-002tgH-57 for linux-arm-kernel@lists.infradead.org; Sat, 06 Mar 2021 11:37:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bq77aFN5yrvgDPwPSSeONW8HiDovOHIKXwr6zwHmQLgc9KLc6cQsIU6hsYbOpEmZlMcGoBEL3w21ebCflg4Qo/6SQLELOH0AWcjS8NGJWB3+97Kqbi6bEbG/2MpCetwhiyqPlgu/q9+/IXjoXlIlkNa8oJWquzBeMk75BFJSjUSQQr3P1z5qw2BOLkI8yz7uBEaKvvVK/ZtJgeq0BiZOCjdug8i/b13Myft1FulE53eFB12YFAA+ovNUu8sK9IF+QrVatmDkjDwQn8th5C09jAJlur+mVsNnHyJHfyr6p+zzsiW5476Z6Fg4HLcHEBQXz8j99r26MT0Z6TiewTh0FQ== 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=VKTgz6g3bhbNjC5jn4bZA+1dkA94Q3va0AGpybirrtY=; b=Zutg5/W2i54M0toGPgl7NTkBrxcU/KtK+kN0zUl6KVqCoAbC7aIRA6H1XMt3NEsI/gHFV1wuNbaO90EbNNvn/LUUwF4M6s4BiPEqyw01hDZJXFRSAwx6QYjbu+a++RsjEfa6+RXpLWNgHS7ScdxnEBaQ0ww8t2f2jORsh2HzPadInTR8zfjHLu+KrJCfrTBQzoNaxTRzEBNlABblq/4NKvnwtpzXtODTwRyNzhHhhKkTBeH+5CEI8aQJkri5kBEQwWF5E2p6oXaHtNHJh+jlu4q40vx0at8VjLR1HJc7xrI2/z8eVecLFKQNBxYu276SqyWhxZt/SaUjhmQuHJVSug== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VKTgz6g3bhbNjC5jn4bZA+1dkA94Q3va0AGpybirrtY=; b=EM+s/sUEmtAK4oeJfw6q7yGNQItArmksRLNFR0tO3ssZ/TkUUZfpUKXB+IHkDgVgn34xHSbucrNelxibe32cdJEHu7qzOSYSVoQIjd6DvamheU8iMQFTC2JpUNspa6ghzSPXpbqHnBxpJXMANAJL5PaqOyaz0zPZkyjcHoSrN50= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB8PR04MB6618.eurprd04.prod.outlook.com (2603:10a6:10:10e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Sat, 6 Mar 2021 11:37:50 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3846.054; Sat, 6 Mar 2021 11:37:50 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, agross@kernel.org, patrice.chotard@st.com, Peng Fan Subject: [PATCH V13 02/10] dt-bindings: remoteproc: imx_rproc: add i.MX8MQ/M support Date: Sat, 6 Mar 2021 19:24:17 +0800 Message-Id: <1615029865-23312-3-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615029865-23312-1-git-send-email-peng.fan@oss.nxp.com> References: <1615029865-23312-1-git-send-email-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: HK2PR04CA0047.apcprd04.prod.outlook.com (2603:1096:202:14::15) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by HK2PR04CA0047.apcprd04.prod.outlook.com (2603:1096:202:14::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3912.17 via Frontend Transport; Sat, 6 Mar 2021 11:37:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 09ccb520-783e-4c42-4b1a-08d8e0944592 X-MS-TrafficTypeDiagnostic: DB8PR04MB6618: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2958; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /qIXMe+AlJJzGE7ugD+0Escm9I3znGzoPFIK9apZJyUzThbWQoHEfLngMYbxqlEdIYQiGvZXJjo5jFkxPgdPeRVxkxtpWFs7GV3g5QLMUh7HvF0+20L3nDK62BirIIJ9mQKEpM8uutUoFlnXowVWwqDjQdKLDeW+8whboFu9bA22uFCdVkN+z6Y5LIsyrznvTMl2Et0ky6+bk2Rmbf6g1VYzYcCnKkTIF7CuqYTx08bUUNoBCsmaYb2hMV8x1eIZZrMyBywDGEk19lGKqVPAVbYjNtpvANMMQzOwlyftrNuVxvJBry/nwL7tR+7KLaGvxmH94l6QPbhoYUfCloST2BQVWVoekLcPV/eZCokys2zejEjXKb2Dr2Lnid9xV3lAFAz5ogZkHdypRZB94s8ME97bxKeEZMkLnJhyLTJmo9bLLgkPunhfqvvE83rY7iRfp8lxh4Zct6jez7Nsnd3XlbFpaP7ymcAUeRvcEPvlCWiAThSaSYV7qY7wtx/qe/P1pVc5PBX62hIjzjHmtiPrHfxk0wTNJKGKzu+jrsSICogAa5YOaru7/3/BqchoRiPV4eraaa6ujuCwLYZaygVJlmLcDISAoh/f7BPpElupilyOJInn+obG/czuqDlk3rZJ8aw0T5trWU1JVVKYhtXRT/7XrxLvyy42saiS3efApeE= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(366004)(346002)(376002)(39860400002)(136003)(83380400001)(6486002)(9686003)(6512007)(2616005)(956004)(8676002)(6666004)(69590400012)(86362001)(4326008)(66946007)(6506007)(7416002)(2906002)(52116002)(186003)(16526019)(26005)(8936002)(66476007)(66556008)(5660300002)(316002)(478600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 2WB/+dFbzRvIm+N62tuucSTorEz3nJNEZ8uU3rgC69xgY1pRK+EBE0uY0t2c7I37Vu0kGWbVUziKLUkqE7dQ1+Qw55vA4nL9+lglx/R19wU1/NNJundz8SuGAukwNMN2EVDYzC0VG3a8rV6pGcBiD+qGzNWKMw/qiY73P6BVOU4FhQsLBJ2Skg60Krw3Y/cvieHv/zjX+o0+Ykf84cyxBgb1VjG2YCemyO24VQA9TH4jhn7bUOUZogRvSlRVxitMnMYOcu0UBA9DZHsj6DyNoAD3/KuQKj0qqT307rePRnjjpt4Lbs+gfXJVViqCm7FUhFsrC/IaZDsTL9f5mvX0hWHJLbcZWvqkqLToUaSky5kc/SK0b9GMife6mriju7E6O4wlAzKMXfCkK3WBqyXfKjz2/+bqarVcZScasRrEem1Rsi4a05xaM6tXgIIs0c2NKB4FPry22g0QOR66XWsTL/ItyeOJoV00nBvKSW6ihXmJ0IN35djCCr6u4tdYTEveFO8BN5k22BRfkxAXQFkDr5TqpHGHYWEEjDhZ9hIUw0EhnHmELEq5TxBY7C/HS8wm/LEDQDO3lOpFBypTJgfpNsgnFPBoaLd7BW14Ufx+RAXV5Ud4P3uJH1U8GU0Gl1lx8LXFbdAfIrOg3s5L10nzbCOFjgZIXE48xtdof8IaT90Q7IykN4wOqO1zXftMYFJmenkAJ6MR67aVeeeBwY+uCyE/wX/UPUvXntlDULiRtxLDrPp6RHQ1dJAyQzdz0xAw1EMf5dpOpgnEbMhYadXMXrLFbfGLAOLKn2fWLukzAjfK/aDM2z07rzzjNBFx0H7nksFc0H9YrULBKgkQM77vXmls18HjhhuNJUZrWqVdgpUpEHzjwxz16J33Ylfp+esaIO6x2ed2gtwz3OeEk1u2rL7dTcMqcOAz5x4ozxJh73Y6M9cnV5jO/CQGvvrNDab2ktGG2/2sfHu5RU2mlopEcWNscboF3M1GYxars0+XsaR8T97w5x7tsIEQxA7MP4ROKZIRpd82G0t8lHVGWB9dHHGdDoLYxvfWpcOahysV0EkQtDgbLE8cONAfSDQWWdE14+UbkH29bWxH00Woqkqmbc65ZXgvyjQkd46r3vNnEvyQqtY3sCI6w1HVCS/rfxN9J5GWMZApPTSArHBV9usQwsA0gsw5VdJ8E0bydFa98NPZuQz5ugJ1Nagd7N5HMZIlVzP3ksdATh2C+SfAbD2j00+uOGFAWt61XHnM347CQne6EJMDcsWVp0VFsIltf4OHvnulLaJF3PhNXYjTqD0yOfMO2RZ/dP06wi4NMPmFyiWprrP5xH6GG/8P8aQHi9yw X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 09ccb520-783e-4c42-4b1a-08d8e0944592 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2021 11:37:50.2081 (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: Yy0eba5YqSFV9oewW4hnHBD992rAz2untkf16+yuB/kxnh1tCWib84PF86QQUASw1Fgp0SNnvcAa28dzFdelUQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6618 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210306_113755_354264_6AC2235E X-CRM114-Status: GOOD ( 11.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan Add i.MX8MQ/M support, also include mailbox for rpmsg/virtio usage. Signed-off-by: Peng Fan Reviewed-by: Rob Herring --- .../bindings/remoteproc/fsl,imx-rproc.yaml | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml index 54d2456530a6..208a628f8d6c 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: If present, a phandle for a reserved memory area that used for vdev buffer, @@ -58,4 +74,17 @@ examples: clocks = <&clks IMX7D_ARM_M4_ROOT_CLK>; }; + - | + #include + + 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 Sat Mar 6 11:24:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12119905 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6BEBC433E0 for ; Sat, 6 Mar 2021 11:39:52 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EA37E65009 for ; Sat, 6 Mar 2021 11:39:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EA37E65009 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=R2Wk3UlCls60YMnCM2S8gqdx7VLklVKteU5AA2y/Wc4=; b=acfss94WqyewxVlLRT+IMBew9 iNSNGLFVeYUZriscEmUH4hkVj8w4o55s1jBy2fRMR+iFJjveBRosYZwXH0Kgavt/H6n8u4DNNFX+B K4jKsJKNkuYrtHkrxE4C3vImetwZOCWfLolG37xh2NCzo4roAQ8ySbZdSvaR8RT+0ggvEE92FGTfs n/7+lkkCYLUmajGlMk6/PScfEZmcDpCsvB1VVRihnGI2qt3P8hNbzhGnrjkYOgP9A1H2JvlZWg5pH SXRtk8d2y8QkJJbfaYPxEokTmYP7oFfMTkF3Q/fOkEKiOc2TDg5WJ8vsWkECmpszAWAM+H99w3jTH g1Zfw6aQg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIVGC-002tmV-QA; Sat, 06 Mar 2021 11:38:17 +0000 Received: from mail-eopbgr30066.outbound.protection.outlook.com ([40.107.3.66] helo=EUR03-AM5-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIVFt-002tgH-Jx for linux-arm-kernel@lists.infradead.org; Sat, 06 Mar 2021 11:37:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QxQ7if9OtEeT1Cl6dBXY1619iiU14ZTtk0GrmlXgVHjNUMDrN72UggKXSyK5fPRh8hZo+u5rEWoeUvxwoXRSOV19RQGhkD8DUCctd7pGoVBQQ2x6V1dHibFK3OB8e6v3eS3J3Zwr/n0GAw+yfH4omKjuxJp9YhECDqOOYlqn5DJkP1PfTj6+8tbDKnhzSJm/4Tzb6yezvjnVmZpKLP3qA8o8P84+UCZlcm6YnqWrNPZMJ1vfO2VcYVcgBizJ0h8vPYzsJr2SzDns8Hz9VNMGLIr/CAge4ktlBhjX5xVELB2SO3Tjn3U63NNQ2XUk5+yR/kVulSHQREoTBHTiBUVCmQ== 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=W5NMJUQHhqlIBk6+zvQQfgYzD4wXEfXAk3gjaY/qhfg=; b=UzK2TqrbiWnypVDPoct0r/fm//LGAo2JBsgXA+JhzrV3Zi2NePALqS98rrpM6W6gUtYkPUulqBwgbXQ0ucvv/XNLBS0xXEqQoHYnqDAoOTrQd5WWh/I4rIgTf+AMAOA+LZ8h83DRIaSVbM0AwWtnuBgA1VnBFAaGRIstt9+ojJ4WzkBDVV9XhtG1QEmsMf736ThXtSJtno1a32paHhRjQV4w9/zlcqeO8bwS3U/o6C6C48n23FlihHRiZCy9SXKyoQ9whpoQ0rG5n6cyvjdmd07yvbgylKQcvpFA5PFEBXHAHd1wgcAcrGe9D6Z+8xNbI3GMsnKZc7LKVbnimPKL4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W5NMJUQHhqlIBk6+zvQQfgYzD4wXEfXAk3gjaY/qhfg=; b=T/PFtnEMkszEmUT1ivzncPdjSu8ZgeQyQe9mungd/32E2PTsc72Lgqfk21Sd+r+WGO1Jw//BXmz4yFrKI2/kIf52EBVg6eNLpsNsD9WueluS8V04Q3qrQUlBxNJOL/qLSdY0pCBTPyZpIUSLmQLuVzyODwIJSPjnCYgwLFdVIoQ= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB8PR04MB6618.eurprd04.prod.outlook.com (2603:10a6:10:10e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Sat, 6 Mar 2021 11:37:55 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3846.054; Sat, 6 Mar 2021 11:37:55 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, agross@kernel.org, patrice.chotard@st.com, Peng Fan Subject: [PATCH V13 03/10] remoteproc: introduce is_iomem to rproc_mem_entry Date: Sat, 6 Mar 2021 19:24:18 +0800 Message-Id: <1615029865-23312-4-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615029865-23312-1-git-send-email-peng.fan@oss.nxp.com> References: <1615029865-23312-1-git-send-email-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: HK2PR04CA0047.apcprd04.prod.outlook.com (2603:1096:202:14::15) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by HK2PR04CA0047.apcprd04.prod.outlook.com (2603:1096:202:14::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3912.17 via Frontend Transport; Sat, 6 Mar 2021 11:37:50 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 0ae9d832-db2e-4598-acc5-08d8e09448bf X-MS-TrafficTypeDiagnostic: DB8PR04MB6618: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1091; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iDqCUMH7XYHp7Xp/3UuvELbMwYzOEt/y3lEKjo6xpZlLAgMCkBF41nFgnlj0X2dvNoBOAWTByDs/HM22WjHO35EFz8ImFLu6of3NBncSFchb1Yr8t5ZEGEXlyoQl04Mq15Apc6XIa7wEeYa18pX33iDUrJsuxhIc1Q/aIUcQ6PSEO5xNMTG626SangR61fDYiktmYRlzuvt0eNCc8VkV3r0L05jVNP5Qg/+UpOVINgHtfdtzgalRGZJPJJkjkjhON+hN65FkIO9aILkZcPR/IDd57eggjAmipXAQ625GkdYnu3nJlIW6KnTIGyyBi5u5HM9mrx1bTnkPZQM417tuW+P4Mel3CdKYQO31JCsP9amqeqHUuJq8I/R6nlKNRWSEpJMQedgu+Dtl01o99rk5ovOLREuQhfonxBIzbeUlWcY4oeF70VO6jyN682tbak3S5/O0iDXqW6r8DSScJuxPC6bBLtez2u6KuV0oLgB6SUsYjkT57tsSrMQeh3dGZ04VrNNGZsHrhwHixqFAJ7x1m19jAguNWOdYofDNcGlsZ4SH24SGtax+TYFwLVV0lhJ+WLrkVJMTvf+o1dAozSQ3Wg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(366004)(346002)(376002)(39860400002)(136003)(6486002)(9686003)(6512007)(2616005)(956004)(8676002)(6666004)(69590400012)(86362001)(4326008)(66946007)(6506007)(4744005)(7416002)(2906002)(52116002)(186003)(16526019)(26005)(8936002)(66476007)(66556008)(5660300002)(316002)(478600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Cdh2pa87S4Om0n0IV8BdR883tkwDPuEKEHoXvuhXdauWLKpMEbuN7bYX8UvQ6SQ9IgzHUUgDZl5balOgQpU+bYI6hy37atjrXyeFmHTv/XUKzQaVHEup+/zGwcVtOs0LGsYcrgIA9SasxlFLLZhjgIjNqGNVyrIIo159f9bt9p1Vcsqhq2+gXFOkFq2uToM0X+pheSYEPT3dkmFAyCZBjkUvvdkKmOkkYZ/Ho7+NCott696lJNmFklf8ReMwnelzBwvWUzWz2CK9Bmbv78iYvHvwB8mHJFlchqTA7FFluM+B5NLmwU3hQc5+uLBdagvu2vpn33WSs7cTa0Yrwyj+z5uQZvXP/PQDRxg1NQxmOYJQKtyitwUWNTu0wDSMZqiaW5qJSdBGRACvdnCxsUfMZi7O2tbfRruF3ic1a9QGoYJWm37nuPhlEafLJTiaDtjKmvnIR1U4sgwRtXJUypUm+FCVzt2mkn2SmZGBkOjaW2ELSB+vsIvONlyg5iFfCkVC5Jl011/w67Zh2Xj4n7jq8HqvIsm+thV8f2mMZtdNTEpV6lT1laUBPr1fPBLd7CDN5/KAwYSbYlZWy/OmUu33dTcUPRBJDsKQGBQCjcpDo5/rdcjdPDgy0KXLs/Ko+wK0HkzacZXMCi85wQGnQHrK0kzuq16h/r5u+MtIhH9KgVQntELd6LFb4rO6tXusxPAhgMtdzLfPjzpVOqj8tXZ7O2M4CJhGYrRQjcN9ek36yK1LLZvgV6A3kWC3Wm2H8B5TRJ7NUBZzAv9D/sgD8dKG9QgrCrwKLtDODUrDjoaXp8QwX52HETRZsgR6IshtWhWs6S/y4OitLgJhgN1aKOrm2XnzzHHlbcPMCH4A9gsS9sL+fDIdOMAMRXiZWf714tO2hRVxeKPNiv/mnVmVuamW7CO5GMI6DIPjj7tyO7QTuXUmY7XOzlL4hs7BBH0MFWYVjvZZoxQrRhxxSHMgcqwLfl82JMqYWqdjbWjBX5hYcBGG/UoQ/9dcab5WvvsDaJ1ksYDkwmQ34whMN1rvFK/zfz4TpygF6BG+n0a9sFcLZAtSowxloGUka5fDuAGIkD+it2Bg/pnezPvNEgSRrXm83oGK8X7BAizo4hUhuqXlrw0yvA6IzzoTMyz7wUQMcSe1enExb8+S6CbwUzLUPhj00750/zZuCEf1i9j55Q5boaM1nzBWDcMsWGOZbpCYrsSh3+Gp6mt9f6q6tVlC07A4FLhcdtozXfZoBCBkpnfLEv8Lmr1SwbVf5OF6eVstetvcI39rTozdSkJ5c/FEnkm9AuBlQd5O/4QnKL6+zCQHV2/DSdookZShDjpb2CeBK1Ll X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0ae9d832-db2e-4598-acc5-08d8e09448bf X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2021 11:37:55.7056 (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: gUR+o+SQapa/JZNLBB4+xlOZ/fs/W5pGS0el1v28ffHJ993b6pdTC3O+hMaU2Mfxz77i5cVV3TPPceKQhM6ZCQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6618 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210306_113757_836465_F948BD86 X-CRM114-Status: UNSURE ( 8.78 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan Introduce is_iomem to indicate this piece memory is iomem or not. Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan --- include/linux/remoteproc.h | 2 ++ 1 file changed, 2 insertions(+) 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 Sat Mar 6 11:24:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12119907 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 417FCC433DB for ; Sat, 6 Mar 2021 11:40:11 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A880E65009 for ; Sat, 6 Mar 2021 11:40:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A880E65009 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=AyDsiLpiyPedXldPnd9aI+MmL5EJ+gUCQKdTEt5cv/U=; b=l/4CstS3FdB6WfDd6UqFvTC7g acr4ZW7BROL8CsuVG9nE9rBKtNZKJ9zo1mSP5SnO6eKxf1IEPlmrOZb738nA0WvoIXS0gfTqgRc+W bxHyczL+gC9yj4LxkM5PXWPE0N4+J7KHDpOW/Mn2OtIVor20jKk5/CBT2LZHNCF25FkXWCWHVxMZb DsG14xg0C35+0YiDP3eg5dgIOXehXIboEwzvD2Ky29/HzT7lKy6oeWeZ0WaohG5FKe/M3t3kjdDat fqgOU2F/r8phhdJnTqyT1Vo7KQhhWGY0n55OUh9t7dazmwG49a+4ieA8tIb1Owah/J+jXZkL4EJOz fYuolKmUQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIVGK-002tpk-JX; Sat, 06 Mar 2021 11:38:26 +0000 Received: from mail-eopbgr30044.outbound.protection.outlook.com ([40.107.3.44] helo=EUR03-AM5-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIVFz-002ti3-Qh for linux-arm-kernel@lists.infradead.org; Sat, 06 Mar 2021 11:38:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aUMI75vlkOKNmMkiBh+nnBu3waADfpQ/OUXo8M1iYKKZdOiIglqsdDM9K8hXT1AHGpKBh5vk/7YXUyOHKaUaOooE6LAv3QSJ231C0sGCvTEzB06fkETbMJwCoE+cWEv2zvlcCHTtVKUzTxPaHgZOh4Phs2N3pnpJOrg4IDfHZvvdTPQK/5lXgFAzcCk6W4bNeoB4htNZeXob9PrzHWeoMRlHnbyB1Gxi6I/fHk2aZ7ROvHF9SZmPyPxiLVqKEnCSh1rGJUjjT7iUBWmDrNp9ScrGBjPlXHlcBIrXxq+ALHXiII6E6z/JamH3DdiqNTCaeoo8GddkxReNZTcx+M8Gdg== 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=Ol6QVuaOBP3qc6nPs/N46uXd+XvZRg7dwF69dRfDEuw=; b=R4G8V0Tp6snZth847owpbWkY8hH/TDFKe6FW+9HTOgAGXcJqLpmSWJ+8fLXN641VLWjYey5JCchTMGzCUAAXjy1oGR0ZEi7StRXk8Pwg6ry8L69VDINKFoqPzcRB2Wf+cuI8ZCRJjL+9xbQG+NyCrooLirkAxGy3rJ8s86GBYcObaGecEyD0ELHZ1GpdRldAu0B6BZPKnFEFxNsXmLO3r+VCigoJ58RgzC3PBf1weWRs/13JfaSJ5QAc1v0ktT7w5kT51YeEUBQtzyW78akO9ybUK83RycnsGPvp8WfhLHYXzkFsSHBoSUV7IQBUEeg8kjeAueZQ5ZlM0YdwssVw3g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ol6QVuaOBP3qc6nPs/N46uXd+XvZRg7dwF69dRfDEuw=; b=ChZoePIFrhSopj4DgqNrB9Jwd3C0Bif6Q1wcQ62TIQBhrvdxBGdZ0eazHPnpELf+m/+cJOqSw656R+ZVXxsYgHxa3Je4sYPdL/3iZXIdcM/hKhydXS+Gka7aVT9LSeLjU5Sb3wOaqDlkGKGL3DI1ixyGF+wvJWssGkDX1aCT/d4= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB8PR04MB6618.eurprd04.prod.outlook.com (2603:10a6:10:10e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Sat, 6 Mar 2021 11:38:01 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3846.054; Sat, 6 Mar 2021 11:38:01 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, agross@kernel.org, patrice.chotard@st.com, Peng Fan Subject: [PATCH V13 04/10] remoteproc: add is_iomem to da_to_va Date: Sat, 6 Mar 2021 19:24:19 +0800 Message-Id: <1615029865-23312-5-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615029865-23312-1-git-send-email-peng.fan@oss.nxp.com> References: <1615029865-23312-1-git-send-email-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: HK2PR04CA0047.apcprd04.prod.outlook.com (2603:1096:202:14::15) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by HK2PR04CA0047.apcprd04.prod.outlook.com (2603:1096:202:14::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3912.17 via Frontend Transport; Sat, 6 Mar 2021 11:37:56 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: dffd47d9-1b5a-4104-11c1-08d8e0944c06 X-MS-TrafficTypeDiagnostic: DB8PR04MB6618: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6IGWjybrZJvOhp4gXhfi5pTEE/nL7Cx65FhlwhDvKeZ+fVOdKWyCQtptr1WhvWFejW4XH2rjsPL13W3rJfRXs2WnTPajueXRkDLMjAptvMWT6/v2fPgMzcag53A+z7OKZ6uS0e2J88SW9faZr/pyFjlT2iUa3ms/jOLhsUa0lGPTFKwzWDWrcm8Nc/1zseaKy6y5X6q82il6vrgtsG8pcLmd+X3It8WMV/E6XWKLKIGd+mescXalZ+5QhHNK6EOfAFlWLQosVbyTRCeVZSa9tyc6odQvQAOyOaiQQ+jEzEY0LBxpnoBvLBYl5wepJaOa5wtHCDj+94jy8lP5NXexuFuJmFn67ESpXEJvhVKJBUKLJSF0fxtU/xvutcH7wpZ3uddNqVeeQGXmm6h6tX494VDXs+TXV8tC7EgBwscBr6WVmP7y2/jGuA0pQrc3skR6G/KiWLtuB4bUVQlt+wOWNRQszxkl/xtzk8aMRpmaE+m43FB+Wv3fC5tWiCJHSp2Ao7myzo3dFtZwZrHBENQpkxqQBkZO4QGTFVmUW3kv3QqxNsBS7zfutfHWk1TPWWW4FZhFqKZ5+DrKpalWZdvZuQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(366004)(346002)(376002)(39860400002)(136003)(83380400001)(6486002)(9686003)(6512007)(2616005)(956004)(8676002)(6666004)(69590400012)(86362001)(4326008)(66946007)(6506007)(7416002)(30864003)(2906002)(52116002)(186003)(16526019)(26005)(8936002)(66476007)(66556008)(5660300002)(316002)(478600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: HQHkPehqLgTVVT/SN8kmh7ZDLomRUTVG8GfSgaQrEAmrwVt9UqPMnpfEvdvNrLzT9o+SPEAiqMY0r+LsOC99ZYUKVAPr3kfK8YLgN3l+NaGYDitLCIRVnEUn+Kp6QDM7zI3stdlVVE+hq0IgIYKhn6I2sUhuPS5VhYXpm7O2mWdq+zOhaM6g327zU0pLAEMYOY0CkDMYzaRcrPCiQs/YYvRxvTuFcq+gIRdx7MfdwzNg06S8kFHadwRkhzXHAHCYt0rYAqc86XRP+5jk5nNCWpojv3Yv8nQYLeIJhpLCHyv+qRx3Wm5wekRWQqogmWyb8zIYiq1qqskbeGXLLB81i1Q4aOTz+6PAqUYe2b78OsUVjJ9Ck45F94SlVwtom7XqsHMkTnKopYL4hcc+gkC0znACS9I99uC3Vg1OxD6q+L/98QF2RAIitdGAPqcJOe5r8QjnXKtBqA5FQ9YEAily39bst/gKWNcuAOuZV6eaKXffE3PoXCH1HC1g0HNgOLHc5nH2WpCznKqh3sM8SCvmX01z9kfddz8ZtMkmxcpMLpJhHhUAv+WjYN/GiwOOsWEzsQMsR3OxgYdFAz0H78ZEsQJpxHhAY/oY/ShVcrp2futWs/z5U9ik5eXtsg/bj+eOS23WC30/S2UiHqVvyYX+JvlsIlroYtMg2ReBRp1SGJa/7kjl4b2dHM0GhpYQgPR1mZYW2b5rESZpVbcK5Iw+YE3AjxBl4lQ6TqUKZhYd9/bD2TkRrmfkjTgBb4DnBzISdNCoBl7FsaYkiHAN/HC4+Urj78oZvCqnami4Za4CxfngRjL4zjkU6NBeyRFVV69APm0RQm8/kDRzBCJ9wtS9t5KTXbfvlk0T0ydUJBpthaJRVoRzIH4bwUxSwgrSl2g795jcBuLKfZarLrxGqHVseSqQ/oa1OCXYpkHomzj+569lYKR8YlkyQJP3CL0NN9KDwLwgE1AZYhP67JYiDo1ucGNSKKSiHgBDeNV3dokwwiaEE2pFPqvTVPbWjsCe0ssM/D1SdALm786L/Crf8ffm8RaoG3FnF8iw2E0/2fygjAAV6pNOGuepmTnB6BOxnbcdfrjRG0A0ZnQYMQ/4xEirArSNwYxecIHZKtwMLP6xkG1mSGcZpQkoZ5zYXXNfadyuESWkPaDi0UDyZkf7nFPAvGS8/WzUfCA6osVzzySaqS5nO3k8rzyUjxgzlc0H/NlcmQlTpHBXgsBTYw6PJR9ktKsi/ZZNaxTi2bkQMi7MQHqfW/G8+d5Ly3ZHcALnKNcHb2zJlpPDDPpPOLF6a07lFDmFyN0nQfR21J/8h1PVwGCJUaols1GIvDoMcJNVMtk0 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dffd47d9-1b5a-4104-11c1-08d8e0944c06 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2021 11:38:01.0651 (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: +d2rJeK8418RBkKkUpo2flHbxjdo29HRoyfN4U/6s0WAPstH8NWhMbnAAe1bjtPN+KB3FFue0jqd1+X+/Hmkvg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6618 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210306_113805_763164_3D8E81B7 X-CRM114-Status: GOOD ( 15.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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(-) 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 e2618c36eaab..a356738160a4 100644 --- a/drivers/remoteproc/ingenic_rproc.c +++ b/drivers/remoteproc/ingenic_rproc.c @@ -121,7 +121,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 ce727598c41c..9679cc26895e 100644 --- a/drivers/remoteproc/mtk_scp.c +++ b/drivers/remoteproc/mtk_scp.c @@ -272,7 +272,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; @@ -509,7 +509,7 @@ static void *mt8192_scp_da_to_va(struct mtk_scp *scp, u64 da, size_t len) return NULL; } -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; @@ -627,7 +627,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 e635454d6170..ef85b5511dc9 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 2a6a23cb14ca..3a131163064c 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 ab150765d124..a1df4d7e5323 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 Sat Mar 6 11:24:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12119909 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8DAFC433E0 for ; Sat, 6 Mar 2021 11:40:16 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0190B65009 for ; Sat, 6 Mar 2021 11:40:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0190B65009 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=anCFthcYs+LHEVo0dz7fXMkV1pMbhBwEOjDYFScguog=; b=awKwN5CeHafy9KvlpgrVYZ5/J CJZoNuQQX+0cX4CE/5GirDxKdtHJdb1jzqzaFGLug1RTs5joEfSsKMrP0otuNT/KdZH23SrgTA2dq wvGveZ8gImZt9gebEgUyfOi9uS7mlnI/qBQvg0EH7D713yzNBHzObwIBVzBLF8r3T7Yo4TGIVPArG /io2u4YlFnhQkzMHX27521td3BTEOU2sW4/uTobY9AbJSi77wzZYKYJSub4GNd+dXNTNKXokYeruv IWMxvESj2lmSOA6P1dQ6Bg0CgEhcII2NysIpQmo7ZSUpwlOd0pc7WgBNLvES7tCxaPz8msqNvN/TF vdfvWb//Q==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIVGX-002tuG-Uu; Sat, 06 Mar 2021 11:38:38 +0000 Received: from mail-eopbgr30044.outbound.protection.outlook.com ([40.107.3.44] helo=EUR03-AM5-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIVG4-002ti3-6H for linux-arm-kernel@lists.infradead.org; Sat, 06 Mar 2021 11:38:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k1qOvji5tH5Jsogj70UU9VHrnLSJMMmi5SmNPFH5M/RviMiqENpPAxH1SWleDAmgl+9uUh0RYCqiOd7uRdt5NjvD+gPcnSE5/fOry3ybRvPSatMSze5wkVfzsUQJT6NqVk/NMCC+SWKWSqWApvzEkOJUIL6Zgf8xF8IBUpHYEgSbF3qoW2kLXC7NJ67krQGaD4ShKN8exoUrj4TCnPXgl4+NihIPVp7d1mV0JSDCXGbJdMTXTTv7pg43Fg4wxUlCyeiQ4RsSHtvqClSAB4em/JocdqT7O6SxY+tBk0JZVy30hPANVoQ4wGNlGeL1oKt3ObWC+I6JRqjxOZzZLAhTiw== 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=EM9JIC+yeL3C9WIVZhyYz0R6U9vBvka5aiesdeAvSbw=; b=hx1WPuyhbBzBCbBvVHnd6giWMgfqePhq8/ZQEmE89ykvDBS6Va/yYKl4xXEFgDKKaxNmWQz0zB/WOThwv13WcAUZtUROIothxfYxkFUULALLSTr96lcSa+UYespZj/7yQ38MK+34+Z/D6YPK2fo9GlCwhPN5jTHLMkeURHNRcuyOMeLI5QpSt4dCQ9SIzor+jeVH2MeNGBNqkPjGOMOv/5kMn0lCGybUtKf0LkgZ0d8lbuNP2jqljYRjNvpxZJ44bJLn/6y+GrL0ZIiCwTGyQawts3GsOoxM9VDCpiaW48sC/jcrpExzF1RgJDOPttjFS8YL4Gdb4Hp+mrEC6GfVQw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EM9JIC+yeL3C9WIVZhyYz0R6U9vBvka5aiesdeAvSbw=; b=LIFMyJgDvSWUSaUblCn1dVTtLAFECYDwY3bqnUqG+/0qRE2Rvf/6t9fDJrmOi3aQzzCdqVX5OgOY339nvGMKJc8tf+5+01RLEtcYjySmUw2SLBWYNxtP+5XJnnfUWiAC9jufwTfy0Itu1fE51Dn7TAuqTLoKPYrOo3jBW3o6+Ec= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB8PR04MB6618.eurprd04.prod.outlook.com (2603:10a6:10:10e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Sat, 6 Mar 2021 11:38:06 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3846.054; Sat, 6 Mar 2021 11:38:06 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, agross@kernel.org, patrice.chotard@st.com, Peng Fan Subject: [PATCH V13 05/10] remoteproc: imx_rproc: correct err message Date: Sat, 6 Mar 2021 19:24:20 +0800 Message-Id: <1615029865-23312-6-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615029865-23312-1-git-send-email-peng.fan@oss.nxp.com> References: <1615029865-23312-1-git-send-email-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: HK2PR04CA0047.apcprd04.prod.outlook.com (2603:1096:202:14::15) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by HK2PR04CA0047.apcprd04.prod.outlook.com (2603:1096:202:14::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3912.17 via Frontend Transport; Sat, 6 Mar 2021 11:38:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: b93f1065-af2b-4fdb-abc8-08d8e0944f34 X-MS-TrafficTypeDiagnostic: DB8PR04MB6618: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:989; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pNJdyIPg124UedVRni8Adv20hpc4Rx6c8Xfkh1dlzlwm+JcaYlSqYI5NhFyzgV5VYpULDm0dMoR9ed7bMO0hSFscCXnbaTmcNj/PhG9exzMHtYOzg1LoTby8g14NBJc/nn7eAEKKepd6cgNS01D/wG2rBxPSutntPgR91e9vvKwLrF9qLg3Jxd38Th9o7aogFiCDsNEvSIgZMFBpnjCPUPe2OOVREg9nAmnQ40Qct6PZpMqh7ZSHtWEdICy511tPa2n/m1xYdfjqo0QEFVnQs3l0ovNRZvS5Sz6alhMfl7V0ENlhkqSOJIwJWKwa0+e9BbnI1tO+JmmWHvZz4mPkpWoYhe4ijruSiINRPkMv6uVKCPtweVcuiOioIHvOO9BAeisjwDVJdycOw8k0Zi2NoIw8NeCfk0Rzbb+idnSV2FxfJRP9mP+saiF6PV4p2k59noF+JXY5XbI6Dz6Dk565zszs8IdWGGGhrwSPYQ5yhytQadi8ziOin1UNvyklzQb8k5OWzZet5sPk75AcoqBuF89KPrPMQKyU7LItlYPqMAXFkUJo6oFX+c26c4ueG4GFoapoxdNRBHTt8aHt1Pw7dA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(366004)(346002)(376002)(39860400002)(136003)(83380400001)(6486002)(9686003)(6512007)(2616005)(956004)(8676002)(6666004)(15650500001)(69590400012)(86362001)(4326008)(66946007)(6506007)(7416002)(2906002)(52116002)(186003)(16526019)(26005)(8936002)(66476007)(66556008)(5660300002)(316002)(478600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: UXrlqeElva/1UXOjdVI1aGbJWRrk31LqIfXfnX74AFHUPLPynLy8jrNW9HsIryIr7v1ZYPaIcb+PNasLu0KIib2/1XKT2etsUsa4XwQhxKv5UrEe20DxOrE9VLOSAuFBssTeVxdXpohAei5bRDBg9dAMy3Vdj4+6CHI1cBy3og1Nph7NPL+fTne56HDk6O8AL93Hs2lGGwhoB2oHSTVdbE/okMs3HcIjfXkXMNu/7sSt1Fo0HPcXHgLUNTKyc1ixrovzi9RskAg1mQpt/+aWqa6bzbYrWyWSnyHQrNj5vBySpmpzTEaNYa2rjfBecv9+NknOftJioX+377ppOI+/V/AZW28x3lbvmWAs/4joUrYCF2YpqV0WURLS3d0/i1btN08N+p5nbgts/7vABq3lTKUYYblmIzX/YKWv9k7TtefV68Xtyr/3q4+uriCwfpi8XHgUTVlZCE/bmmSSPAUn8ji3ogm0E6VwrgfS2vqlAyIXPkh6CBOLAyUFJBpkPtIPEz5GGMm/8dSq3dCG/2colysmLVbN251Vyot8Uj+lcS43LATqe3G5gSpcpBQH0yWMFn02A1q0RDscL2LkZGuMeutG49YR/g2440Mf5TsvXxJ2eBMjiSuYVxBwWVkrKw0VUc75wkNFMfQ/6FFHVR7mLtyQTTy2wN0itlVtzF3M3TmA2XkCD4UQwYWaEVR/FC3BGlkXzUE+D1odw35ZkJPq8oKGOAbpyQAGF54T2GZKtoS07iDFhj4YQyBpJiC2CMvs/VFpY6RFGMVUI4SNDnZcidzbxRaU2wUbLeXnmh/TWW37D6Wp2pyTDeT0dF0AorORpS8nqgrRteUzeD4BkLtCXG7TELtf0MnR1dS6bph4yU7QiIoy0iv5eTyf1rzYA+Fdfnr5qR2SVb9NY8eSr5QhpQ02RXrpzIngK/yRAf3jzY5eisU8cjHwflNz9As8JIfK01Srqvn0udBpJvTW1eiWeLscgx1JHDuZvcby577MfOa59urCjmjFhcvTF4WpWTc3VG61qK4fia3LyN1oAxJQt/91KV65AyCgJpjj9EtT5AnLnhnPQFisll+NsDSVlie+hF4xxZ1EawZWT5+XOlHQbcvZNvG8IXDtYB3OclFHKw7fCOAsAjegJhNK1lcaRDyUkIH9g/hr9RBDcM3vIuQh/AGbUFU9MH5UiGNQbHDxNH5Yn0g3ACFPin8mS/8GRA/O5HixqqgTEjkGmBA1sMRUEouo4LD1Frk4q9JWE44RrIXCaFyWgO5yKDx2Q1L+cmxsru/CODVSNy3ffUAXHD/cn0r5iT1m1k81OggyQg7QOZDqXT2YrXcnSkKPJFXlhFMH X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b93f1065-af2b-4fdb-abc8-08d8e0944f34 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2021 11:38:06.5436 (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: SzZvScTouuo2d8soOwWXTRd1XJSPOX7tJa1A+WqSm2jyhphWLljsiHWSrrtU3o85tgCkfIzLbkyKdtD9vTmIiw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6618 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210306_113808_318887_1E34692D X-CRM114-Status: GOOD ( 11.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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(-) 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 Sat Mar 6 11:24:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12119911 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 652BCC433DB for ; Sat, 6 Mar 2021 11:40:44 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CA38E65017 for ; Sat, 6 Mar 2021 11:40:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CA38E65017 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=gKaTbHcOBnnA364m5GauAUUxnq9SeuWoYYnqDAAlIhE=; b=A8FCdzqiCff9fiEJWsvPuTkAh PWGvHNmKoeySVRzCcHgSoPpfEAK6GBVkCHHFLK+OZqx3gkCNhAjcM8rldbozd2ITfafPQQh717ayV 8/O95AUHg8n5Izbtwjv9fkSLkf3ThEN6/yZqeGxdhEfhAa5wdkiU/KJrm885KH9Q7vZ8nKrraouV4 lSNMcYfRlwQSGouwU8E0y9FZiFmEv8Gvce+TL1VOid+sxn51Rh1OEIN1ptUfFQcjz/2H55xknFvaY ZOodeqqepsRbn0TGHly+2Ibu8m/UvxgXmjxlhPM7P/zO3pQpNKv3Sl2h4azEDBlsyNOKhigcWn9ei iH97Y2OtA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIVGj-002tzU-An; Sat, 06 Mar 2021 11:38:49 +0000 Received: from mail-eopbgr30057.outbound.protection.outlook.com ([40.107.3.57] helo=EUR03-AM5-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIVGD-002tmh-IL for linux-arm-kernel@lists.infradead.org; Sat, 06 Mar 2021 11:38:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RLa4VmYqrWoVCGkcEGEopF9j0Jjn3dXjVxWKmetfYDvMdpZNZinOe2wlC89DkiMN1AyHiB7mU49GEF1Pp602PUgbEw8IIFvIzSfonbZVflvxI55h3PxbUknYXAasPUHGaS6bFGo+zrP/T9ookzDvNmmbdfswcC5YgR3Xmt49gyDc0UB3Q5/e8pm7bcvMjaaE3bsD6g2RvPgPinE/Rq8gBCZop6O/M0QTEK02iO3CnP9Fl7WGvtQXWChreTokTpmvbipUEJRhpwuJ8vOLwfokApmAPDNJ/aUHQd2REpL9/0RuE7DdN6gqW7Z8T/eOghkwvdc7fz8HuQAmrUE4H3lucQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nJE0Ov249gPUdtT6ZeB+lf9+Z+9T/yJFkeTd4I25VJs=; b=mfIaMJ805RdFGw4UlDfAKf6ChBFBw9YSv6IJhYCx9e9/DNDwZPomZVAkE+Nb0OXvF1BxFIiORRvO8rw8wlujSsgNLrqsXpfPY7SdMfJ4WR56C9picG6SBPxuc8xeldANgK/ccoT+rDSbADo2xGWU9bvpZOXhn1vCScvoBx+5Stxl/geujGs6QpQyRDcgdDuSboIvD8I/3NXJUklUCuJSff+4DKJcdIvSa4wT8CqW6vU3KZNnkR02zpGBsmJ7xp+/numEKSdfJ90/n2Ty3nx6+G8A8ZqUDKsWORWdlZ4GGTNfcu4i8mEnS5Fn6jUCpWkam4XRDsSEA/tjb/nXy1V3jg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nJE0Ov249gPUdtT6ZeB+lf9+Z+9T/yJFkeTd4I25VJs=; b=gt4GVwrkM0Q1JXS+2YNh/YAduEbOml7p9lYbgnPVdtGDmCt39IQIbPPCeDQ7FRxiAyJ/JeOqZ2NjNj9vGOg/s46wukgjxSYlvInuhbGbozjSJgerCghfKe/gGC0o8lGMlCG5gVhAovcJ4eof59Cedtbkog8PSNCwtOua+Gkt7SE= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB8PR04MB6618.eurprd04.prod.outlook.com (2603:10a6:10:10e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Sat, 6 Mar 2021 11:38:15 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3846.054; Sat, 6 Mar 2021 11:38:12 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, agross@kernel.org, patrice.chotard@st.com, Peng Fan Subject: [PATCH V13 06/10] remoteproc: imx_rproc: use devm_ioremap Date: Sat, 6 Mar 2021 19:24:21 +0800 Message-Id: <1615029865-23312-7-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615029865-23312-1-git-send-email-peng.fan@oss.nxp.com> References: <1615029865-23312-1-git-send-email-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: HK2PR04CA0047.apcprd04.prod.outlook.com (2603:1096:202:14::15) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by HK2PR04CA0047.apcprd04.prod.outlook.com (2603:1096:202:14::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3912.17 via Frontend Transport; Sat, 6 Mar 2021 11:38:07 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d0927e6f-c1b3-43c7-ac9e-08d8e0945284 X-MS-TrafficTypeDiagnostic: DB8PR04MB6618: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:849; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Fupdrjoj6yyVmMMGc51CoOkknDKF409cPtLVuqCpbiqanEBN0dAxtH7H3Y16MOvUxtgXDGHTs3MHKgREMVOdnGzvHYqgJPXGDBGosM1UFzsQYJbi/u0XZYJ7I9kKR5QYavmfMl2OaNzxR3Bu2MGE7mc3Pt/XGuqvfFRahck84Iu4LkyOL1kccBjtaaXWJgVLNuhQY6Hi8M7M/Ie/2Ga19egG31zIm+n1ly18E2uUXNe/wHpx37x6xARINPMqhiSfzwtNhD+iSEhUXRKwgD6iFKEc3Jt1W6TTdMbtGggc368V1r8Tz5Dyy0ZGers2G5gYvYNdpuskAmnssEXvT+ZGdL65c/UVlK3X5AMUMikywj89pxWjwzZXrEXZoMpOTqU9/BbH9+LQ2hRaCiTAhOHXh+tbALsR2s7Rp5whrNCYnYnsQsTo59XhN5bBhbm2uAHZEYRyFqGWHr5Q7M+av4Tw52UaO+YcXryuKy/UUnI4FwGY6oEwxhm8Z51SLoRZ/pOtBEOuTIOQSx/x4iBJVK2XDAeJ8/CYjZMTfifzp/ETig9iDsj6Q4XHZyjpL37SUbeT3nY2/RDpW0gWzSLx/5Gc/w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(366004)(346002)(376002)(39860400002)(136003)(83380400001)(6486002)(9686003)(6512007)(2616005)(956004)(8676002)(6666004)(69590400012)(86362001)(4326008)(66946007)(6506007)(7416002)(2906002)(52116002)(186003)(16526019)(26005)(8936002)(66476007)(66556008)(5660300002)(316002)(478600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: zEEUYS7EuPYq/uBuiMd7Bx7OI9ZaComeVXz3o+pn6FVv4mob+W3sPuICJ0ezVzN9eOJQ1zWtpzi/e6OIzml36qnuQ4+WxRq/PpU39wzgmIjR+Gdte0AdWt+ecgUT2bpYNp6RHvcFu9DzMryw4xz8VteiJwTAnOekt8XiLSghDJ5yx7wIJTMRIMPpTDFdWu4tIDQuCschrK3Qm9WicApDj3Rr564/SJXxRzzOVGwl7BW3rLgmfdi38aLo7eJ3Q99zCei79w7KIM6h81KtlURoTz7oiALN4UnSXnqtqFTQBugpJEC6vkMTkPuOPKxwwfcJ9Wu8elkKvZ6Wl2ie7B6pcpebKh6mw0NZP+updQRqDegPfXVnI4wtLMtQD+LY8SfxeRSce3E74+6XPQw7+uLGwmRtQuI1qLWTK27nlz/StATY6lIFbzVBLGVvfOJfkUoGKr8V23L+i1uXOit7B1BGMnVkyzdPZ2gX51NUq/Kbr5AFpiePnDnJQK0Zx6jzjqZT12vuO5kvIe+oeKEAb7KFmZlZ2G1ztQdizOGhsFV5qfkerfTL7mkvcHPyepsKCLoNE9S8OgyAgaOzjbLQqmj1VeHziuWvyyd2tu9gPjdi490dDuK4JLgLyOvUq1zi3RiQKysYBaXKJP0hmz04G35mp8tvcAiIP1W4EKIyDnppEuSI0EwApbbrN9XL4G52x75KRKuFcwKMRdUYnBfMV9s+Eyj7GN2W/yICQS4faNhV7H5gzYLD9+7kuRw27SEB9OoKaMxnNxEGXchyh5JEjrHam5NLt6Osf0XErEf/7V07zkVRxOD8/+nO34owOgK9COvnQQnl8MVdE9nVwEGMTlz9TxSW15DMHSEcpwaD/2Xbkb5ZplrX6Bil4q2IGqtDE7k9MczwBqj0OiZYdnKEY5dsiY7l6PRghC/oKVhNZ3U4ACYJ4BCaz/tBkGHjaWdotTwyGG9YY/SqTNTa/U6aaDav+CLv3fypwDxDD5jYJY/OCXJ9a8x6Vk/ViQ5OmXsPtoRskgEnTptUMC1hmv2udWS0uorLdmzLGGUs9HyaOTgHzlVb5I6JtNAy0Bg5F7zvbfCK9tmFRI2CtIsNlUrZ07i9A6qmGqEOlwE+3Bpl4A2ON5kcQEvE8dBbG3B7twXEdjJnJcFtLTF8fzMegLBitpqn1LmAunvW+fVIyzESxkksRtUt+oNX4Q1XZbdmGgDYZ7ZY/9FCO9buNlSteB2cSYaAgy/6/oSocEUrapafMByvQHjle/fYB8xidJs/C84n9JRLjCGZiUUCpM/0lIu1qYCAFOUgOIP8F9uPKnfCAAPaJkYTM2SDUMEbpZjripJrmjtW X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d0927e6f-c1b3-43c7-ac9e-08d8e0945284 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2021 11:38:12.1151 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: OYMaM6x1Qn6wsQ1w7gPmsd/oKgEwKNx2X4L014e2wSgKELgELYmtgqSYGv01UHrYPrgRWbxLjU/PToSc2C+J4w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6618 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210306_113817_999122_2111B329 X-CRM114-Status: GOOD ( 10.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan We might need to map an region multiple times, becaue the region might be shared between remote processors, such i.MX8QM with dual M4 cores. So use devm_ioremap, not devm_ioremap_resource. Reviewed-by: Oleksij Rempel Reviewed-by: Richard Zhu Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier --- drivers/remoteproc/imx_rproc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 2a093cea4997..47fc1d06be6a 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -296,7 +296,8 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, if (b >= IMX7D_RPROC_MEM_MAX) break; - priv->mem[b].cpu_addr = devm_ioremap_resource(&pdev->dev, &res); + /* Not use resource version, because we might share region */ + priv->mem[b].cpu_addr = devm_ioremap(&pdev->dev, res.start, resource_size(&res)); if (IS_ERR(priv->mem[b].cpu_addr)) { dev_err(dev, "failed to remap %pr\n", &res); err = PTR_ERR(priv->mem[b].cpu_addr); From patchwork Sat Mar 6 11:24:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12119913 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F2E4C433E0 for ; Sat, 6 Mar 2021 11:41:07 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A804665009 for ; Sat, 6 Mar 2021 11:41:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A804665009 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Du05bwx5lR2v4gVt25jrDgS/oRYWdHXBvQTK8fqC8C8=; b=YW6rZ20LWlFRSVAqnBa3zQByZ IYbeJdzztT5tjzDNBd02SSZs3VVieIfARM9zS0NTmbWfBwY0lN+aZPF41y0x7Y0oX/EQ93tiRdmor 2Z+9rG2zgEHQCUeSqkoC4cL+bNWFeuBDCqVn/30RWGKirrB8tAfVI2lFb+zy6e6Zw0VTtTHHfl0Q4 UKagUBW85WTTT5IZpFNfyxIqK0joCRN+Mc9DvBR6JOsV9nSCHWi89/PtghnflMfgDTtz1YWdlLpR/ qb2Fo84nV8aYSOz7RoLYcaGup+EK8uNrN19qb4gEVDkSW+j6rhH2mCC2EtMgIrEVocB7uNtJZdfmZ 1Aq75+l/w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIVH0-002u7E-BB; Sat, 06 Mar 2021 11:39:06 +0000 Received: from mail-eopbgr50066.outbound.protection.outlook.com ([40.107.5.66] helo=EUR03-VE1-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIVGF-002to2-KG for linux-arm-kernel@lists.infradead.org; Sat, 06 Mar 2021 11:38:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bUxkuCG05aZAdGJnPkywPHeSeMQ2SlnQUN4v8YigW/XcOd4YhPGalqwAgCcGeTZtl3/kgQL8VnNBfjiHy11HESXXkFLtQHvGTFJqWrcYMIBudOE862bgpHNQuwQ11zHeTXkDHt97pP1ARxFqs3wPyz+nyBPYpw/xTQvDxR+iP1cJxR4C6oPdVujoQtrIw10ADkZyctYZK2W2KfoGDIVRN9pRvoSgxoLi4rF48GX6IqPRICv65ZjLQ7Xv27R8a2cS9LTWfffq05rUzTpxAcQ/LGz7X8j5YlaJvCYdTo/7ZxV+g42ADieoBl2icYvJiYcSl9UKcefpysdgI91etDNiGQ== 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=wO90q2o6bhxpdxSyK+I0HmaAKEautFRECt/1AuiEMOA=; b=NW67Rao0UOr3DYb2C+INfjatJ4P6V8EbgOMEr0EkkO+Z7K6NkolxY+cOtrkpb5+vskD0GOsLrQvnS2sLbTiPy3aF3zbECXOvUNSHquNAhWj9yHQ5NMtozy5r77o3SI0OwJYHk8tFFllZ3xqQeeX9qJvQCkRI/5PyIb6jIBi+/upYRVMQxOG6Pv1FKvpWaCSXUN59b+CxZ3JOA2iFO3zfugbprUwnyFQJyV0bM6IciqUU3jxGh/VvMj1rXpd+3MddLyTApxJrSw6oEP/EAcWKAOej4Vs/EmPgSRvdriSk9JiZktLix5pTED1OFYB1TuQjmoTKQGVjn9ANWftF0Hirtg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wO90q2o6bhxpdxSyK+I0HmaAKEautFRECt/1AuiEMOA=; b=QLfBA1SIAQy1OVXc/EEs+AxshCRy41M1+sYY9HEQGCZ2Or53cBzpwhcMc9lMBsqlPPl/v6PJJAIN3egJvrr9tP3E8Yzmcx0g9XbbW9OBxf/jdYQ9XHxAbLogXyszoQjev/X0ayWu/wFrt7rdVXccC2yJpjCe/B4T4Ll5G5aUSu8= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB6PR04MB3016.eurprd04.prod.outlook.com (2603:10a6:6:a::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Sat, 6 Mar 2021 11:38:17 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3846.054; Sat, 6 Mar 2021 11:38:17 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, agross@kernel.org, patrice.chotard@st.com, Peng Fan Subject: [PATCH V13 07/10] remoteproc: imx_rproc: add i.MX specific parse fw hook Date: Sat, 6 Mar 2021 19:24:22 +0800 Message-Id: <1615029865-23312-8-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615029865-23312-1-git-send-email-peng.fan@oss.nxp.com> References: <1615029865-23312-1-git-send-email-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: HK2PR04CA0047.apcprd04.prod.outlook.com (2603:1096:202:14::15) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by HK2PR04CA0047.apcprd04.prod.outlook.com (2603:1096:202:14::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3912.17 via Frontend Transport; Sat, 6 Mar 2021 11:38:12 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: dddfb550-213c-4e16-6ca1-08d8e09455ce X-MS-TrafficTypeDiagnostic: DB6PR04MB3016: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True 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: CTPNw2W19grU3KcEFeZwknr+HdP77oC0Do0aastxH9rwNt4Ukx4MahB5JZzslD4CuGYYkMYf7rJlWEbpm3nL+1tEmNQcGTRjn4zRA8yBiKAC/wxtCd3UvgKruV3bn4idTA8vvj8qJDdJt0Ri7z2gE2Cj6KV3phIHR+KdNJjDV4SVimQMNhqccF4sCPjFKLtoHa6jp7QRwWWgWgaNniUmelC1vIEoyhsllVzZMsqHveQujg6kGXEwYoQt4sMxGM+vzie1zcaXLK8CKVTwGpuyPV3qSHqZPwKjXUKbLFDAU18GO5N7rR/hzoUJV6I9i9w7KZO3muX0NJF3St0B0ELqTC7XlFFi4pb3MIMHnbz0IIS4+tok/MF+UT7hn2dZw+sKmDgtiDtUjSoPhMwd0u4G9wPdRWvSg/wgvxDAw3VnVWkK82co29NGkdJCvNCY7Hh4NdzxS5ScHCAfzZ2tBxqnOgX+CztsyDrzCgXyhJDbayvqqEeluseWf0FZyVY2FWPq7zCJ6LQK7n3w1/x2iVI0zgwd7NyK1BQ6tEv1060cKjik/sI4uzk726BuH+4aqoqqaGmYrodp/1ykgvz/LlQmDA== 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)(376002)(366004)(396003)(39860400002)(346002)(83380400001)(8936002)(69590400012)(8676002)(86362001)(6666004)(52116002)(956004)(478600001)(5660300002)(6506007)(66946007)(26005)(2616005)(4326008)(316002)(66476007)(6486002)(6512007)(2906002)(7416002)(16526019)(186003)(66556008)(9686003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 09TBn+foinMJxE6AAVzCuli4PT7q5n0AcSVSN0HPsUKMXXRwxl/Fyor3XvgtnF0DxaodnRKs1hOyYN7pje4R8CwgP99NjDO90xGvrMP0BOqrcRerjOllpSrK8aD/7YHM2RyrPJqbJRaN1yWQywm+VuagLjgausS7k9uUhpVgwyX9HhYTk+uWewyi33d+uLVhK0qO/kIkOHMKoG2UVVusNT1snRo6utqtqImw59fZ6aBBWC2w6lyvX6ByyRc+FajHf4IJWL8k279gV7PnMU7ktTtIDrLTT/T4QpQ2F+eY2YuEit80vH12SKFPEM2pkMPiNvppyqsGHSeYsUiedxYJL58LH0vNLNjd6LnHxy0sKVHqwmmFt7Sh+NaQj0cQjX0T6fm1sa6bMXmmcZQT2ufEpslkGHARXHwGJHNZhhjzUt7Ur3BfcvaDgYKFbEj3P8U75fhmuMnOhPO6bjCZhnyL/s7weckg5GHSEDQX04GlIG8gooFYL1o2kW/uFIEBOi5eEXJnI476TqBcgXsFD2NHWx+Qyihjtau3H8G0C9ZRbtCQN47wYJQk2n0VUWn7LiifvbXaTzf0UhVzPY83UOIHRfVPfUbnin7X9LQER5VwkZQhsFLP2w2KVxKv/kz4kPYInBcNLQ1oGnIQGYae9L/c0UdpR7BgcCuITv98IzKXnhb1/0NHHv1CYDWEWn4VQYk5iencl5J8QhOTmovUKT9IcLJvLYO1MzbyvgBrLJR6yhMiYSIREvii0EkCpR8Sb5JRWqUmHg03QSQLFWPzE5+ThzCBoV6aPP9fO/2QTsOzdJvT9TrsO2kTkiqH11KD5z3unMrA84qPrDZYgkKzWm4uG06tSmFSW+tM4OAB67o+U4ma6Q/OzZp5mmD0z7gv2bCGp1IU0gN7yZyK2/IEEsE7UNZV0rXAdL8h5j2Yrg8maOYlmWbpnIRGc9wr/v4C3BO5UwXgj7KbT4ZNAGsq8d7wtDp2o5gUdZH8uW9WEC/D3ga36NuqZ9yvX+ikcONNR6EJ9qqu3F/lYYFytDGjgTZfF8eUq0brtulnLrg+AiLtzFt3aDk37UopVQzHoy2/VKXuWZjK24h8XXhoxRynPq54nRe8OxaO0MT+Gf5Sd1LhnT82Rs80hrP3GCwL3cVlcr/+aYRAEHj98wp6gPdbxleJER1LTaoYqhcRzfwKLzZfILiKzf5cbAv/f6LukJrFXauiPR9msC5bIecYgVOYdPBoBRNMCHI7UFSgO9yZJDXQAiT0g5CdRUB2R70crEkcWGzlnfc6rlA7zEjGj+6GJjMkxH7XtpFJMfAl9JUS7p+MMhNviC2t69yJEi0Z7F6R0lHt X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dddfb550-213c-4e16-6ca1-08d8e09455ce X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2021 11:38:17.4217 (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: sNk/Q64s9wA8YhfRbWaZZTuv1gEm20UlmmpbDOOirWHoFw7gKMqgMcUo7p93c4rU7D7XWcJxit9mdvaJkJhG1A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR04MB3016 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210306_113819_897644_6178BD53 X-CRM114-Status: GOOD ( 15.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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(+) 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 Sat Mar 6 11:24:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12119915 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2B59C433E0 for ; Sat, 6 Mar 2021 11:41:18 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A7B8C64FEE for ; Sat, 6 Mar 2021 11:41:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A7B8C64FEE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qrEdgzs9YOIdpghkeXxlfQn4B3hUS7edBC0gfejNQU8=; b=HkXDWFrL3Vl4tGGRDNR8a9Kp6 IO+5hh9mvwPKNAkkzRZ6aJz4ov225U4FJhtPQZYn2S4qweneFu0CwqkMcdM27IVOQK8j//NbVcNFY A5/72q3cloo6Jpj8kYZuGfRyhXp8/vG+wSQJDQ0fjEKdDV2d93Q7h3L1+5E1al0DIy5uBcW9QSvQR 7YXkQBiZI06u+9INmqUAuDyCdMFM3sb4Fc/NMq7E4H50q5KlvW0vJlonxUZod6zjcV8WKKOQtsDfA KvusNd8NY/224Ar/rneNVfEtJojsh39f+iCAJUBgcxvHko0X9yPqXSeCVujRHA0EQ/yoDB0cDp0PI OOUMjcA6g==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIVHI-002uEj-4j; Sat, 06 Mar 2021 11:39:24 +0000 Received: from mail-eopbgr80053.outbound.protection.outlook.com ([40.107.8.53] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIVGK-002tpq-Qx for linux-arm-kernel@lists.infradead.org; Sat, 06 Mar 2021 11:38:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cMZTbel6vYBiKxpW77sLuuR3Fqs8IkXLqVh8T4bXdCZ4h1eVap9XcDDja43brq0LSpP7nFRnRicPy4vdK6dmAFTEp6fBQe2l4XPBU+JuzFpO+POqrQYLgodVKfOM5vrbq0AlIm28CUTqJQdLuAXZy814ablaRtPgP5Pgs5BbialR9c2qieDe6S1qY0hvCKogJ14wfv25OXfQG2vdgt/8UyPHbR+OEUghFkUnKV3M6wCXxRZlPAE+QiR8XOJ1zjuLJUsgBiBv6mymTnWLDRyQbM3d8zb7UlSbOuzAW9d2HBmqU6Kr+6HWVVf+Hvkye8Q1UF/HY+MuRlzpjY4TjpjckQ== 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=hO1+r3GoanYoQG4pSNUPhcwcRzBSJ+js42Xn0O6ntMc=; b=FTEXTMM21dctpuUWJayKEXufi017rOXVNuKj/hGYU1U9NU7R5Qo+YEa+vCy0UMkiXDNSRZuiUQKczhqWooQLNUpmgXrPNGevRIycZesyJyrThGjKg+v7+79MPZt4dXuf1dZicDrpyHIAiEe7JXZyej5TzGBNDPczZyUZSJLYeGmlvMILmumAkrOYkmEQ3fH9ESVnvDS8rLrc9A499a6ceQoaVNFx9IV5cMtF6Ib5tf08Cc+qn9u2ZK3gdJ+rWEc3BtculiyAEJEbx6FvLy/Nx9d9rS+FC9ix9FgVJlCdeCAZclIA4SHiCUjpgoeNh2uiaEZexR05eow69ZaBeCVWzg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hO1+r3GoanYoQG4pSNUPhcwcRzBSJ+js42Xn0O6ntMc=; b=exehiUfqBDrezHu9+s3XCQ+SWOx27cjJE2dn3VrF+hxH4SgJtTFMARoOq8Azlbwp5DP9DThmdaH1Q0qmOOLK9pyt11ietD20r+hZSEUtmRd2zHQzLrZBNk97kd0Y1pgnQ0LdOICHqbZbbamgni6IEfIxoD+YKSsDG8T/Uu3fsGk= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB6PR04MB3016.eurprd04.prod.outlook.com (2603:10a6:6:a::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Sat, 6 Mar 2021 11:38:22 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3846.054; Sat, 6 Mar 2021 11:38:22 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, agross@kernel.org, patrice.chotard@st.com, Peng Fan Subject: [PATCH V13 08/10] remoteproc: imx_rproc: support i.MX8MQ/M Date: Sat, 6 Mar 2021 19:24:23 +0800 Message-Id: <1615029865-23312-9-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615029865-23312-1-git-send-email-peng.fan@oss.nxp.com> References: <1615029865-23312-1-git-send-email-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: HK2PR04CA0047.apcprd04.prod.outlook.com (2603:1096:202:14::15) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by HK2PR04CA0047.apcprd04.prod.outlook.com (2603:1096:202:14::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3912.17 via Frontend Transport; Sat, 6 Mar 2021 11:38:18 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 3722b901-19ad-45fd-7347-08d8e09458f8 X-MS-TrafficTypeDiagnostic: DB6PR04MB3016: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True 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: nWAQNFSL0cA6guSWZmo+CI0bTdgeBPs0qU8e5dFFcBmwuWcqticoZ/zV4hEnwh0XSoNDyFOAxtl1Vr/ZxouPXfTw8im808c1AroPGTj+/6kigoVuEsvTDP3ImM0lOm/fveaTsc7MZcwjfHiOhs2iNsCoKfSyfA05OzNPtEOM7vtUayHs/mpSDQd1YD5uWiLuVV2jM7KHvUCnKNALFXTyZAkm4yUKiD7B6jU/KdV4vxwrUodm/2+pOMj4VlSuSzFAbzOYo0RdewKzeVOhmpdv9RnIspuKM3BPi/hareADFEdJUbMbjZZH41pI4vW0kP1QgK12ooV4GSBo40D/sGat8GewlMu+tHVVCt2r1zaoZQ5bHNlTEDCytn1/zhfVXKjebJUUP2692BIZ3Ntrdg+YdblGHf2vfWJnWa6xPJZ/VpipbxKhyEROHYiRScOnwPq46JoauB5/Wuzi58qLH/b2ZxvJzgqg14m3us7ZKUhgc/B3U0VBApghDQX9JDb5zJO7x2xmgueXbmkNDL+y8oErzt/4oNzYsbv73RjEbQb3gmvFnVSeJv6HCwHYigJaZHkcfPrSclfAy2akPUl2zj8Nyg== 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)(376002)(366004)(396003)(39860400002)(346002)(83380400001)(8936002)(69590400012)(8676002)(86362001)(6666004)(52116002)(956004)(478600001)(5660300002)(6506007)(66946007)(26005)(2616005)(4326008)(316002)(66476007)(6486002)(6512007)(2906002)(7416002)(16526019)(186003)(66556008)(9686003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: MO7gjz4MqzwfAZ7kFTQ9bNX9YPud/c8r9NZ2rSUXKaH+AqLeQUSuU52ce0hL1hmPz2PuRMCIXE95fh4qJ3MGQtRGyhBP8JoA/b2xVzgKIHIYP8iOi196nssEbTuvfozGdWe4KZT1PQaH8bV6QS0ehP5PIIkSXNP54hwkC1jPxmSCIu+f8EZJowf2krC704klwNatYdaKkf6b3Yae3I6L9b3zmAWCQuF4yHei38U2Oypj+AFGOk3JsBPTLOxy8iFbRM7GMwXsrcvA96cVkG02tbgQd1LnpjLKAqemVg5HFgnrT8uStUnBeni5MOsNP1ZCORJly87G9cK3//t+cr/RMuu4I/VTsS7yBFVZPn8CYgrGr2G5UThX+72faJo/Y9BMU3lhAG+GBphwqYcx26YYUP+b70BASp3EfIPCd5JcxvCExq3XXiRxcht+4qRQZP1tirvqI2zJL8IpXetEu5XmQqoD51/BFU/zIBZURpOW0hAolnrjhNjwtL520XzHAhpwe4+CTIv2ihzX9RzsKH6uLLZ2yMu2r5YPdB4e9cykdIbih9WCokP3kC5a4LqX0T+bnklVgFjwMalD8H467Wx0jQdf+H9rNwIn9ILBv++1ITWxS1fj2LiljEv/VumGDhAqx1EyDSmFaXPo9EHYEi2OX8jo29I9eJCV3/+J0YZlwA/oFp0UtShS36ysqP3N98xZMb7I6ZA6RhozvpQ0GcLKMlYPRgfuNaNAQyOT+28MG5weZayAsHypA+d1G9RiIWrdg6v62OSceTsQPcDEmJj9uyxXU61nSNZbtw8PvkvVXqoJ9irnwsnD5b3ByZO8ACW9VIteLEI8LzAUdAER7OJ2IhybMqgKWjAVl4UbB0x+eHR6Lv2gkFBfWlMeDx2+idOG9M8vRyCUiyw1gx3UErtjPuc/P+lkLE4h1lsTGrpozg6Nn58x0DF9R8zaisFzZPAJqXrZIIyVDg+haUNp+Mv0hUKeQsBX2GLFDGxVLpWu6dVRH+JzS5ET43q1r+cnGcAplupFfBdZVu6M076PoYt/1VsslC8FHG1KUDAhTJ1KkfFueUiLNa3U3DWDh2da/pcHDtJ9N3/JgL0J0VbhKGYWEvKIsJd2ITJQtII3nUb5mPVBqewGEvtz+xr4m6pAdh0BYf+yUKE7BhtVzrIcn22oDRZ691s3WaibaxcR76pUPxLeJOfr8oHylNPxewy7N0bZAhxlD0IL6K5g+ISZEQekfZpJt9TTgUPYO4JfsEcn3wKcpXMMrikV2CSJ+5xJmkmeklRNXpJjf9pnQ+LNPnO99uAhYU5LdXLmwL2K8o89hcRiksziOXPtefNejxqn6Py6 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3722b901-19ad-45fd-7347-08d8e09458f8 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2021 11:38:22.7153 (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: 9jrTGhjY055Ob+M9Z9woomQhSX6A19kwL1tq3EDKIY9ugUT/qQ7WQy9YRbSNtaTpMyRL5pHrcCJBERi16ecOTw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR04MB3016 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210306_113826_034658_110FD984 X-CRM114-Status: GOOD ( 14.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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(-) diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig index 15d1574d129b..7cf3d1b40c55 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 Sat Mar 6 11:24:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12119917 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 672D5C433DB for ; Sat, 6 Mar 2021 11:41:32 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C9A5665017 for ; Sat, 6 Mar 2021 11:41:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C9A5665017 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VVkGXWdnekZMTtyPRnWG94YyGZre6aXZ+/hyosbmucc=; b=eIMTPGfKJ5SCeWMlWPqeJF2mp p6MVvMxcVyDe+ZDIeayg0Vq5uCPOntlxVn4owVuF9rzp7eARkeFUOjAPcLu/iwFwqlBFGJz6dudgH 4vp+aQz68Rsv/zdARdGnukEgaF1CxpQ3Ev0DgF7EcQxggeaT+u25ui9rYhkNzXvPD2o9EZkboaj1F 9eqif+COsR8+6Fhj3gJRMafglYw6gesYGiY8iqwtrEGyBo8v8LHEO0aBfT5dLJht4Sdt4xDWUD9WN FNVLuUw1OvKFyHTVJHvNPRbDxaIyG6DR4eA67CdKCDeOOZn1s6GQuH+hbY60NrUNfAtQTAlvewtbZ Nk559yXhQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIVHZ-002uMk-Gn; Sat, 06 Mar 2021 11:39:43 +0000 Received: from mail-eopbgr60081.outbound.protection.outlook.com ([40.107.6.81] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIVGQ-002trk-2L for linux-arm-kernel@lists.infradead.org; Sat, 06 Mar 2021 11:38:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ljGxP69S1g25FYS02xjNsOLx42CSRsR545JxW+YXdlk2vuhimOW7DKSt5BVDeBW66FtLPzsuJ8a4/cL6BI7WgnB68/hSO9EbqHQQCMn8niMJxjMerT3tjdEU6trTaAScGBQHz9PoBU+CexJ68NYb9S2vyIQoOl2Izi4cGK53+TrbfamnjiUFlSodqUrbMsZs+yRJJ2JufhaxbqUiRTHUF6ATW19clEf/ZJrULrv42q33GQewCgRGBoO9kKB9hDLfu+Wi//4jqpblRG56T7mmUeIJPRynt3ByJ+lJu3cXbTMCn/53vKgJEcU0ZGsFMpvTUN0QEBeWaey09RV8KUPQJw== 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=ylGtRczgykA3LROiqvT5P1IRIRg5xXAemZjMRiCZwqI=; b=QwrFqGFLiQukB/QYjb0ogzj7qZSGRaUziUfLpMZJcT50Jl2WG1hEpx5QbIcxFgpFydBSUlILLoJsEZNui6S1Zv0EeQhIR/9VRsO7a72JbrlWzm8yWZGKxk9PYBBncFPwi9fouNvwUjmZL7Ws8KgSVzAGCwjO2J37chNTQkEqAraEwNNNxjNZtBpKhjkDuWiAQWWqRhTy6CzjbyKgiHyaZnRHI8MFza2X5j2PvPGA2bQ+Y0FBcfDOuW3xmoNQe7JctGIJNzck7fbfnkldgxHnkkGMH4UXjMNpLzwJ7urWOFFx/z9mD8dxcvPguJNwWZfmKU7WYgzTuggsNJ1WqTvz5g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ylGtRczgykA3LROiqvT5P1IRIRg5xXAemZjMRiCZwqI=; b=RDOFaQPxB00pgq48OfTONTDbvUrL2WqQHIzREMag9+lVYVCo4M/EHLLWQg2uAT9K4f2ICKQjtQcJ0RZir2h3jQaJKcQgV5029OAU1A3bX7hKmbpyRo3VUGEU6OzxKkQs0NMLfkUjN6BWCSJ2jIXTHKATCmu2tY96Ebeo5oAwXxU= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB6PR0402MB2757.eurprd04.prod.outlook.com (2603:10a6:4:94::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.28; Sat, 6 Mar 2021 11:38:28 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3846.054; Sat, 6 Mar 2021 11:38:28 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, agross@kernel.org, patrice.chotard@st.com, Peng Fan Subject: [PATCH V13 09/10] remoteproc: imx_rproc: ignore mapping vdev regions Date: Sat, 6 Mar 2021 19:24:24 +0800 Message-Id: <1615029865-23312-10-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615029865-23312-1-git-send-email-peng.fan@oss.nxp.com> References: <1615029865-23312-1-git-send-email-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: HK2PR04CA0047.apcprd04.prod.outlook.com (2603:1096:202:14::15) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by HK2PR04CA0047.apcprd04.prod.outlook.com (2603:1096:202:14::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3912.17 via Frontend Transport; Sat, 6 Mar 2021 11:38:23 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d3515234-38d1-491b-602e-08d8e0945c1c X-MS-TrafficTypeDiagnostic: DB6PR0402MB2757: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True 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: 1Suq1Bp4OnT9r1xDp3N54UEHAQC6fF6TWZPq5TuW578Ns/PdclgpQIPU9VUFW0sN9DLbuVcx+TH9dB4qUoCCx8bACjxIat5e6mci29ekPUTMy2rV5Q/IMVKKCbhuLkvodnpvjVjyEiG4PSrfPqrl+BpeS9W5TlbxdCd09EXo75jHMge037mr8PUMyCT8GKqT8hzo6UD+zNNdbtzMWXkSv/sLH8gac/A3lK/Sc73neqfGT3BolpIt4XE3S+DHY0fqslBy23+59WzCSksQKkuYUEdjm+nl+++8JhNTxzV4ZnCWSn/cwL1iyP/CLxLt8hx90yWhm1MbWhGX8jhA3po+tlJWvanwN3GM0wVK1DnQ69pQhsdEw2PNfSBc6GVRCNsGzzz8hHFcp4LTTtvoybZiHG08a1KW7NZhzIrpnftY95nJZ415l5xTT5K8pAVys75eBxbJ+YhblKdFhLlS0cR/lhiz4ytj2XsOtjq36lzEFrQq5YwW1QwqF7Nn30GlGzzDilP5bjBQHoki4THqC2tKY5nxmGyIeYGJoH93P6I0ApBWw972x/SkyhhKWlydG1Z3L39Af0LltgfN5QP2wE7jBA== 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)(376002)(366004)(39860400002)(396003)(136003)(346002)(66556008)(956004)(186003)(7416002)(66476007)(16526019)(26005)(66946007)(8936002)(9686003)(5660300002)(6512007)(478600001)(2906002)(2616005)(4744005)(8676002)(6486002)(69590400012)(52116002)(86362001)(6506007)(4326008)(316002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: GeheP+I+HkLKq0DsWbGdLXXJX82mmhVODmaKWpmJl+2zR/NwNz448xX98AmgggL65yHoALwI3fIjgF6gZ3/Jp5nzIYlGM5CTDyslu/0JA3KKqCuwPhUFlllC4xAQk5aVhYPgP+y6xTRRmYbqUZwGXUPTn/D4Vv98jv+eYfzkFKY9VY5nUbIBePbtZGyUoMFW0yIAomUiLg6rMPK4MN79tH9qwAF8dBpONPpEAXeJuDcu0hUjVT7XUqZE7NjsxiohPJthCa0lTLvSKD8QEtk0owOFE7ogoUgzC/nB57puQ+VTQY6qNuAYkr5tfVpFmZlcyxF6G68Jbeesv1l/j4C3Tg2dX1rLUerLoE8pZqgWUShKcp5N+8ZarqdSldX6ZOEk0j3Pbg7yZIfiTZAsD8sKlLmN7ZZUACMHkGOS2M7BlqrOoJ+aJVGtogdoC6y5sgvWQbQnqAkN15JIxrbbL4xtEUr+Pryjw3lrEO0OSOiJvlL83O+Xpj0R80AA8ePu4AZrDhgrc8+oP6WVh2aoMTRkpYI4njrT8ZxbDvMk2eb63pfXC5zXJu3g6/FWkH9Sbbv4TeEaAx/mUQGMaDYhVqrAVAUHbkWb1cI9ivY26VwY5JawuICMJWyiQEl5/puHvsTXf9/iGIY4scicNgKBHBLW1TNan22KY24RI45AFTVmrakX4d4+PEES42utLegNH9THIOdBR4KsciXAErbfDgmDiS5NtpESDhnF/0CYB3YW2VX1GrXtIpwfwPpeQfIpn2RuIBAZ/YLRoGtGwDluQ+Ha9i04Ef0jo1D98buAZu1IYDHdOJ1ZopsSsOxDwSgUvaW4WjsCufe34lPPienPYKOc5YHAaZU3/4GQlKGqJ611d/T1hLGnm7hzAZicdvngSaUZ3STeCe0GdHsZpXYIiaXz6BIs8wLX9shqJV+uzSJehrj9exNh2UicPAJ5ofDBna5/w12DlC68pmGdmMEtU2lyRAimaUKr7jSiAg2tCCv/q4PXKb8P2OvrbtdGYbldl3U5XP7AVMxpfp6whbXpKvfEdbJZx9C2mAZV9inoSjMW1JeNKpZNq053kN/DDVzib13iLClSce9p3E2oTKLTGLoFoZl9kRuEvCLm/5M2aG96orxAL2suizWhCZp5TSCEbXWPxPEv0Vcehh79mXUo7/Inz4h/2s9/xfHkOfZBVkiFWYJpr0y9yhBBHbZv41C3H2BbpNqB4KqpNZfoYHyvrpTmvqJ/o/yos/W23K8VomddexTQyzRu9dN4G7Qoxq0xilLS/nl/geqiWS/a41goaccs8NpVn/R/gS/EiCoXUycLzsz+uOmkP2QsoQ2ZNdw0d5I3 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d3515234-38d1-491b-602e-08d8e0945c1c X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2021 11:38:28.1798 (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: /Qz9UDj+oyTCpltncc8bp1AUGq9hAnfcCqsKBlSeKWSPnA0swXTCz8RzjKpXvqZzlqONQt2yH6z4wGLkiwgkeQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0402MB2757 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210306_113831_462616_3DA387B6 X-CRM114-Status: GOOD ( 10.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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(+) 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 Sat Mar 6 11:24:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12119919 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78832C433DB for ; Sat, 6 Mar 2021 11:41:42 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9E1D564FEE for ; Sat, 6 Mar 2021 11:41:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9E1D564FEE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5gusAlzIxuj4lbfPoFTvHu2UT1NzffxEH/pVGP544rs=; b=Xtnx4hxsko6ivphIdMXtefWBK q3wgwYpKxi3gxVJZZLRpuvxlRuTJ2KJZuUXHxR+C1oHJipzyF2elB1w+DBGk3+A1XbxHEJblB927g LhQeG6ccp3maFi0yObq1arEP4LRgKBPXG1enFi4wDk+RwND9nxBAh3ZQHEWeDGI5DSh090T8rYXjX 4unH08E7prw/QQsgRH+q8s7NFzvObJ96Wy68GY/IKU0p5PdvoxMSX9rKNCoB90vRGydpHTMOerC+v icFKbXVn34J244InjoY8LCv6710ZccWtvQXDwX9dF28wkQQfp9gHKiFJJFFWEEA4aTmsf9VWjt7b8 QDfJJ6zVw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIVHv-002uXr-Q3; Sat, 06 Mar 2021 11:40:04 +0000 Received: from mail-eopbgr150089.outbound.protection.outlook.com ([40.107.15.89] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIVGV-002ttm-NN for linux-arm-kernel@lists.infradead.org; Sat, 06 Mar 2021 11:38:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f/RvwtzZxW0dI8OpKbrLcXXg2cWpt67ZngW2c2vcINhKE1z9jLa/nCMAHyV2eCdLCJoL8xWQ24rVoK3Sc2daiuooXzXhbrcNixZQ5AOyLqri8qRChkUOM3caZJnNCphczH9WZzz1y33UuFGdgRpZx3k66U2Z/VMHqvb7+pc1vooi2wV0R96C+I4dYfSJEOPoX+QkpSaBJaF6j+IbUAwwkFceRfBj4mtTlffcrteQbyiGAOcdrYkuii1S8bNv+pKcAg7l8d4AmkQs/JDuPG76VG5fsIWhOau0dR72pYKhu7lz8iHD8nxR+stQ3dWx+GqzkeZlmgfHQrM7l0qUmWpW+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=ZfBczTf+RB1EWa5ibevseo+tYbxVdHstdpl8p+i5B30=; b=cOeUHdkyvNh7wm5P5iQm3xxOChRayK4eAsZevvwHL2DYHK4hKwnvGpaxfrLhuSq/9yveLIbZfFD6ddwNTyQb8450gSBseb92ki9T46bMjzZiSsym+HnEfX4ws8rkHEWlvHDAOZYLTdhesA0E7hRzu4YZtjJqqf69pQ66dZihFUhTv72Kh8145Q45MWDXIdZNfa47hPjqM3Qh8Rh0JOiEA8obAjSrL8gDq0+VuL7ydhJhQ9vjKnb4kFkSah0VJv9T12s6Ed1TkygVjvXqF9q+6cZjENlGtUsQ6ySNh8UGzll+eVv6IoAB/Hs7jXy0EYkxgRhLIln2KUqV99bQZR0JQQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZfBczTf+RB1EWa5ibevseo+tYbxVdHstdpl8p+i5B30=; b=GbXRXo/r5hjfyVW07dlrqguwpp7bl4SYbHPpQhHS1ryWApqBbcN+2OHKRrl7tBLdsMuxiPTcKgykK4PkkJbsSZEhUqiQJ8gisWzpfL2i+edTTTh/ckq7zfgn4h915rUv557szt+lHUCFLvAFZthNmLG8L9PaDnexTpGgZShzrCA= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB6PR0401MB2373.eurprd04.prod.outlook.com (2603:10a6:4:4b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.28; Sat, 6 Mar 2021 11:38:33 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3846.054; Sat, 6 Mar 2021 11:38:33 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, agross@kernel.org, patrice.chotard@st.com, Peng Fan Subject: [PATCH V13 10/10] remoteproc: imx_proc: enable virtio/mailbox Date: Sat, 6 Mar 2021 19:24:25 +0800 Message-Id: <1615029865-23312-11-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1615029865-23312-1-git-send-email-peng.fan@oss.nxp.com> References: <1615029865-23312-1-git-send-email-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: HK2PR04CA0047.apcprd04.prod.outlook.com (2603:1096:202:14::15) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by HK2PR04CA0047.apcprd04.prod.outlook.com (2603:1096:202:14::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3912.17 via Frontend Transport; Sat, 6 Mar 2021 11:38:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 0b858906-01bf-40f6-d1b8-08d8e0945f6e X-MS-TrafficTypeDiagnostic: DB6PR0401MB2373: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True 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: hM9Borsf9jMAWb7xB5NCMyu9F/zyqmaAI+1hT1fkfRLgkSKALZ+/TgdOWhqHG+OtKcM4YC7GOC+idO01MqR3nPrd89VZnngdchem/xrMC1DwfP6BUaLhMTpEVyzh8Z/gLtaOXCH7D/uq+VQK/a/ynsCvfH6xERh2lCw9wnKzrDBfVPdQIdpwyb7UqPIFjbdv0kQe8ejKLQcVpXguMO4BxkCg0BdpK3Wf/Y8ah8s3CNnac3N4COTM/oGgySZMLL2/Ns6SCW7oUTVllbLDmPZqn/SlSLS5VX2BN5KqncHpXHyOcPK1bpm9IXo0LxiXLzYc0+nm+Bj+MELUulLybgoQeKBUww1p8a+BkmP4+4skjuUkugBqKIKCwnQN1/YM+PpBumCQV3bRU2+4AUTd2Iu65g5hIUQlPbr90h9ylpk1ISFSHwzPdVSq4jBTHI+ibcF0bVNjH4y69MBfaBeQSBnI6Rob+7B/4dWND3+gQjM0xFD0tHUGIhOiWHJ7pdl1LK21SlBOtAPxgUsUXR1lHaGCxz3is+aEmRmf5CD1/afX3JNAlFo7gVWc8VQducmL4J32EstPeF7oL77NSYUZdoq6rw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(346002)(136003)(396003)(366004)(376002)(8676002)(26005)(83380400001)(186003)(16526019)(9686003)(69590400012)(6512007)(15650500001)(6506007)(86362001)(4326008)(66476007)(2906002)(6666004)(6486002)(956004)(316002)(2616005)(52116002)(66946007)(8936002)(5660300002)(478600001)(66556008)(7416002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: L6FYJjxst8AzslkhL7XFKDLpNWSZjng4kLyMSsUTrTqDJIekEPHyZbGR/cl7w/dYF55R+FPnECemggG00l7VThLixFSHtI5CK5PcAyDtEpr5pwFMd8qzi3EzaY99imL6gdFwWZmLi3awgkR3Xbtiq8Id/4YTghS5CZCd7XCuzsvlpjxJZ/cajH902FjTg7s9S1hviL/NI5TVQlQ+D3d47oKyLuHxBssO59BA6LMiKQnyMuUTF8Mkk1+3zHRk7VLd9hvCWytC/SY6uCqJX0gweAtOGuB83/KUt383CjF9dzCKtE11OGKa6C7uhL7rn0W/nWt36/oVNKx8/63clZi5TkBlTw88T4kcGQciCg2a2UJu38okEn/WLfUUxamCkXCstbUu2nfrObQ0zj/E/fb7i3+Wb4euYUt/rf3SRq8AOxu2yUQDDxll8HKd/YiF4HU+NRjLdwbM/1VzMnmauZcXPiR/wun5Qx7+bKdyk7fgzAJSh2MlSCUZ0TNpWo5Y9rfKtSgrj9kPJ8EEPanglNunTcX5uRo4IvL+etP6xQoTZneGSNoeSdDac9wlXEBINhgD5Iy4I4hr3rxFzCAi09CXq0kNstLfG3fiW5DFVZVlRnkD0l4UJWsyFpK7MMAiV7mZy08OwLd9/DmrNGc7sXmthVrWB1Jg+6FRyU4xqH5aGgFvTgNhbRc5FhRZ+QJU+4T2WPMzqJ0wGH9Pv5wy3ZkvtbAWs3SLtzOhGhkq1rUv4yjAcqjoj2SnnfcBWL/7oPsuKtvQ/IPnqt24r0tp78k1cwOgKTDJdhOw8GmJ338Z33s+M/1bmOB34yuWvPUwFKGBcj0xgpm5eu0uexflNeNIl2xexdGahGxJYAFsfZtnxvtp1q8hX7p7DI3sAt7PCDMv+T3TCeu9sYFeqX7Z3dGC4eI1HfL7B9gWKyRfHPZ1JSUiBj2BeobBnZCkSxqgKsKvcWJG30PQzY5/H1B6KOPfeKy8qkUchCegNO+9yGvilbC+MYqxYIClLgM6bx6V1npTPyCgV823sU+pUR0gMu1YGXP5QwfH+jsVqS7J6UARfFE/DCmdMIx8QDXMEnU7M0ZGVYZLkh7sIWpSPa0RzONkKxMqcbMrGBB0M/VaRSLwd3zQrmwIVFoEZKvgyhIWAu4rZ9/TWu52hJW0RovlTJYjtLNYYkX3FLufahX3Z6zNku1/yT2a+7RRofe0SzReGw/w6zAkWI3sgH/z+IMBxx2ryH9VUT/Agg8b+9TgF9M3p5VbIGmUnp1FMBMfkywCvf2vfoKBHMJKxDMFb9AQq3lKIkdjGeUMpr9ImkmdnTLPGRtp3AbuoxAroeuOedOijD+5 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0b858906-01bf-40f6-d1b8-08d8e0945f6e X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2021 11:38:33.5754 (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: QkKJN/gAK/Ip7r91DrQm5BtQqiMl4Pj2Hj/u73DWRKYA351SQb8t30P3DnxR1s6Vp0rBD5sfNQif3njR5TObkw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0401MB2373 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210306_113835_909401_1CF7A0C8 X-CRM114-Status: GOOD ( 18.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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(-) 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;