From patchwork Thu Jan 21 01:03:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 12034057 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.9 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 87596C433E0 for ; Thu, 21 Jan 2021 01:17:32 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 0CB5523888 for ; Thu, 21 Jan 2021 01:17:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0CB5523888 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YZEntgS5CgS6SDa1MPoH2L6YM5quK8jNwhlobHetRyE=; b=Pj75ZkQ+rlVeCMmYSc0kNfBO7 YlFy8hZFC++YdXO8dFKDY5Vc6+W5B5XdcWlfr8chrQ+0jZ1YIiqwGnzMwnVImmFTs4x3AaRDjlDsp pmfdjLXx9jlhU3TKW3zLUfIzcf2uAfB0ehnIUdP/SjcE58ZOuJc37i8deIyOHP5RcqyKGZ2CIzDGk YHIsFhNzLfO15AgXyKAtumgv/c5kDeEfMUad91i2vEJnIGP8TasvRWBvYh4niT65xHPloU4LKchYV 4W86/gMRuHt7NVQspKkguf7iI767YfvbdNsyb627Uh0tQAWmMxU919vaokdhRV8PetD3DMhGSRIw+ en4Z86G8w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2OYO-00088T-6T; Thu, 21 Jan 2021 01:14:28 +0000 Received: from mail-eopbgr150082.outbound.protection.outlook.com ([40.107.15.82] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2OYH-00085f-GH for linux-arm-kernel@lists.infradead.org; Thu, 21 Jan 2021 01:14:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MV3EsXNJB6YeNvioY6RN/KNF4D9sqT5pj8pjuHkfIsYnO2pTEh6AL4zeyV5ncO7TKwvFOLPGQQ8l5OgtTtC2EPGdZp+p6BqHKAHmGzcEqBVz9dKutsiXinOnW1qQi/7SWg2vS/QCY9Hi2WP1XyuEm5UAeaz3bgz9HVhdrZbaKKLC/pqGZfeuq83RPUXO2v5FHrr5p3jMPuPDg6NfwYfOUn7ggmfpcBYnry1xyGTpa3INGlq7YsGg+lOOGIFzVA/hxH/NodlJFeS2+Uby5XYnZaL1gNvt9EGojA0EwOuJNyCGKJ6sJegrvM6xTy5zLGwpbdmOaRgEkFtRSMrmt9XAYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gDE+R7Ch/mAEdmQ1FO6tocOoj14gW072NHZg/cEzn5o=; b=GMFeeXQSzlVHspoiYngFDHFHmhqqlU+PQS+XZ2naZxgjjYxWg33NCi1QlUPWAplRso0MBpeyB5c6v88NaRNuQcD8Pqv7ABev/THfC9/VeEalPAgzuGMBAdkl+m8QYAH+U8LSdY2xfAYmj9VsK4YDZnk6DuUigR29niMrZmEf9vKsR+4hNLhcM2pqxpmTtxsPKNNMq7MjvMkcip+V/wgkZTwn1EOdSYxmCGT9VnElW9AaoWdNW4CLRwABp/bSLlW8l8tQhLMPiEqnFOmRInSVZNkYzfD9ZBiL+I8MgEhfduIk6NhvUcM34IGmkQkfRiy9gmmlNMZqtIDti0HGIXVYlA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gDE+R7Ch/mAEdmQ1FO6tocOoj14gW072NHZg/cEzn5o=; b=AwrBsCPaqn8xFZu7pLoLUr7hlM10gDY/yg2xhDAjM8+cETjX2fDZtfhbs/M5C9VVlUQM398ezq4Vi8+wQgrNGLboFxKk72D0emXx03T7sYFd5B55Qcdp0nqUaAsYqlMk44sxcDz2tFz/8wMO/m65QnAJyHDcM2dFGWerQ14pp08= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DBBPR04MB7930.eurprd04.prod.outlook.com (2603:10a6:10:1ea::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Thu, 21 Jan 2021 01:14:16 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3763.014; Thu, 21 Jan 2021 01:14:16 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Subject: [PATCH V9 01/10] dt-bindings: remoteproc: convert imx rproc bindings to json-schema Date: Thu, 21 Jan 2021 09:03:26 +0800 Message-Id: <1611191015-22584-2-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611191015-22584-1-git-send-email-peng.fan@nxp.com> References: <1611191015-22584-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SGAP274CA0018.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::30) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SGAP274CA0018.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3784.12 via Frontend Transport; Thu, 21 Jan 2021 01:14:10 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 4519ec66-9cfe-4952-b580-08d8bda9deb4 X-MS-TrafficTypeDiagnostic: DBBPR04MB7930: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: D0AgSx4pyUjnO2wjN3s/QaHwnVC5WK1qu1ucJID5HyYzof3rei1/77kQrV2mXbuAzij2GZnqIdtLhKrgJiyQ1iRglsYBRbrC9e6WYOpiYPRYsXIITSyBj1qlhuhCnCEzO3/FbJ8W4d9vy5JITDkqQufurxuAfdd+xR85F2/hwZ6h/qCHVqPSBSHUFipbw42T9s5On7GYw7rmLow/2uWCU6HpuLKeZnt9HvriucslCZOIcnvenXw6fAPDm0n6VJjH6rLiool5BUaRE6ywScYMq2pv83FCM1GxoNuz0Zu+5a8PmpHqBNxwQ2U/uatgkJDPj3eBgV3VFuQNhwjby/CkGLd8gVsHNKTUzYjvT1jKN+hV30ImV0KLOob1Cw1g+wLuAIEJtoxoqAChlLfjqvINnGomccUqXz9VmziyjneQx13NNOiw1+6re6AfVXgR6ZWWtm2QzS+fRUHUW830u81JmdmGR09bySLDVjqymmYMcUs0OLngK5epr//IoH78UOk/DO2mH8d+dDmOao6U321hoQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(39860400002)(346002)(366004)(396003)(376002)(2906002)(7416002)(6512007)(956004)(8936002)(52116002)(26005)(478600001)(9686003)(316002)(2616005)(5660300002)(6506007)(86362001)(4326008)(16526019)(6486002)(186003)(8676002)(6666004)(69590400011)(36756003)(83380400001)(66946007)(66556008)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: FyU/9c51Fxpl0IOkLLzqc9asY0i+/4vpa8iqVY3SBFGd9oki3V02K1dfyS0fKISqc6M1VqENimMI9H2ojFdejBr2oFBxHJ7TUTA7RpcNpuGGV9CyMcLM522Ec7H/zrhQipV+kKTLqYpWhddEeKJeNuEhQfkT0FK/ZGQR2/YNqL82mrSZeSoQSEzU4m/NJEvOP9ufksTw9S/MSIi80ESulFOplIZ4TzYETMEOsZtnO+3ojIwPlN7jMYrnctXj8zLt/mgKkwUI6YPElVH4KmVlpVqkDmqu7C0lAafLqfRK2Milu1xzDDBb1ydBsnMLAoU41jZxdufGB2atMJgcuky9rZx+P91egyxrq31SuZJ4RVkv6wgN6rQsmnwr5kN6u5rYlHXcy2NWZY3wF7xRAiph4too5qxvZ65Eu8t7+2W2Hm713maXChit3gWsgQiFoS20GOcHmx2vRwUr4Az5vJqKgBmNBrfAZqnI/ZegyU0ELqMxIfWNh1oBqD6l7U7HfKlKYQrj4+d5t0ze+DBvYQ2+MiYqJ5Eq/jC7P+6BLsNayqsyxU/HVWkbLP/sUpPg7y+Wmlg8hcJyHuekLjOsTDWTp4zzB1OrizGrZMPj4eNMwYdEQZfY0LT2tj789Hc65BmIkW0VIMXo1s0KEC2ZWmNy6VcJZdzhrpJ4FjmIlu4dnpKfyGVCTG1MMUYoSoQux/xu3T9O5usFF1+ZX1g6Az7D1ujonSORlZ4SaTTrihB1iQ+3YlqtqUyJYhyAFXWh9kLQaqDSlnbNgm2O8QME+hc4HKy7vJhRgF5CtDxj/KA56+Fs+JFSK4A+ak/kR+rw4x2n+2U954tq8j4X70x6siu7v+TCy+XAB224VovgX9Xctn1h976I1xm3HUNhKWhUdRJblzXz1gOyg38oRzNb6lc6O0e6k1JVXjVELBMCXVN8ohJKiB82lwSRpsBnC5a1zRyvONdPvm76Hosf5HGNL7X0WXnIv0glNqARefZLB+03bfcSf/o7XillD9Ey1phJnFLi X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4519ec66-9cfe-4952-b580-08d8bda9deb4 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2021 01:14:15.9341 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0HQUQXn1TEm17oRJ8G8KhwWg1CvyJI3C663W9/Vv0dCdNOzTV3FUjXEAJA20enEhgG8q6Nuqh2eXTbgKEXMQow== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7930 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210120_201421_557235_9526BD80 X-CRM114-Status: GOOD ( 16.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, patrice.chotard@st.com, paul@crapouillou.net, agross@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, matthias.bgg@gmail.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org 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. Signed-off-by: Peng Fan --- .../bindings/remoteproc/fsl,imx-rproc.yaml | 59 +++++++++++++++++++ .../bindings/remoteproc/imx-rproc.txt | 33 ----------- 2 files changed, 59 insertions(+), 33 deletions(-) create mode 100644 Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml delete mode 100644 Documentation/devicetree/bindings/remoteproc/imx-rproc.txt diff --git a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml new file mode 100644 index 000000000000..bce6ccfe1538 --- /dev/null +++ b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/remoteproc/fsl,imx-rproc.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: NXP iMX6SX/iMX7D Co-Processor Bindings + +description: + This binding provides support for ARM Cortex M4 Co-processor found on some NXP iMX SoCs. + +maintainers: + - Peng Fan + +properties: + compatible: + enum: + - fsl,imx7d-cm4 + - fsl,imx6sx-cm4 + + clocks: + description: + Clock for co-processor (See ../clock/clock-bindings.txt) + + syscon: + description: + Phandle to syscon block which provide access to System Reset Controller + + memory-region: + description: + list of phandels to the reserved memory regions. + (see ../reserved-memory/reserved-memory.txt) + +required: + - compatible + - clocks + - syscon + +additionalProperties: false + +examples: + - | + #include + m4_reserved_sysmem1: cm4@80000000 { + reg = <0x80000000 0x80000>; + }; + + m4_reserved_sysmem2: cm4@81000000 { + reg = <0x81000000 0x80000>; + }; + + imx7d-cm4 { + compatible = "fsl,imx7d-cm4"; + memory-region = <&m4_reserved_sysmem1>, <&m4_reserved_sysmem2>; + syscon = <&src>; + clocks = <&clks IMX7D_ARM_M4_ROOT_CLK>; + }; + +... diff --git a/Documentation/devicetree/bindings/remoteproc/imx-rproc.txt b/Documentation/devicetree/bindings/remoteproc/imx-rproc.txt deleted file mode 100644 index fbcefd965dc4..000000000000 --- a/Documentation/devicetree/bindings/remoteproc/imx-rproc.txt +++ /dev/null @@ -1,33 +0,0 @@ -NXP iMX6SX/iMX7D Co-Processor Bindings ----------------------------------------- - -This binding provides support for ARM Cortex M4 Co-processor found on some -NXP iMX SoCs. - -Required properties: -- compatible Should be one of: - "fsl,imx7d-cm4" - "fsl,imx6sx-cm4" -- clocks Clock for co-processor (See: ../clock/clock-bindings.txt) -- syscon Phandle to syscon block which provide access to - System Reset Controller - -Optional properties: -- memory-region list of phandels to the reserved memory regions. - (See: ../reserved-memory/reserved-memory.txt) - -Example: - m4_reserved_sysmem1: cm4@80000000 { - reg = <0x80000000 0x80000>; - }; - - m4_reserved_sysmem2: cm4@81000000 { - reg = <0x81000000 0x80000>; - }; - - imx7d-cm4 { - compatible = "fsl,imx7d-cm4"; - memory-region = <&m4_reserved_sysmem1>, <&m4_reserved_sysmem2>; - syscon = <&src>; - clocks = <&clks IMX7D_ARM_M4_ROOT_CLK>; - }; From patchwork Thu Jan 21 01:03:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 12034063 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.9 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 86A39C433E0 for ; Thu, 21 Jan 2021 01:19:23 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 203C823719 for ; Thu, 21 Jan 2021 01:19:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 203C823719 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ydhI+bKHDwIDaZ+egPvh0B+OX6lH0+wS1Zyey6O3eWo=; b=14qG2Aa943mZTmBwpeyJGDauQ ksUXxs/qyrYhyBX8T6qCJzo1jYxVXIJlA1kmYmcMaDLpwk0qbn/bLOgnYEUhtd2pCOnqn37lJRwdv Qmbww2Ss3bqqWDEIwsfJUA3aFf7rYd0jyT2jupLNzYa6DW+GFl7BMrKRPz+98oPn/y1U7C1mz4FzS mMyUg255Xb9yt0lUGsxKS0RwKp5bnhHdCrsPIbXicI6Tu3CZYPIJAnhtR+PbnTP8k6Amps2BFM5AJ to44IwCfTzOqD31YH/k+r6REtqVc7aGBdLDBAXtlirF2U3pMVozc+Xkxb2L62kx/HfWzHFUHkOgFb LA7KkxDsQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2OYT-00089V-Dh; Thu, 21 Jan 2021 01:14:33 +0000 Received: from mail-eopbgr150082.outbound.protection.outlook.com ([40.107.15.82] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2OYN-00085f-8F for linux-arm-kernel@lists.infradead.org; Thu, 21 Jan 2021 01:14:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L/zHfKPT1w12CBmVxBCKSHhoPF66XCjOX5fYb3bSu0qtwsbKj7PiYOBivKlnfguxGm3yHTlDDbNudGqDqArp34il905oDcbTaOGepCfLwgRn+rMKXT1nK3ci7r+8YviS6WOOG+a4+WJne5S0vyYsIW1qFhRIB8dxfjZ0gkNdMLyclkwS9eF+qLgybW5UmgpZ2P5QH7Mh0OUHPkE5ly2mSgPN0B22PS1VNA5CsCzLJIOfKnbKT5KxxfJkKIs2BSIzHgU4by8DdohYycpBN6lx8UIe66pfspnRS+KkVG7k3B/M8Ae0xeyzNPNrtYkrEdLdRCHr/1AfaAekdC/7mRfpuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BNa3y1Ol5DGHpCFE597A58hnFNyL4kwr4nxF+dqIanc=; b=lQkYM/KwkhYTUe2kplQLxPW8gcaSQFbufGlioObmQs8X38rddV/r2N1xGg8D6DSivyVM03TKQM3D0cOgm3OP5tWxKtbsjghF6YGF/Pg7OPDFCp+4BjpSXDr6Z3MXVMqJkm/+8I7Bs2/dTuheX9iaGjnFaXhekslMR0DbZh2jivfP9bBV4VIfLtUbXAiCeK75gw/3sqH233/zyx/s5aAHlyQL1wm/ZU9wJn2Y9z9y/r/YmsbFAuAGnIRUBlpgewGxIKqD4SRiavcMciQUHFtHEGXIuDtFojDoZEvwp6j7aPeTRwHbezYLg00a6FOC8vq1D5dHBrMPeMluC0wSdUBe9w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BNa3y1Ol5DGHpCFE597A58hnFNyL4kwr4nxF+dqIanc=; b=rzyAjOoptxriTMcWZ6IUyRA//3xxTaUNVtBJK6AdZi3V5souAriL8+LJiF4UFyJC0rU57UUPLMrwhiXh+Hcxw/toqAibZpJhrIURhB9rwbXktGtyWhKb1+oKwCyH/UqvZY/HLdbZmHLQSKPeuE7MpHU3/+Z96DS3bj7iSF4hIbM= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DBBPR04MB7930.eurprd04.prod.outlook.com (2603:10a6:10:1ea::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Thu, 21 Jan 2021 01:14:22 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3763.014; Thu, 21 Jan 2021 01:14:21 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Subject: [PATCH V9 02/10] dt-bindings: remoteproc: imx_rproc: add i.MX8MQ/M support Date: Thu, 21 Jan 2021 09:03:27 +0800 Message-Id: <1611191015-22584-3-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611191015-22584-1-git-send-email-peng.fan@nxp.com> References: <1611191015-22584-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SGAP274CA0018.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::30) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SGAP274CA0018.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3784.12 via Frontend Transport; Thu, 21 Jan 2021 01:14:16 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 79d41900-e997-4ea8-e589-08d8bda9e212 X-MS-TrafficTypeDiagnostic: DBBPR04MB7930: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3383; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NwZhlgnS4IRlmUgENF64W0DyGJ9apLw0xrJNE7WhlWQvh0MYBfdbAxZcoqOUWahMcvpdqkpudj58vJQFRXmVTFwNx0ACmCLj6FMqQnT880DUv1pr459XsDAmxOgUyw9soSCcNIDOMxmtBw26b5NyM1TRN7ZjjuVG+fk872j7lgHhiEVrhO8c8aob3I4yau7HVP9qXJoNFlUov/mSqDJ9AQF67tgZg2++9MjwEyiwHVdPQWc3RXZe+FvvsApZ9Mvz7aTH0MdyWG4wb7PIBvYFozSpplf5rT+ZuBYBG6PIjqKfgBi9FxYgOaGUPumhrM6ZOhR0w6aX5kdOsDDjjRckohki6tqzMqJpa9sdUOIlchlk89xKiOtGhjI+mfJohZDIrXez0gj7Zd62p6/spggR5v8gDzRdKjOe0o58zSUDzCZ2xmnbQuZdu1Q4TD0gSEIanZoF4oOUkvKLq/ervEItz5QzhbivGUGK2/LYZzty4FdFmJfxvME2kY3TFSovKLgL/9NV3GpNlrn8ZCNCnepmuA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(39860400002)(346002)(366004)(396003)(376002)(2906002)(7416002)(6512007)(956004)(8936002)(52116002)(26005)(478600001)(9686003)(316002)(2616005)(5660300002)(6506007)(86362001)(4326008)(16526019)(6486002)(186003)(8676002)(6666004)(69590400011)(36756003)(83380400001)(66946007)(66556008)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: TgO+ELnzJHVQ0NZzcKX2YdboXFf17aoJA4POu4XvU6+45yf+kFZ7gWUC+72CfXj9BVpOnbnHcsJLcADVgga8Ezmon+vKA9TP0TdrMEBIGlN4ZPgY7K4iyJoNUC4jM+1hECaq5wb6vpWCdEbjIICWtEPZy7e2i3SVrjChD844LaWzF2vr2kmZmJGc7uHevYpHdS7xdevuTajazXndwGr/oZ1OJxfDMwpHf+eX9w25+v0qTYO5vfk2Dd+R5YWWPnneZ7i9G4rcpfbe2hBTt8YlmiewgJ6cYJ9tnmA5QNabrvQnMQiBXlicWNkc7ScHyH7I7HNzNWlhGSbtrY9Svl+p2Bp+AZ/vbthWXXJQcnR+BtEurjPJ0M981TjrU/OjNMDY7HZHgN8rYxiV3Z2bilEl3U+brw4tUcVviTLVyAfVQZ3vF2UTKaImBIJ8SrRTlszJ5yyEJ9OaoiroMSllWwDO/CSGCy2IC/241JYObIcAiu+2V3nzpWJDwBH40sCgwRXH0Uk+Ni+w4ihFLlBKRzvVxcimmYpqh6c4wZjYEuFBlZkTr6GwnQFLoj/0KbvLOZjNO9PjeEQu45flCnJs/nOnBOKxXcov02wsmL2jDd8BHewCG1Lp87t/yaZ2uM6UGPnZui3ACZWFFpyfwQfK191bf+0fT69W/FTuakMaNb2gMtjzYWwUqOBBxzeVpzC6JLs5m0OVP3MDcdL3bg0tthpszekfnWsi3bjb36P9PePbzj9YokultZ7lzjbKKMMxbelTweFtFPYwS4UTQbAIAtZIHabU127xi+MzYTJbVyhfZGB1UfMejpGqZe26RBiHazc4SyAx52pzxddPsXQMxL8ksuGqICFL7NZa0i0P5JFe8X32Rcr0nQGmeGf/cKboqo2BugGggn26ymQdkbUVjjJyOA2Daa4EiW7KTnvOnV4JbewZJR7hKq1xNo1knXmCOZ05VghSnym5rpFdGX63m5K0BIvisWi0b07mlKe0x5DTAr3wWbrpuJe6GBenuvAA9U3F X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 79d41900-e997-4ea8-e589-08d8bda9e212 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2021 01:14:21.6915 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tQDk2MRDMYn2BB0W4Lcxt6kBBK5YfSvZo01vyaho+iGqp/VTx8/fL+euQ/MWrE/pDUkXBqF9K16VuIwauWmXGg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7930 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210120_201427_304965_CF8415A1 X-CRM114-Status: GOOD ( 14.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, patrice.chotard@st.com, paul@crapouillou.net, agross@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, matthias.bgg@gmail.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org 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 --- .../bindings/remoteproc/fsl,imx-rproc.yaml | 51 ++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml index bce6ccfe1538..7ae0fca24403 100644 --- a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml +++ b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml @@ -4,7 +4,7 @@ $id: "http://devicetree.org/schemas/remoteproc/fsl,imx-rproc.yaml#" $schema: "http://devicetree.org/meta-schemas/core.yaml#" -title: NXP iMX6SX/iMX7D Co-Processor Bindings +title: NXP i.MX Co-Processor Bindings description: This binding provides support for ARM Cortex M4 Co-processor found on some NXP iMX SoCs. @@ -15,6 +15,8 @@ maintainers: properties: compatible: enum: + - fsl,imx8mq-cm4 + - fsl,imx8mm-cm4 - fsl,imx7d-cm4 - fsl,imx6sx-cm4 @@ -26,6 +28,20 @@ properties: description: Phandle to syscon block which provide access to System Reset Controller + mbox-names: + items: + - const: tx + - const: rx + - const: rxdb + + mboxes: + description: + This property is required only if the rpmsg/virtio functionality is used. + List of <&phandle type channel> - 1 channel for TX, 1 channel for RX, 1 channel for RXDB. + (see mailbox/fsl,mu.yaml) + minItems: 1 + maxItems: 3 + memory-region: description: list of phandels to the reserved memory regions. @@ -56,4 +72,37 @@ examples: clocks = <&clks IMX7D_ARM_M4_ROOT_CLK>; }; + - | + #include + rsc_table: rsc_table@550ff000 { + no-map; + reg = <0x550ff000 0x1000>; + }; + + vdev0vring0: vdev0vring0@55000000 { + no-map; + reg = <0x55000000 0x8000>; + }; + + vdev0vring1: vdev0vring1@55008000 { + reg = <0x55008000 0x8000>; + no-map; + }; + + vdev0buffer: vdev0buffer@55400000 { + compatible = "shared-dma-pool"; + reg = <0x55400000 0x100000>; + no-map; + }; + + imx8mm-cm4 { + compatible = "fsl,imx8mm-cm4"; + clocks = <&clk IMX8MM_CLK_M4_DIV>; + mbox-names = "tx", "rx", "rxdb"; + mboxes = <&mu 0 1 + &mu 1 1 + &mu 3 1>; + memory-region = <&vdev0buffer>, <&vdev0vring0>, <&vdev0vring1>, <&rsc_table>; + syscon = <&src>; + }; ... From patchwork Thu Jan 21 01:03:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 12034053 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.9 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 778EBC433E0 for ; Thu, 21 Jan 2021 01:16:59 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 2771C23888 for ; Thu, 21 Jan 2021 01:16:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2771C23888 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TeL63D8bCGgMSAwkzCKJfmrj4OUtLgqGVncUE9rZ6H8=; b=Buiwxjodd+FofagTRZWQEyOYV 34jFUDT306ea/rKeRSf2JSM1jXLneOt2BOB9kQU9W0kuc+7Q8qFhtC50WvzZFVdAHuOAZ6EUt2MUQ aJePiJslthLrzMe7y7M7HqGko28iT91PcDg60a9gl6udK90OHsXPtZkpLT+05ij2eAdKkl94TFJR0 RNZRVHMmTyzF89WPko1OgnWp3LxVDbWNKweoOVOc7m2zjq3EMm01e5xm1EHQE/EaLzv8hWX5DSVnq +DEIeH5jce0nwdYtOff845y8m63tkDWb0v2nSS02Mq4/utPusLrM9XeMc/gXEwHExL/4Yn7ToqACI wlzoc6Y5Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2OYa-0008Ag-2T; Thu, 21 Jan 2021 01:14:40 +0000 Received: from mail-eopbgr150082.outbound.protection.outlook.com ([40.107.15.82] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2OYS-00085f-Bl for linux-arm-kernel@lists.infradead.org; Thu, 21 Jan 2021 01:14:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P1M5EhTcI3jkwFdYFSADZfohZWaA5q/pLCFwlKRxidmZft5RbN0Q4LYfPM4SJwz8gh/+V16XUGDFA0i8NGp7AS+mlqH0R8fzWNxzzQDTmIw8GzgBUfiO7mwZ+QGKTB3YXqhkMJZtt7e8wiV7xw1V3jJk2reRLcJPpTl3p94C3ejqcTRkt90ibjM3M/gjk65sU8/fSBrPkZ+mPYp9+7iyX/LYhM/4YpSe1c72e5F5bvtMgHn0rDIZbDUMjTddbSoskrf9FlTq2Ut73j4ZQK0QKbrTjlKSX7mhHeQwF+ehWeL321tqJWM0rzBoCm0Mu8Nr3Nsk1ygCKCiX0EjlVi80+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yOyXY+Wu7yjAZykW6d3WzVozTOhNuNfY+00aYS59St4=; b=OCCI4XoZmxgQmQwWwU1WEQibSlG11mZq6anyGEN04UWj+ntccuBpOtAz3A+R4OPZkdjdGO9N6wl/nirnKUDYPF5pnuYd/HzaW7UltwdJnqtFrgUd00dEr/2s8HmRyKEhlT6pfoDvIXyKHXXrvm+RquZiYUJUFhB7ueoEz8R5F1uSovkFl85wW1MfQVVwbJ1doIqyMwqXYbdbeL/tKvf8x2JerJNS7FfDcr/p5snoDsGqFjacZsYLoeArRVjZGC1tUwwBK7Ow3pdW6tMr1tb7Hre0aavIBXGvm+/6i2Lg2xzQ65kUzvrmv8097PA6ilXPzA2y4ugaLvwK2hy2ACK4iQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yOyXY+Wu7yjAZykW6d3WzVozTOhNuNfY+00aYS59St4=; b=sjnzV7FeiAbb/W1ATiSszwv+1GsJeSBvvLXV4HdMSll1XQf/DfKUYVZmF1ELC1DTn6vmnAVjSTOas+sP+kInMM9jX0EZ26RuHpu5o32b0twwN9JSHXEXGLh7FZyIAYZIvX87zKrIE2g58dGXFe+nMx2hOABXJlxb/JBxd6JtV/U= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DBBPR04MB7930.eurprd04.prod.outlook.com (2603:10a6:10:1ea::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Thu, 21 Jan 2021 01:14:28 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3763.014; Thu, 21 Jan 2021 01:14:27 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Subject: [PATCH V9 03/10] remoteproc: introduce is_iomem to rproc_mem_entry Date: Thu, 21 Jan 2021 09:03:28 +0800 Message-Id: <1611191015-22584-4-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611191015-22584-1-git-send-email-peng.fan@nxp.com> References: <1611191015-22584-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SGAP274CA0018.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::30) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SGAP274CA0018.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3784.12 via Frontend Transport; Thu, 21 Jan 2021 01:14:22 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 172222c9-91da-44ac-34ae-08d8bda9e5cd X-MS-TrafficTypeDiagnostic: DBBPR04MB7930: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1091; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Dn1ifnbnhZ8C8lY+QZp+REniTnhA+OS/rbAzHsgdO5UUCGl6yDgODocwO/9k/N3F/YvTy0XNX5U4xFNJb4ILTgI19U2jRgjWzDfrTE7f+qkNc80qtxCR3t2UwZFCiTBOL5/QjV68/MbMvwBMVPm6SDpSkqi+eaEqo1ZngdGtGN/grJz6ADNTcPj8jFyz7QmguAfXmpW8jrQGCauCsiE0Atrl1XudhFe4heuEa0p8L2TSKcHW5iKsdP0Q3lLqnM5mgvGUrq1PZAgHXOGSrkco0btl4q7Y6bGxdrCicukSDcev19V6HaCD/zHpSivsiIX3TXZnAwPUKEARuoRZEb3ET/ElruUFif9QiB7j4QPTq3z01Lo/+4Czp6Lff1IcvUelXIZEtQCIphZTokcj2s/PNu4VIe+DEFU/Y0yVM+pql/zvvnyztfMMHybMhnoZYFDQLztauu44ip/CpTpjuJe06Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(39860400002)(346002)(366004)(396003)(376002)(2906002)(7416002)(6512007)(956004)(8936002)(52116002)(4744005)(26005)(478600001)(9686003)(316002)(2616005)(5660300002)(6506007)(86362001)(4326008)(16526019)(6486002)(186003)(8676002)(69590400011)(36756003)(66946007)(66556008)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: L7/I6XfLMUv/j+IEGcjahsdcMonSM/8z4zHI+BCCXiOrvh59BBke9b1+wBUggKMkw0ytn1FiaceFrsgt5l1qpRD53t3j2SQMkh2cN7OfND5eJKAmPU602J0UDXX6oVSQ8BiFq1bFu4NRpwMNzYYi3I1nYUs7ub1w5mE7qbkFeLxlwygtVH6CDD6zC8LtLTyo05uxeYUxy2ytAsCGtlGU3aZQXw/rK2AeqXgyVr5Fu6f3XooQmOcIANplKfez8EFID9XUe2qjv6VY7kVt3jumrm8sXEv43gReRW2m/L8eyef9UsWuiA+agHXejsZXqf2hs31YdORGgTjSNf6YLCkh/J6L0aONBsX3m+DCt7nY3HZNgW86GzX96+DvvkhQzO99JaalyQi+A6oaAkQDYmkERT66Pel9f5DvpjajiEAtMZa+3E1k9X91uDdN7wFjk3HAzwxJVO7+MFu3UdsbMF+EX5C2XlvsTtunOOMQIRD3Dx4xwexO2T3SSjBFaZJe9+YWcl5UN/ElQRCWSwL+fdUZ9WvDckfbfLadJTHLLCXnmlwlQFjn7oSaO7h/AkTIAJ7jdCwcRZGCvOFVNl1WActYv5kyFi55M+k8Iy+n3PlHRAaPwJ2khX10Dhr7Ulw4ogrSUSDDJl6kBJsgMpmVZ5a6Ah3FyNQcd8NVcU2Ho6W+dDpLlZPvRw15s2tdoi8CGM2d4IMdMOjXUeOyGC/+tCxSj+ZB4MxsQWA3tXZkQw7/mnT/1ZwjyoAK0PSSRgTi1Y5Nn/RD6lFVS3nJAa0LwXqNDX+tPH3DoBTLgmjnvamqCM3oFnvBIn6A17Y/mykLXD8BQjWt/YLti6s/MVTZNcdX0OuJP/KQpUf18JsqPBoI9Irj6x8KpfoavoNY2K6EcG+B3ml7emB52v76FTRWxqTmLcGjXumiPYeTqNQFaGgtGhLWKD7zahX2fNCj3VgR5a2TiuVwfdkBP9gh+2EpsN/o4qDTYiCPWxxXDZhXmG/zbXzl20loi8hWQ5mNzGem2GU2 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 172222c9-91da-44ac-34ae-08d8bda9e5cd X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2021 01:14:27.8997 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ymeK+xEF0eT5g7WwyZ1+LzsYK5QoegBCe+h+mPCBr91KOVfoiImByZt0FJ6sgi9GEFPePZxpBg4BNTQkzEAT7w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7930 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210120_201432_415189_4773022F X-CRM114-Status: GOOD ( 12.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, patrice.chotard@st.com, paul@crapouillou.net, agross@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, matthias.bgg@gmail.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org 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 Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier --- 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 Thu Jan 21 01:03:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 12034051 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.9 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 94AE7C433E0 for ; Thu, 21 Jan 2021 01:16:54 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 399D923888 for ; Thu, 21 Jan 2021 01:16:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 399D923888 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wOYxa0btxIdF7Z431lQw/A5aet+YNXI1NnBViHB5SDU=; b=BlAxYR4xJhqyidag2F+vlXm8+ B5Eumprl4nbIk9Q4+7Z8m3gqUy9Gu/bUpmVeKfeBEQfvc6frHc50JKj9WrJcUBIz4QdAGEnpcR2I6 eKxAuqyoo0ao4hrGiHS2Ve3p29Q/0Iga8nhlDisu4YYpMOrsceGUkAZ1klhAnIOcq8u3prqllWpPM mMVSvRcOOEaL9u0tW2joqrVdXaH8wiuX3lO9BnvBQQBqhlEpI5PMq2EjeF+VBoO2ECezInvpPGl60 v8apgQAdzuU3BEziZQOt2GS3vNkiRFf15x7Ps/sdrxJQtQDRhIFhlERPEOm5bya/oqt56SwQ5mHV4 8ZveDjtJQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2OYg-0008Bs-2p; Thu, 21 Jan 2021 01:14:46 +0000 Received: from mail-vi1eur05on2075.outbound.protection.outlook.com ([40.107.21.75] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2OYY-00089u-0t for linux-arm-kernel@lists.infradead.org; Thu, 21 Jan 2021 01:14:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=engV1TSiCglWHJiDX+ITpYGCLH1IJWKbWEqaSapG32ebGCoPOWONj8CJBqoJj/vaVos8wisxogLzxunljTL0A2TzYtYWP4DW6oivq/cSYxe3VZYylh1NbAaCx3MN7k5TaMCFWDcHNp/dPqh1FxKCvJCLizcvHRidM3KJMnZ108RagGKwOl1OPUGoseXWjNh1apK6PooQhZJ1qM7s0afqUJGE4EyJQhzm7rVpZbi+jsT27OCTOQ7LaaZcVy77fTIH6A7S6JzqHaVe5M6QrhO+e5TIWEN9c8g3e1V/7CsLko43dII9h1mDIjz90DZ/6A3v2Hgdy+HU6KYNqP2M+QL3KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fa48VS7cmiROA2onEOhrclcughxuxdqJL9kijwG9m3A=; b=oMXgYB+QgrGcTotfQxztLTkYfucc3v7KcIxVkmV+P8tlkxxvT3S9vxf6iMQJdhRCBtUidOkY0UVn2DYaQ1iHLZ9hQpc4FvDGEVdrRuAy33nZ0bYFM8dzFNN//K0uA3u8HGzYeLyrqP+IKKHbH+EIMBDrEZkxij528nBGvUI1ywyEi1HFa4rQUlgFw41W6tevPGF7a/FsOEKAKO5atpflfqf7oHpxmaUljkQEtsaAsUiN89Cug1kdSq/a18nMrBzlgdQm7I7NETWoaUzruKqrUgeCUQOgJI64+Q8bbDhMOICUkNgiOnOWp05W4k+SE1YxFEQsR/bIMUJNAUMLIyXDBw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fa48VS7cmiROA2onEOhrclcughxuxdqJL9kijwG9m3A=; b=kxmCQteTp0ka/f8QzY6EseR2rgKg/0vqin6N+cwxPPBffqVdbOxBKwGyRqfDJWrXWERXeEaxl3++HOFwNjwDz19mmYiS8AhVdA3BLSyMls4f53b7qAPVDQjYJJjsQNSq6XgBVfdV5dnHY5EhxGy7muqPaBBpKJotdf51d75h0XA= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DBBPR04MB7948.eurprd04.prod.outlook.com (2603:10a6:10:1e6::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.11; Thu, 21 Jan 2021 01:14:33 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3763.014; Thu, 21 Jan 2021 01:14:33 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Subject: [PATCH V9 04/10] remoteproc: add is_iomem to da_to_va Date: Thu, 21 Jan 2021 09:03:29 +0800 Message-Id: <1611191015-22584-5-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611191015-22584-1-git-send-email-peng.fan@nxp.com> References: <1611191015-22584-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SGAP274CA0018.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::30) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SGAP274CA0018.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3784.12 via Frontend Transport; Thu, 21 Jan 2021 01:14:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: b425c71f-e43a-4f6e-984f-08d8bda9e937 X-MS-TrafficTypeDiagnostic: DBBPR04MB7948: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YISWlhQMeLw1Ul3n9jGEtj5Olv5O+aYeZDj2OVpSP54DlJt6N5z8ClxSveSkgc/5+qwj7Dr+lTS1LCaS86toJV6bWTi1CsQTiamAsbfGvAzzpZs83MQClybRHv5oqRCWNNcFZg3sSH2DwfYVUaRJNnhjCaIeReA/qYY1+XxzSHdkrJWC2A2P/NkZcYosREIeQ32oIxNmZXoGNxKzr4hnuG8eYtv6AQHgXa7rumTnLOY3lW5bOGt2feD+f1qLvthX9ySWLAAENxnFfkquvuOsVnt7X+Ncq9lgI5hffmqmBs8stlebHUFR6YSXtxy3JoizL2SVDJ3kOXHPxj3RzP6qvP2Jp6v+gX2QjcXQYZcZH3i8jQVscRAr+0pnhpoXjWBaeSczknhcDw5SQZwVZpx977WKpGMZnKGn7qbTfOY9BeX806QMFgg52T2/DcebkBUuzXp7amT79bg5xcaC5sRtlQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(39860400002)(396003)(366004)(376002)(346002)(69590400011)(66476007)(186003)(2906002)(52116002)(2616005)(4326008)(7416002)(5660300002)(83380400001)(66946007)(26005)(16526019)(956004)(30864003)(36756003)(316002)(8936002)(9686003)(6506007)(8676002)(478600001)(6486002)(6512007)(86362001)(66556008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: QZ9hSDGpuIl6dPnoSx1isoyvVXzyg2iRyrfl+IIY65aQknE4NErlskeGBkjrZ681eBrW68HqIsjPdOHbjOrM0+5iPXgDBOtCIpRdIXFC9p2bWZ2ikEOWiqgRH31Bgm5gMJ0/jrVmjvEzezTxj+9wz8jkeoMTZVpZtwhVoOWP1AIudZ9z+uhhif9JHSwQu335GnKenZADvEgj7izO2cOJU6RuBgjKqbcIIHQAEZAteRaUs66h7fsNFjxg61yn1YmvIsIR7vBsc2WmOeUMXRZrysj0rQ7LFIuXYobc/9l+9v6o+6oCtrVb6N7YeVxEU2sQEDh8CPkQFcQrYJQSMnVb3BDgeVodyaFNSmiDdRfHNEFzzy1fUIsiQ5o6LzrPZ7OCPzkNfUO79A7fxA3sDg4D2XP4CvCqqTJVueTbWaIrHBCx6VtqD7IFhFcw3QH5xmbOFh+FeAE6Jdln/181jJqNT8ciA4+E91PtAOd3C/pAxyOXH3s0oevqp5xc7rSZOOHHp8ko0L2E/urRtDez4mJBNcpWXoYYghmN3H9FrSmmb4sLC8YCjXQ17PmihknpQHL866Rgt8BZh6oSkzp1TZxM/vyGizyW0I1TKjf0NDlXSADYhs5QkkycGoXjvsalNjC0Q5js0Jcajw1nIP2N3yEYRJxPE5s+sQf1YplA5qk7JuFpggNaeGNNnZp6Vcrqmba6vLSgzApH0EzrrCHFV5rdOqeVcFdD3j3Ah7n3RuYPRz+aoLG887BxrN8Vh4tLZya5keGpeQQYKCnqnz4+NDdhch1GuRv14p4FT/ehMKA6vAE+nhLmeij735gFPYvdiqa5Xl5ms9z649bn38NppvPLV3BtzpfwfAjtgVRTlxb1rw2gZtlz37kr7/q0XoHf20xJT9qsLp/sGdK7Dzzw47sV/gU0OOvGjpu4jmvNmF6vH9m4p4Myfq5iOUSzCg50dAPP3DDGQ3KYwBFPGUbfVqKwAbIfJzLmIzb+qGGEiU37AALU70pyaSqo4NzQgqgW1viz X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b425c71f-e43a-4f6e-984f-08d8bda9e937 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2021 01:14:33.6720 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZX/7+WWq1CG0KTRZ27m8gQSUoC1UsFbPNhRL0CtFTFQ/Ebq5Y2GWTboLtjfCVt0tFum6dsioF1FirmBXr+WwMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7948 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210120_201438_188508_26C6EE7A X-CRM114-Status: GOOD ( 19.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, patrice.chotard@st.com, paul@crapouillou.net, agross@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, matthias.bgg@gmail.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org 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 26e19e6143b7..bb5049295576 100644 --- a/drivers/remoteproc/ingenic_rproc.c +++ b/drivers/remoteproc/ingenic_rproc.c @@ -116,7 +116,7 @@ static void ingenic_rproc_kick(struct rproc *rproc, int vqid) writel(vqid, vpu->aux_base + REG_CORE_MSG); } -static void *ingenic_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *ingenic_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct vpu *vpu = rproc->priv; void __iomem *va = NULL; diff --git a/drivers/remoteproc/keystone_remoteproc.c b/drivers/remoteproc/keystone_remoteproc.c index cd266163a65f..54781f553f4e 100644 --- a/drivers/remoteproc/keystone_remoteproc.c +++ b/drivers/remoteproc/keystone_remoteproc.c @@ -246,7 +246,7 @@ static void keystone_rproc_kick(struct rproc *rproc, int vqid) * can be used either by the remoteproc core for loading (when using kernel * remoteproc loader), or by any rpmsg bus drivers. */ -static void *keystone_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *keystone_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct keystone_rproc *ksproc = rproc->priv; void __iomem *va = NULL; diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c index e0c235690361..535175f013e4 100644 --- a/drivers/remoteproc/mtk_scp.c +++ b/drivers/remoteproc/mtk_scp.c @@ -270,7 +270,7 @@ static int scp_elf_load_segments(struct rproc *rproc, const struct firmware *fw) } /* grab the kernel address for this device address */ - ptr = (void __iomem *)rproc_da_to_va(rproc, da, memsz); + ptr = (void __iomem *)rproc_da_to_va(rproc, da, memsz, NULL); if (!ptr) { dev_err(dev, "bad phdr da 0x%x mem 0x%x\n", da, memsz); ret = -EINVAL; @@ -458,7 +458,7 @@ static int scp_start(struct rproc *rproc) return ret; } -static void *scp_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *scp_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct mtk_scp *scp = (struct mtk_scp *)rproc->priv; int offset; @@ -587,7 +587,7 @@ void *scp_mapping_dm_addr(struct mtk_scp *scp, u32 mem_addr) { void *ptr; - ptr = scp_da_to_va(scp->rproc, mem_addr, 0); + ptr = scp_da_to_va(scp->rproc, mem_addr, 0, NULL); if (!ptr) return ERR_PTR(-EINVAL); diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c index d94b7391bf9d..43531caa1959 100644 --- a/drivers/remoteproc/omap_remoteproc.c +++ b/drivers/remoteproc/omap_remoteproc.c @@ -728,7 +728,7 @@ static int omap_rproc_stop(struct rproc *rproc) * Return: translated virtual address in kernel memory space on success, * or NULL on failure. */ -static void *omap_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *omap_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct omap_rproc *oproc = rproc->priv; int i; diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c index 5fad787ba012..8df99318f18a 100644 --- a/drivers/remoteproc/pru_rproc.c +++ b/drivers/remoteproc/pru_rproc.c @@ -483,7 +483,7 @@ static void *pru_i_da_to_va(struct pru_rproc *pru, u32 da, size_t len) * core for any PRU client drivers. The PRU Instruction RAM access is restricted * only to the PRU loader code. */ -static void *pru_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *pru_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct pru_rproc *pru = rproc->priv; diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c index e02450225e4a..8b0d8bbacd2e 100644 --- a/drivers/remoteproc/qcom_q6v5_adsp.c +++ b/drivers/remoteproc/qcom_q6v5_adsp.c @@ -281,7 +281,7 @@ static int adsp_stop(struct rproc *rproc) return ret; } -static void *adsp_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *adsp_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv; int offset; diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index ee586226e438..333a1e389fcd 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -242,7 +242,7 @@ static int adsp_stop(struct rproc *rproc) return ret; } -static void *adsp_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *adsp_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv; int offset; diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c b/drivers/remoteproc/qcom_q6v5_wcss.c index 78ebe1168b33..704cd63c9af4 100644 --- a/drivers/remoteproc/qcom_q6v5_wcss.c +++ b/drivers/remoteproc/qcom_q6v5_wcss.c @@ -410,7 +410,7 @@ static int q6v5_wcss_stop(struct rproc *rproc) return 0; } -static void *q6v5_wcss_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *q6v5_wcss_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct q6v5_wcss *wcss = rproc->priv; int offset; diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c index f95854255c70..1bf60dc84f69 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -320,7 +320,7 @@ static int wcnss_stop(struct rproc *rproc) return ret; } -static void *wcnss_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *wcnss_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct qcom_wcnss *wcnss = (struct qcom_wcnss *)rproc->priv; int offset; diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 2394eef383e3..9bec422ccce3 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -189,13 +189,13 @@ EXPORT_SYMBOL(rproc_va_to_pa); * here the output of the DMA API for the carveouts, which should be more * correct. */ -void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct rproc_mem_entry *carveout; void *ptr = NULL; if (rproc->ops->da_to_va) { - ptr = rproc->ops->da_to_va(rproc, da, len); + ptr = rproc->ops->da_to_va(rproc, da, len, is_iomem); if (ptr) goto out; } @@ -217,6 +217,9 @@ void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) ptr = carveout->va + offset; + if (is_iomem) + *is_iomem = carveout->is_iomem; + break; } diff --git a/drivers/remoteproc/remoteproc_coredump.c b/drivers/remoteproc/remoteproc_coredump.c index 81ec154a6a5e..aee657cc08c6 100644 --- a/drivers/remoteproc/remoteproc_coredump.c +++ b/drivers/remoteproc/remoteproc_coredump.c @@ -153,18 +153,22 @@ static void rproc_copy_segment(struct rproc *rproc, void *dest, size_t offset, size_t size) { void *ptr; + bool is_iomem; if (segment->dump) { segment->dump(rproc, segment, dest, offset, size); } else { - ptr = rproc_da_to_va(rproc, segment->da + offset, size); + ptr = rproc_da_to_va(rproc, segment->da + offset, size, &is_iomem); if (!ptr) { dev_err(&rproc->dev, "invalid copy request for segment %pad with offset %zu and size %zu)\n", &segment->da, offset, size); memset(dest, 0xff, size); } else { - memcpy(dest, ptr, size); + if (is_iomem) + memcpy_fromio(dest, ptr, size); + else + memcpy(dest, ptr, size); } } } diff --git a/drivers/remoteproc/remoteproc_debugfs.c b/drivers/remoteproc/remoteproc_debugfs.c index 7e5845376e9f..b5a1e3b697d9 100644 --- a/drivers/remoteproc/remoteproc_debugfs.c +++ b/drivers/remoteproc/remoteproc_debugfs.c @@ -132,7 +132,7 @@ static ssize_t rproc_trace_read(struct file *filp, char __user *userbuf, char buf[100]; int len; - va = rproc_da_to_va(data->rproc, trace->da, trace->len); + va = rproc_da_to_va(data->rproc, trace->da, trace->len, NULL); if (!va) { len = scnprintf(buf, sizeof(buf), "Trace %s not available\n", diff --git a/drivers/remoteproc/remoteproc_elf_loader.c b/drivers/remoteproc/remoteproc_elf_loader.c index df68d87752e4..11423588965a 100644 --- a/drivers/remoteproc/remoteproc_elf_loader.c +++ b/drivers/remoteproc/remoteproc_elf_loader.c @@ -175,6 +175,7 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) u64 offset = elf_phdr_get_p_offset(class, phdr); u32 type = elf_phdr_get_p_type(class, phdr); void *ptr; + bool is_iomem; if (type != PT_LOAD) continue; @@ -204,7 +205,7 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) } /* grab the kernel address for this device address */ - ptr = rproc_da_to_va(rproc, da, memsz); + ptr = rproc_da_to_va(rproc, da, memsz, &is_iomem); if (!ptr) { dev_err(dev, "bad phdr da 0x%llx mem 0x%llx\n", da, memsz); @@ -213,8 +214,12 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) } /* put the segment where the remote processor expects it */ - if (filesz) - memcpy(ptr, elf_data + offset, filesz); + if (filesz) { + if (is_iomem) + memcpy_fromio(ptr, (void __iomem *)(elf_data + offset), filesz); + else + memcpy(ptr, elf_data + offset, filesz); + } /* * Zero out remaining memory for this segment. @@ -223,8 +228,12 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) * did this for us. albeit harmless, we may consider removing * this. */ - if (memsz > filesz) - memset(ptr + filesz, 0, memsz - filesz); + if (memsz > filesz) { + if (is_iomem) + memset_io((void __iomem *)(ptr + filesz), 0, memsz - filesz); + else + memset(ptr + filesz, 0, memsz - filesz); + } } return ret; @@ -377,6 +386,6 @@ struct resource_table *rproc_elf_find_loaded_rsc_table(struct rproc *rproc, return NULL; } - return rproc_da_to_va(rproc, sh_addr, sh_size); + return rproc_da_to_va(rproc, sh_addr, sh_size, NULL); } EXPORT_SYMBOL(rproc_elf_find_loaded_rsc_table); diff --git a/drivers/remoteproc/remoteproc_internal.h b/drivers/remoteproc/remoteproc_internal.h index c34002888d2c..9ea37aa687d2 100644 --- a/drivers/remoteproc/remoteproc_internal.h +++ b/drivers/remoteproc/remoteproc_internal.h @@ -84,7 +84,7 @@ static inline void rproc_char_device_remove(struct rproc *rproc) void rproc_free_vring(struct rproc_vring *rvring); int rproc_alloc_vring(struct rproc_vdev *rvdev, int i); -void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len); +void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem); phys_addr_t rproc_va_to_pa(void *cpu_addr); int rproc_trigger_recovery(struct rproc *rproc); diff --git a/drivers/remoteproc/st_slim_rproc.c b/drivers/remoteproc/st_slim_rproc.c index 09bcb4d8b9e0..22096adc1ad3 100644 --- a/drivers/remoteproc/st_slim_rproc.c +++ b/drivers/remoteproc/st_slim_rproc.c @@ -174,7 +174,7 @@ static int slim_rproc_stop(struct rproc *rproc) return 0; } -static void *slim_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *slim_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct st_slim_rproc *slim_rproc = rproc->priv; void *va = NULL; diff --git a/drivers/remoteproc/ti_k3_dsp_remoteproc.c b/drivers/remoteproc/ti_k3_dsp_remoteproc.c index 863c0214e0a8..fd4eb67a6681 100644 --- a/drivers/remoteproc/ti_k3_dsp_remoteproc.c +++ b/drivers/remoteproc/ti_k3_dsp_remoteproc.c @@ -354,7 +354,7 @@ static int k3_dsp_rproc_stop(struct rproc *rproc) * can be used either by the remoteproc core for loading (when using kernel * remoteproc loader), or by any rpmsg bus drivers. */ -static void *k3_dsp_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *k3_dsp_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct k3_dsp_rproc *kproc = rproc->priv; void __iomem *va = NULL; diff --git a/drivers/remoteproc/ti_k3_r5_remoteproc.c b/drivers/remoteproc/ti_k3_r5_remoteproc.c index 62b5a4c29456..5cf8d030a1f0 100644 --- a/drivers/remoteproc/ti_k3_r5_remoteproc.c +++ b/drivers/remoteproc/ti_k3_r5_remoteproc.c @@ -590,7 +590,7 @@ static int k3_r5_rproc_stop(struct rproc *rproc) * present in a DSP or IPU device). The translated addresses can be used * either by the remoteproc core for loading, or by any rpmsg bus drivers. */ -static void *k3_r5_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *k3_r5_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct k3_r5_rproc *kproc = rproc->priv; struct k3_r5_core *core = kproc->core; diff --git a/drivers/remoteproc/wkup_m3_rproc.c b/drivers/remoteproc/wkup_m3_rproc.c index 92d387dfc03b..484f7605823e 100644 --- a/drivers/remoteproc/wkup_m3_rproc.c +++ b/drivers/remoteproc/wkup_m3_rproc.c @@ -89,7 +89,7 @@ static int wkup_m3_rproc_stop(struct rproc *rproc) return error; } -static void *wkup_m3_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *wkup_m3_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct wkup_m3_rproc *wkupm3 = rproc->priv; void *va = NULL; diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index a5f6d2d9cde2..1b7d56c7a453 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -386,7 +386,7 @@ struct rproc_ops { int (*stop)(struct rproc *rproc); int (*attach)(struct rproc *rproc); void (*kick)(struct rproc *rproc, int vqid); - void * (*da_to_va)(struct rproc *rproc, u64 da, size_t len); + void * (*da_to_va)(struct rproc *rproc, u64 da, size_t len, bool *is_iomem); int (*parse_fw)(struct rproc *rproc, const struct firmware *fw); int (*handle_rsc)(struct rproc *rproc, u32 rsc_type, void *rsc, int offset, int avail); From patchwork Thu Jan 21 01:03:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 12034087 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.9 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 EF367C433DB for ; Thu, 21 Jan 2021 01:22:08 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 893AC23888 for ; Thu, 21 Jan 2021 01:22:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 893AC23888 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kD7heymAe6N57Th45P048pw/aE4orizX7V73fLQIblE=; b=yQbbeCaZ9t3nLYClQibXDX3Od B5na4mAeFQ3OPN1vnUCz9cmESBTcYDltVoHPt4sMH+dQfHO6sYkz86DrY7cgRN6eatD95awERhNdY j+JrXSxJbErd7qK67eKczv6n2mKF9JiOh7IBi/b+oViLI5UiFNcwRmbxD5DG03YYGDu7h0bxKAh7g jjBkLYXNR63aR5EEvFvj8+Le0qxxM8BKWuWs1xiIvpxTWyEDc4o0bY9SvNb41aqziHLAZagChsIB6 wNJoV2LyD8+faCkLhLT21I07oK2yy4ajSnZJD8EAWZWGqeLsVIitEcwsEKf6Eh0tYldUwvStErz7B OeEa08yAw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2OYm-0008Dw-RC; Thu, 21 Jan 2021 01:14:52 +0000 Received: from mail-vi1eur05on2075.outbound.protection.outlook.com ([40.107.21.75] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2OYe-00089u-De for linux-arm-kernel@lists.infradead.org; Thu, 21 Jan 2021 01:14:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RKBf2iby7JRI8X6EDDD2UtPdrnzFy8w5c45Q3xZuNbadat85Xw7x9ye1KgvX3aLUaUea5CcP3pGnOUThULPiRxJ/NomTdBYFfJiRN+bu16PhR3W5bPVawF6G7Lg4jBPD3i1wjfZiNbZVQvIEgLuSawzB2qgA7ap+wO8uwSXqdGSiBhzkHVBgQhzZgszr3vpBmbbTSG6lsa46q+94aAhv5iXj6Gjt3oXz9xtg0k+iDYB1eI3UNT90/OSzGxKH9aCJmDRGFzFn/N3T/2Z3lUx6vx3+A/eYoWOys+4WFXnErI+xKFOqzdzb665yicDsXOnUaZu7IsrzP9JqGfRSQOFr/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XJxrdlT8+OTygEs/swp/bhTTRjULeT1DvjELEua7HdU=; b=J9uYCzKjU25nIZoMFMAHbnsG/ghSdIjeRXekvwuwMWmxAyQDQWr4aIkUEMwhbwvCQyeJ+xY+II5c/8UDs5WwPltWdwvEZ+Wo+A8muz9TKt6NiyFkCRMJO8RzbluBBJ+dxNi5Ln4uCXYY2DzONHxKqsfSr0b57pzUrbfELogmbncowe0yg4KJFLhzLSj37wmzMoMcgIdl5BDTFHBhkk5jFF58kCvSMtzPj5vd+zUEhK6M1HNF5RGqWBxFfLYHAxhLw4vFFUby09H68vJzPVHD3b5hQtObsOaAB9KBW9IG3zdkSgbPxW6EwkT7v6or34lgVujNlr2wUgCxYaX0RfXxaQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XJxrdlT8+OTygEs/swp/bhTTRjULeT1DvjELEua7HdU=; b=sDnnSs76esMHBoYC+nLwiXQcS6lMeCepDrnYl+ubU6O4muw+Ab0hkJRKxU9qz8/jBAEje0FlvS4hb/bv0+oVSvJM4sBPaTr7yuuibuuMLJrmVp+s9Vcp+aoJ9M8aOPgrb3dJWDuUwzGGHNGsflTX1TxTcYpNS6sYX6BXzm99b8Q= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DBBPR04MB7948.eurprd04.prod.outlook.com (2603:10a6:10:1e6::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.11; Thu, 21 Jan 2021 01:14:39 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3763.014; Thu, 21 Jan 2021 01:14:39 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Subject: [PATCH V9 05/10] remoteproc: imx_rproc: correct err message Date: Thu, 21 Jan 2021 09:03:30 +0800 Message-Id: <1611191015-22584-6-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611191015-22584-1-git-send-email-peng.fan@nxp.com> References: <1611191015-22584-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SGAP274CA0018.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::30) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SGAP274CA0018.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3784.12 via Frontend Transport; Thu, 21 Jan 2021 01:14:34 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: cda70d68-dd2b-4afb-b5a6-08d8bda9ecb8 X-MS-TrafficTypeDiagnostic: DBBPR04MB7948: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:989; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4yNyVSLxeTad60rHzetOQrLVsZUIttJQv+Ys8cjMHGRRa1s1XpOFE88ZgNuUrgdwB5JfExRLqbjS1ZgAXPBnP9WNi7QTokQmVEWg749bGQzqIl9PL8Gby7/k8j58F777IADllBvuckVcma+7uGVCbldabRUfHt6H0dkATDjfmDCEFteLDGHFsIucGhuYbkEmFoxDBgqdENJSuScJTbVJP3MS+LaWIp3pEjYTeHw/Std9oyjutjk2IIhFJMpTOrkmipaBo06JNpYUYfXBjRwUfkCeXvqFIsDXZwp1ICZTEZ/DMEWv/oTtTOZpyN3eAvTUIMUEr8CbDEXoxvkNuhm/gDadl3qxpmHaxHM+rjhw7ZOjLBNV6ccA/P1FE+WJuuPkVEx6s0xpZntHNPEF2LWt0o574OjfIT2srdMh/rULQhDgDvU15dAHVOrUvBEyNlOV7VtJEzNFJ+WPSoYDQ00TDQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(39860400002)(396003)(366004)(376002)(346002)(69590400011)(66476007)(15650500001)(186003)(2906002)(6666004)(52116002)(2616005)(4326008)(7416002)(5660300002)(83380400001)(66946007)(26005)(16526019)(956004)(36756003)(316002)(8936002)(9686003)(6506007)(8676002)(478600001)(6486002)(6512007)(86362001)(66556008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: sfN+kaXE6gqqW+i7YtVHtZN60cHRXlQ9lH5P7tjGiA4m3HA8relUyVE4xAXxPDk2K4IyrxLoNEZ6Ew5D32IkwPZjsp6t1vssMfdN21i84187iUh4cbJOSC3LNDlncaF1qUCERVMaFLZpxXUhH28fNgTqWJlPBjMJWM2SMt7DngaE/PK6jTsCSDuKoOP9gzccLWbYVHVGmV5iDeBfqGhV1ZSScl1n3B2BbIP2/zzvkOaEw5bg32K1u53WLh106vHM0Nmba+Ng/fLYy4gJtPCL0Uat8+k0Gc/Yx0Gl8G0bz+8ZUXwFkqp5RfFJ21/pxTRbWOb8/8bCB7RgJlZnVZJ1B7r5w+0C37XOG5GV6Gwajmo750xgJeaKj83JaunqroeTqYSJb08RdmJ87Hzycn+oAi1lcsCzbH+Vgoxef0nHzxTVlB6JETNpgZAWxaypBpNdxPq/avtzwyY2yY1djBTs760DZTeaIsDSXqeui5IqwrlTE7X9cS9WpC5j7Qxbj154+RYzNJ15nFBbXbo0uzgsnGYBvXrBOJs/u1VBIV19/MZbvV1jcB3Bj1SKlmC1hHLvAdS667I9dz8ETd50ok0ynsaJLoeyCH4Ojn2N5Touu1emVDv3Irk/b7sGMdxjhBhlbfLDG83f5ZSOXaRPC20CKSRYBC6KMJvHOHar0JTbE1/c3tl0t9dZuX1DEcPXV5tpJmxrzJubz8cLet2jl3d8iBwtP5IX980FzIGqhQk3oIfmr3esMoRfXC+Az0Lg9gGlDuaw0q+rvOAtFSSEtDHblEEnOW+NONwqUSpZrI/nv5yfTK4Yyk0vO3XqQ1DAHEuGsg88FLnNl46flQH4wWajwAg53TsVElkuZTWjLz4tDDsWvgm7hgmDpMPNwHX1l+39NYTkyTvMhb6+HHlp3qhMXRU2kuEVTBWPLNGUoybvQjPbwOYa3+PiUk8DpFVdI5mDgkuJpvnKj5ZU7YGQkYMeWLAs+Zs3KVZDklnpzDv0t7VK9Tf4gctKZ1poEZhXiGl8 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cda70d68-dd2b-4afb-b5a6-08d8bda9ecb8 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2021 01:14:39.5584 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Db0KniWb+09Ic59mZzhI996qKlOwAN9d6OlVmXD3bX8XDRPZz4OB+aqX7ww+NylpjXJfsxXwkT/tYJJ3GZwsJA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7948 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210120_201444_466042_96E5E40B X-CRM114-Status: GOOD ( 13.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, patrice.chotard@st.com, paul@crapouillou.net, agross@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, matthias.bgg@gmail.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org 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 Thu Jan 21 01:03:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 12034049 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.9 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 C006BC433DB for ; Thu, 21 Jan 2021 01:16:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 66EAC23888 for ; Thu, 21 Jan 2021 01:16:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 66EAC23888 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kFHanEakSdTcrbz0nm9LgnvogecTsIk/Y7h65tYgnDk=; b=iqaWuXXueJ7qav39wXaDovnu1 r6RPEjazoZfjC26xIMK2qV3MnBOXBs2mXj1wVOeUKXlpa/LWE6osyRJrZVG0X2rlPsVuMgWIsMbYD O4+prAR61Dk9avUouJikAPv8A7H8rITV3HJPt0Tmipw0XPw7JNtO0wPaSZ35fLsjqoH1R7kXor56I bsHwfnANmlNhtqnsihTRGOZ9I8evxf9TuQEbGjhtLG2MsYo/O+TVbW9vEFJWmxz5oPXdBrgAsuIDc s6RHHOdX+BTtU7qUa/VuGOCpTvQu+7bRFugKuQkhEyqhCwI4vHVO+LCOpos6JH09WXYqH6o2/kBBC je64d49Xw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2OZ1-0008IA-T3; Thu, 21 Jan 2021 01:15:07 +0000 Received: from mail-vi1eur05on2075.outbound.protection.outlook.com ([40.107.21.75] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2OYi-00089u-Fe for linux-arm-kernel@lists.infradead.org; Thu, 21 Jan 2021 01:14:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=neDpiKGO4rGRMFlN2UWxUsqadd99bTb2qg6Ykk341oUUTibgo2gLugEmvpLh2AhK7U2uLgPx23lrBmjsC5pEBSz82LqaAHYIXMg/XwRLtAt2/V9BDjibH2c6qUrTvSaKfTkP+UOoR4E8rel9q955710VnHYVQQr/M7ykiw4rmVLg+7fi5HHf079BaKUf1XXhV/UuqJPGQ67fhmhhCwgZFwL31CQngl+Pm43G0M1d4iIv7vLKgcP9JkO09LXGghjBynPBp+/zni2wpSs7wOguAVXoApdvmpKumsA6WlXu9h4fldKFihXHgh4/w7T5z8iK5qAkH/w0Fo/73ct4TW36nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NrM/10lxX+u8ygpoSj3Cn75qK7g8pM1NhQgG/rAaoNk=; b=aTpnFsuNA59iQC1vZOCAxDuxyCuW+ZgcbQ8Pl/VWDsXhsSkdMb9xOCZR8Pzf9YBQ8jwxeFRrMy04+4aanutrxWlDgnKWHOlwV42W6R2gHgiItzysbGrhTrr5ETunC3HcQx8zje/XdeW3gf0woxuNBvvf7F1RuMIFhboXoixvK5FLhdKDvbCT6wrveg0Ioa2Zz8A9rTallIOPveq70QqZFnDxcY8mgEDdgVjjmO743U7gXF4wpeNEuG2gkVhuC99uns/0rM1vQTsD8tjs4empw9kBgfK+RvVO7JfpP2WQvtiGC++ZqTd9kwBwDMS+M+DMfZ5cIMJE42w4Ao+m7P0V9w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NrM/10lxX+u8ygpoSj3Cn75qK7g8pM1NhQgG/rAaoNk=; b=j5LGOjIlFhTkl2xwcFbmkOuUVSdAbGUrzoipuvl+42UP0t8EZIZDbHf6nEuNCmqkrtiqgLT4PGVEiNPQVruw6UPY8sxN2A9dbAlDvf2+T7mBLeKgsNMbkCvf830+w1Ne34WeFcG2P71s2AzYhkrBX/mFcixdkywFOunNbxz+yic= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DBBPR04MB7948.eurprd04.prod.outlook.com (2603:10a6:10:1e6::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.11; Thu, 21 Jan 2021 01:14:45 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3763.014; Thu, 21 Jan 2021 01:14:45 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Subject: [PATCH V9 06/10] remoteproc: imx_rproc: use devm_ioremap Date: Thu, 21 Jan 2021 09:03:31 +0800 Message-Id: <1611191015-22584-7-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611191015-22584-1-git-send-email-peng.fan@nxp.com> References: <1611191015-22584-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SGAP274CA0018.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::30) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SGAP274CA0018.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3784.12 via Frontend Transport; Thu, 21 Jan 2021 01:14:39 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: b995e028-906b-4362-f1ef-08d8bda9f02b X-MS-TrafficTypeDiagnostic: DBBPR04MB7948: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:849; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KdikDrbC1KaYlYsjxl/nT6YDwHaeqrqeAVkGODSwpg0DlxICMGZDLvBnJipSbsVhmHAhKO5mRmZ9bTmUUmdETFZPE7x5F7cHZ3T/iFjxSTawy/6Dr7AHhuZRdwFuQM1LFyxshKy/hk9ZVJcVyHJIM3WYEJaxeT9DWk5it6iTRyFARqAhGLDKnwmmwa3G4xo7iyPnMVnpKC3ukkXKgv5gSir0vkShCGI34G66Dy5ONDuj4nYfSNyvk82+usOkRmQL/Pc9jX+Ihkm29yPPgl07Eos48WZnSgnjwEq4VsdQILPbdM3+473KJHpLIy/CO2AmOq1Bc8gzPpGMSIBdwEl+01vR074W9spoAP2wv4GLr1ZmR0rthbjotn4LMBu6hCl2V+nzcfdbFa3jbAqGsTEzkDzh11YoDqr0FJvaUuAP8jLgycsPahxbLyF08kusR+sgsYyobAuZoPsM8329YzdFuA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(39860400002)(396003)(366004)(376002)(346002)(69590400011)(66476007)(186003)(2906002)(6666004)(52116002)(2616005)(4326008)(7416002)(5660300002)(83380400001)(66946007)(26005)(16526019)(956004)(36756003)(316002)(8936002)(9686003)(6506007)(8676002)(478600001)(6486002)(6512007)(86362001)(66556008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: byFOzOn9G12/AeOw6OtM0gN6SOP1WCjBAuSL2WmhS7uoboo/19sHPtonJP6xFN+fu5lgiNOKq/LnnXKPA8wNtXtHVNg4cAn3hOHKntmiqipc6kD/Fc3mFujUXdm5y0+X/O9Z2c2Pr1AANGkYWSI/RrvSPhmKdsjtjW97WMMDD26dXXCHbLiaLfLdKza3qRAodT2bvRqsS3ApBvRrduLvdVQbrJqHmoWRp2Pd2LMAZXud4xHDfkPptUuldpOJtxh1DYXAcYAD2IwpoMrg0V5FHNZq6WOD2q+afYTiltpcw58YUX8s9ijGRtGf/WeyQXvsPUCelh/zjs/lAHMJYYlg0LEITFaBNmVwt7Pez1L0d5ZFP60wWJWwI/adBpvWfOjRU8WgHd+yw1qOD3Sx22hF1bfUn71a6+iQ8aEla29Lg1n/7Ypavj5KrOJ6KvIJja+eIp6dYQhsgGOesKRfMCiRU9ndCNRXrd/B8h69EyUvlBbRTkDGMWfiwr48TKIS+Wu8/iI+j0W+5QXnUbUsTZolGK/UMGNbRMyuPsyKAshOxpww5QK3Ae/p6w64vHcvjLByyrKlbKaMvFdMQqzEfkHN5LHNSVhDhWYfFZq1QqslFC2TSKU9cCYlA+VB713Ou10R/IDvm3vjeO87OIjMuDS1a1KY/Fj4ruLkexw2cU3686t9AtlNwe0Zbk+PHj/ycx7ficreHV6RyyozGenh6qyHewXgMBb04QCwPQugi1wlUtwT+Y9HhUqjTDHAbfH9EU0yAHTAsypdWobttJTgoBDvSCOkFvPk1Wpd0zgIsu0+anGeCH0alTbL2vAV8aGG6Veu50seed1qVTgBK1fXqnKv4DS95yUsv7i/Vu0BT7JHsPVqyx89Xuqs4rx8YTTownYyzLwxRb/gTIy/8NArOoL/lq5tuTnLf83JTi+Z9/MYpCSnXra6StR0avZlV0lbVm74NzwCdLcRIvvpGybdmUqDdy1XlxBr/kiy9TMrycLhVW5lutYFhgm9TJUgsf9EQPo+ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b995e028-906b-4362-f1ef-08d8bda9f02b X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2021 01:14:45.3637 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: r7z46wDPxh34JyYZZTJyfAFOuoPAhH++OwjyP6UJuqL4KWQCDVHBAhLdXnBQCeCWvbfjvYhwECpFQ44vpC97IA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7948 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210120_201448_560756_1602DE56 X-CRM114-Status: GOOD ( 13.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, patrice.chotard@st.com, paul@crapouillou.net, agross@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, matthias.bgg@gmail.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org 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 Thu Jan 21 01:03:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 12034065 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.9 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 C6786C433E0 for ; Thu, 21 Jan 2021 01:20:00 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 4FD4A23719 for ; Thu, 21 Jan 2021 01:20:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4FD4A23719 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3MhynoencNAmSvh3qmz1estWc+o+yT5ZlhJemlUYXgo=; b=rLN0yMOpNxIewTbs+ah2IXZrS FEIIi0J8jXhI9AyLe01Lj04CN8ytaDNI7MLeTnvhDPNmNvaL38rYAtFr6pozFxIvyDq4ZyHWSAAe0 tT5Pi/5S4lUWQj7+P1jf+6ial0Sg1N9qKX/1yMqelR+Ym37naRuSyt3xBF4y4QOVo7uzcCLCzSju1 OyLAJHSqM1p0qO3Pyq9dF/Po5ek6nDlnJfgM7n+yqAUQj2RmgbI+bLNe5P/TCZu4NPDMgHpMC4AOU /yNJV22zdmRh0ymnC/rA4PDRaulxD6UwfKyNsucOR2b9A5rYvIOfNLUpw4R4bN88+dL9LmNKT0+fZ vNFav72yQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2OZB-0008ML-Ch; Thu, 21 Jan 2021 01:15:17 +0000 Received: from mail-vi1eur05on2075.outbound.protection.outlook.com ([40.107.21.75] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2OYo-00089u-HB for linux-arm-kernel@lists.infradead.org; Thu, 21 Jan 2021 01:14:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WhNGYgUE6yKFjlt5SQ+ybUOqyAAg3HKNJtO7LZCdlADXxxl+YAGD2qkOLPnXtjqNTKZvKgRbFgWriVHfA3d0kybEv6SjUQ767idzdui0dTkYPVgIvpK945G0iD4nFInQLDov8k1IcSRSquDFzk45Z4k18csV1MTaQGtbWU/p14Xsf3h5sYmhJUsXo+0u2IsXxroeit5/PdDQWvZyK85khwjfhTk95KKjR1PyqrhAiD4BLI9AR/nd3wrs3gpRRaaypajOR9Zi/IS2xUO9+oO7gf4koUUIZzO5XK1ouRXV9VpNHGSRV/YvdppHUHOtlYDzDr0Pgxt8f0JwLMvz8Ed02A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sPFDy9u0V0n4kcoaeuDH3f4yuir3vLJ07Nxch5aSlRA=; b=VI4TnN0taJeVDxWKvrGtO6qgF4QMGn00rAqGT7YjyxWyJd+RF1ZAvSVSTQHhFteBsB5BEQ0PZH4sQWgDYXJEghjpirZBE2PTOvhfwP3Ajo0nRW6b5I53H8ZkWtoAMRDiofN+Lt0JzBco84po7wpNVwneUtGTGFwT+M22GNJMce3Dsr8vypZj8DzB2wqSs+06SG+gL7slBCHijrkCZ5aY/9zQCFz1Wx3QyeaKrOa3LJ40RzZORAy7Z/IH+JgGGi7lKYMY+OHYx1vOhnxmxAPqA1QNSFtWHffzYKPmrC/51AaTh+UjdxKPbWbyRLX/Jpzu0NyWysYCeMwJF/o9SkVrRg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sPFDy9u0V0n4kcoaeuDH3f4yuir3vLJ07Nxch5aSlRA=; b=USnf2eVz/cQMOIcp+YP/o8h48knJhEg3mlLpgQ86AgCQHp4riNm5DQzi0xePbJh0BBMqZe7nEAx4DuTsBowqTrBVQOiP+rKMmrHHE4kl1pAnLXt6iwojDHrG5Hj3p3Ej6zzEJssOMW9mcNsPsv9MKguemdKQsEwyWuldA+LFomo= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DBBPR04MB7948.eurprd04.prod.outlook.com (2603:10a6:10:1e6::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.11; Thu, 21 Jan 2021 01:14:51 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3763.014; Thu, 21 Jan 2021 01:14:51 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Subject: [PATCH V9 07/10] remoteproc: imx_rproc: add i.MX specific parse fw hook Date: Thu, 21 Jan 2021 09:03:32 +0800 Message-Id: <1611191015-22584-8-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611191015-22584-1-git-send-email-peng.fan@nxp.com> References: <1611191015-22584-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SGAP274CA0018.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::30) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SGAP274CA0018.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3784.12 via Frontend Transport; Thu, 21 Jan 2021 01:14:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c98ed1a6-b0c9-4996-46e4-08d8bda9f3c0 X-MS-TrafficTypeDiagnostic: DBBPR04MB7948: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3276; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ozKuZvdUoyR5qiIlm4Qy+Jk9kMqrDpIfnUhgHZoRW1fKcVSsXlUFdasoY5HSBOdu9u4LjeDI9CBZjS6L8sAf96VeiRtbvEofyPq5aIIZaIBaEz2ed8FC8UR59H6jATWgcNNoOqdf7o0j/dpvwb0Thjz0izVRgCmssmUzbq2pJPnntN3fHyi8NpEBdVki3vyZgIoLV/2DqP+92ezqc3xvhkF7k8ScSnxe3jg+tIwRtVuxc2u4pSe5F+vGX0TK12CFXBw2fXR8ndGwbvvS2LGDWWgMBbTDsudWLrURTT8ltfx/8PXU5d4FhHctLRCC3PfHzdvoDxcBLHo4B3HaBTDlgoPWKLJvbYW5JtRFk/6YQrhpi//875j4uh3tJEmqzoRmciVJTBwzSXHHlh0B2cKtb4Y6zItiSlDQ+BN5e9pwTZv1zt3rmxRlO04RDyGL3WG2Tlyi++S/+utQ2YbxFxI0lw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(39860400002)(396003)(366004)(376002)(346002)(69590400011)(66476007)(186003)(2906002)(6666004)(52116002)(2616005)(4326008)(7416002)(5660300002)(83380400001)(66946007)(26005)(16526019)(956004)(36756003)(316002)(8936002)(9686003)(6506007)(8676002)(478600001)(6486002)(6512007)(86362001)(66556008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: KMYh/pyh8LCIOgLD60QCWa9pE9YbXfwS+jf7NML99o2NC09jjnvFpOxb6I4FdXtFgoUeV+l7+zpi60hdIMMvF3ai7Sw2/OHQxinE4zhpO9OZ11Bzk151DUbCb/zOJfyvfLRpuGDkHqcuHuiuqvYoON6f2wJisCxOrhRsByt/hxit0eUQqOfJE16WB/0ikfjR0hn0OxXSEspkpISFSmP6PbcNtnJzhVNDRIFtIWWDS3LKUR45uTbUgHg8GiFl/viYKIZRdFW485zUVen0sIodsSY6++wKQS47zr568paUbdSLxh9dabwM/xIVg+79RCP0PK/5umVbqYPpHcH/FHUAVUZ2waOEOza5jl1HzxKbFrxbEPGAYUHtIOWObvCZPV8liJUEyvxjfiSTzouhKFv0ZTLkminzVMafor0hcQqAmcsDt/OVuq5oEZLh0BydHnymiigm3OyXGbGHc3lN8+61dz1/zcL3y3/1oP/fKurMfsGAM/6keF72+fysX05aJiWoe/IBW5txIHHPKKWAFeI7U8XlV00hWVZCmSb04RPcw5pOELy8xZVmSEhKMIgUoY2fLxGvLHYHbs38l6ISbawynjp56S2qpuM1DqvnUAouvDxNe92zYvEpvam3q+KNAjV86jSfZMj/lW5dFYxq6HFZp2Z96R2GPp02thEF6N/OcktD3L9EsuEHbDW3FcnJfz3TJ+/6GyWAc/eG39cA2ooLoYySafW8UO8XvnnxS3ncg0rkOX9pLvHDeYuN4dINTZFs9yMW+Nx80yply/W4guWcWbS3idL4D/yBORj+obJVTCDXIaMnHB3m/Xs9UfQUGfKJd/JFnYpdTBHBUzJ7SB/s0HgEm8xSmAaVFpFVbJuiPGthj8wuFWV0Qvja6zavZpZamguBIVx1UrUAYbZ9rkTp1EJmbKaxSp6x3LfP6VzDvBvh421BdxOPyyDCYp3joA+HB1RxsowTAeZwLtQBeV6snaApowpgn+t0btrd1poS+vopXQbya1GjUS7j6gBPmH4e X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c98ed1a6-b0c9-4996-46e4-08d8bda9f3c0 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2021 01:14:51.1571 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: OvsV+FQ2QzOF7wG8qLnIUYkaQtB35yuPQBTWufNUeUX2lUfYYPRz4qjA4YkYYrmeIgjIJkXemEI7MzjopZCrzw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7948 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210120_201454_618435_92840762 X-CRM114-Status: GOOD ( 19.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, patrice.chotard@st.com, paul@crapouillou.net, agross@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, matthias.bgg@gmail.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org 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 Thu Jan 21 01:03:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 12034059 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.9 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 09CA4C433DB for ; Thu, 21 Jan 2021 01:17:59 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 6D1F523888 for ; Thu, 21 Jan 2021 01:17:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D1F523888 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fqntD7SFvAfoIZ2kDP2FzPg5g+FmG2zhG08kkINzYnU=; b=zC0QZj3/OJDl2vT577heXlUM0 Ix9cYtMnbH9o1WfFGhkeYdKAhP4Mwy0CoraV7o5Htthj9cGkTK6l/eVJg5BlPPYAT1baGfbg4qeIb E2ohXun3FK6xrqZLB2ZMCkcx/v0UXPGbmvrq8uwLSXXU3+FTtZFqnHYqGt6CaH9qLfhxaaL2tBfkw Oa8VKjpUfAodJGcqpAmmt6i6/hcymHhos/zx2NBbHoitZnZiYDEoO+bct80I1Dypr+q0MCVQFxke8 G76WtYTjJBGuSOyEo2/CIucTxQAOaue7peJiOJeAR0pAs6Bd52J9Hn4r08ZJKii2CuONW+q0KJDbA BE0rylj7g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2OZO-0008RS-TH; Thu, 21 Jan 2021 01:15:30 +0000 Received: from mail-vi1eur05on2073.outbound.protection.outlook.com ([40.107.21.73] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2OYv-0008G5-1f for linux-arm-kernel@lists.infradead.org; Thu, 21 Jan 2021 01:15:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QF9Hy5kcLmIwhdYdFCyiIVcJ6f+lGaYhrom3ez7cqEve4ep9uUeHEU0GK8RkTg5miEjTRHJVh3ll+eMZeVDnIK0sqI9KsXR3ZcZvQb5E3je/3CNGH4Jx+5ySUQQMyQlXoUyTWjcKcTf5PE6PYhybcD7opVVAVScqnS3+kal5rEGQz4YAAAVeiWcVc/ds8qdM1UKL643LBTynXl5p3Wslc2GTdO3nhDFx0aizjHk7ntfZUfIpTQHRUpD7VzlsueJbH5yD1QFmnPY3+ojKrkKc0kwPejY6hIbREn+ZT+Q7hUdmjDDJG9Fbl2xJ/Ji49G9HMRutvM2xS44LKduOFryXeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/EMRt+7Vmm+PEYZgd0CpWpVOf1tt9M0R4iS+C7cKihw=; b=X/Y0eSWgGonGxntKQ5uRCXI1D1uogJIqs+w9v1X6sHZH5Cfu9PCy+uDUakyeez8kDLvhNqhH+pMcbq1dVyVlQcUhn4wJ516x4KuE3CNQ2t105l4YzG129OxNRLzr8rXrz57isYL9QJKAecc0PqXpTCdOXCe7WYoiQqaZMYdX+4Jakaz/KNgcsnmoouj9sWlM+uhFRyRbH1ZNv7DKFak0CfJt0LEMVNaS+RY8wQ8Oz9tmOb8b12Gskw9Z7q+FDFGRVt7Jyi4yHZriQrXLM/eqOH0IAHHZtPKV0Jw+w1DikielUN/+/fxPV64X6Ay7NhC6D69naB1D54R80oZitCc1Uw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/EMRt+7Vmm+PEYZgd0CpWpVOf1tt9M0R4iS+C7cKihw=; b=OPDA1Lu3YLnS99bN6cfSN2R+UbGwq48JTyVquOXMF0Ywdnq/K9Wey+CFXLmaunTb8gc/o7XGitQMOfTWVp1waEfffKJfLURRZDNPWgGe7aa2XlPfvL2dp/IigSlmg1QC7jp9wtsc4fD7Op3SSI9JX1MB03hu1xz8ZBQPDXnmS9U= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DBBPR04MB7948.eurprd04.prod.outlook.com (2603:10a6:10:1e6::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.11; Thu, 21 Jan 2021 01:14:57 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3763.014; Thu, 21 Jan 2021 01:14:56 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Subject: [PATCH V9 08/10] remoteproc: imx_rproc: support i.MX8MQ/M Date: Thu, 21 Jan 2021 09:03:33 +0800 Message-Id: <1611191015-22584-9-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611191015-22584-1-git-send-email-peng.fan@nxp.com> References: <1611191015-22584-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SGAP274CA0018.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::30) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SGAP274CA0018.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3784.12 via Frontend Transport; Thu, 21 Jan 2021 01:14:51 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 88895b26-4e4a-47ab-6e23-08d8bda9f722 X-MS-TrafficTypeDiagnostic: DBBPR04MB7948: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:158; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bCuYMllAcKvtDwK0yguKbHF79ZYLM84vXAUAWHV5VqBBOwOhH3lKhOJ5ihr5LzDsEgY03gD4UZcsyvbMtDFT2U4rzPl+gLjON0WHcuRnz9ryTwTYBvq31hDZflZ0fqieLo5XM/5Qmd7N9y0Aea2wePCRtZZ4s1cmbIanPYyxSRVWAKKo9RkWjyJuno4tDFfbrKLN22sp/oiz/ncw0g15uPHKrC643UCjRb2S4iw/v8eFArBx5FGXYsQc3wCcxmFMQV4Fmb2vzOp0J7FJqW1Zz2mABTVba64BpGACNg87uczdEgu2/4hFqf5DIRVlZw5HGd78oDISe1tG1EPv7BtG2zHGxCmAx6cAUj4HuTp0RTB+cg6veGsYCCoi4976V6UWTKOG/bQXACh2TKMBb4xjhklIldBu50GAombkP/sG/8dX7cvf0I5/zBbeHf2pMOuz6nAl7S5dIBNjGCL+5EH48g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(39860400002)(396003)(366004)(376002)(346002)(69590400011)(66476007)(186003)(2906002)(6666004)(52116002)(2616005)(4326008)(7416002)(5660300002)(83380400001)(66946007)(26005)(16526019)(956004)(36756003)(316002)(8936002)(9686003)(6506007)(8676002)(478600001)(6486002)(6512007)(86362001)(66556008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: z54onQsVZ8k4cy6NiQOrPXSs41SgXh0PVpA+Q0xO//MCrWf4ddDhBCPoRq0kb7HrkPitS3KiNYxUK2LJONeARN1qtez8bxW82VRk5JCh88SbcY7P8VX8HR71OzY43isDBoFwwPtd1ZeFIFODrXORR5yy3sYPy8F/lNM8TE0/5eKPS3TCxpjXiuJDgi9xQnTNt6ry2UWmzJX0GBH3902c0vwlkLKpez3b5ozOtaLDAaJdD0EIN2axZyMFI9DwnBNioEgwwPD8wXTSCx19rXuhlSp+vhatcPvV8dbUXjCvVHlafbZXTstBOJA1Nx5BCs/WEFNFohf/65/HGm0dKn9p5ZvPN27i1Wg3sF/y1dcMX6G7irpNuLuojAL7RhX5OEK5S5nwU9LVFc9KpMU31Qnwan0zvJ1JqOzQHUawO4z6zik1qgw5siqSpbmXdfvOpmSu8yZB9agxUOK9Me5y7pL93oninCca5ST+P0AzFK3+J99OBueYuf4+eWoLkLuFh0wJV3HSHKP2nQCf/pURg0owBw1w8b1D/Q14x5VnNRKSgzLXQC+XyddC03wOf73j3bn97iZv8AKH0huZGEtcDU5ndDVzw1kAqkhkv6b1n+g2Yahp4yAXITESQ9hCAl0Jh4b9XwHXGhlQDqHnqxPUbk0k4OCO3AndzSNft5CYBZN5bs073Beef4waig4gGIMhxpbzlE9GIZN1DfleaxppLftUMvyoD9qdHQH+/BFZbrFV8zqiuoPT27FsST05EAa6LQwRTqCjkC6r7pK5wt7ZdCuZ4RF7Q01twXUSWl0yFkHh94FS7trn4Rl9HOcLkmjUzIFQ0nPILOCHwIPS2gm2/0UN9YMcRp8/6bRuqiCRfA4ogdjTbCGeWLVOikW8WFnAbRUfftBDtLqeeG1ghdKL2GT80vaNyCa/J8r6PE+LKGevBlANd+AQuoTXhntGCAFsc+6Be1nEKTaLcjr5Kvr4hApVaOq49LQuUS3DfVHrT9eKhDfyLKV1pBYiUPff6rZ6mw5s X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 88895b26-4e4a-47ab-6e23-08d8bda9f722 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2021 01:14:56.9245 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7A+Fjx8OrUqgu/AJ3QdJEA5UfN4YQoUYpjqhAeOOA6V6nEqsv7QAH5MCuCU98d0CjV7l8EbXkyKUfMGbzkfW9w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7948 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210120_201501_218272_D2D5141D X-CRM114-Status: GOOD ( 16.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, patrice.chotard@st.com, paul@crapouillou.net, agross@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, matthias.bgg@gmail.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org 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 9e7efe542f69..86d99229e8ab 100644 --- a/drivers/remoteproc/Kconfig +++ b/drivers/remoteproc/Kconfig @@ -24,11 +24,11 @@ config REMOTEPROC_CDEV It's safe to say N if you don't want to use this interface. config IMX_REMOTEPROC - tristate "IMX6/7 remoteproc support" + tristate "i.MX remoteproc support" depends on ARCH_MXC help - Say y here to support iMX's remote processors (Cortex M4 - on iMX7D) via the remote processor framework. + Say y here to support iMX's remote processors via the remote + processor framework. It's safe to say N here. diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 5ae1f5209548..0124ebf69838 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -88,6 +88,34 @@ struct imx_rproc { struct clk *clk; }; +static const struct imx_rproc_att imx_rproc_att_imx8mq[] = { + /* dev addr , sys addr , size , flags */ + /* TCML - alias */ + { 0x00000000, 0x007e0000, 0x00020000, 0 }, + /* OCRAM_S */ + { 0x00180000, 0x00180000, 0x00008000, 0 }, + /* OCRAM */ + { 0x00900000, 0x00900000, 0x00020000, 0 }, + /* OCRAM */ + { 0x00920000, 0x00920000, 0x00020000, 0 }, + /* QSPI Code - alias */ + { 0x08000000, 0x08000000, 0x08000000, 0 }, + /* DDR (Code) - alias */ + { 0x10000000, 0x80000000, 0x0FFE0000, 0 }, + /* TCML */ + { 0x1FFE0000, 0x007E0000, 0x00020000, ATT_OWN }, + /* TCMU */ + { 0x20000000, 0x00800000, 0x00020000, ATT_OWN }, + /* OCRAM_S */ + { 0x20180000, 0x00180000, 0x00008000, ATT_OWN }, + /* OCRAM */ + { 0x20200000, 0x00900000, 0x00020000, ATT_OWN }, + /* OCRAM */ + { 0x20220000, 0x00920000, 0x00020000, ATT_OWN }, + /* DDR (Data) */ + { 0x40000000, 0x40000000, 0x80000000, 0 }, +}; + static const struct imx_rproc_att imx_rproc_att_imx7d[] = { /* dev addr , sys addr , size , flags */ /* OCRAM_S (M4 Boot code) - alias */ @@ -138,6 +166,15 @@ static const struct imx_rproc_att imx_rproc_att_imx6sx[] = { { 0x80000000, 0x80000000, 0x60000000, 0 }, }; +static const struct imx_rproc_dcfg imx_rproc_cfg_imx8mq = { + .src_reg = IMX7D_SRC_SCR, + .src_mask = IMX7D_M4_RST_MASK, + .src_start = IMX7D_M4_START, + .src_stop = IMX7D_M4_STOP, + .att = imx_rproc_att_imx8mq, + .att_size = ARRAY_SIZE(imx_rproc_att_imx8mq), +}; + static const struct imx_rproc_dcfg imx_rproc_cfg_imx7d = { .src_reg = IMX7D_SRC_SCR, .src_mask = IMX7D_M4_RST_MASK, @@ -496,6 +533,8 @@ static int imx_rproc_remove(struct platform_device *pdev) static const struct of_device_id imx_rproc_of_match[] = { { .compatible = "fsl,imx7d-cm4", .data = &imx_rproc_cfg_imx7d }, { .compatible = "fsl,imx6sx-cm4", .data = &imx_rproc_cfg_imx6sx }, + { .compatible = "fsl,imx8mq-cm4", .data = &imx_rproc_cfg_imx8mq }, + { .compatible = "fsl,imx8mm-cm4", .data = &imx_rproc_cfg_imx8mq }, {}, }; MODULE_DEVICE_TABLE(of, imx_rproc_of_match); @@ -512,5 +551,5 @@ static struct platform_driver imx_rproc_driver = { module_platform_driver(imx_rproc_driver); MODULE_LICENSE("GPL v2"); -MODULE_DESCRIPTION("IMX6SX/7D remote processor control driver"); +MODULE_DESCRIPTION("i.MX remote processor control driver"); MODULE_AUTHOR("Oleksij Rempel "); From patchwork Thu Jan 21 01:03:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 12034055 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.9 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 41949C433DB for ; Thu, 21 Jan 2021 01:17:28 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 D99A023888 for ; Thu, 21 Jan 2021 01:17:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D99A023888 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=WPYM+a93tmSGqpWU1DC3HvMjK+g/ND4KkMWJcAw/bzs=; b=M+O2LSKNmeuIvBhG1Dj+9eNu/ yp6hybVicJIFF/hKva9lEL5KPDhZCe5xl1vaX/Rc8lXqqeLi4QhicmR13a7gjN5M20JcATEsOenhB fyR0qdgt7IdoVr7paLh4/1Ia6OTBX2NB7pHrWSs/6AHR5wqB6+tXVRPV5XkU5di8X8BFMxgAoYE9N GQreolzDaEuzo+QwCA/Zk6qm1IFOX8vdh90ues8NDV1aZYyEVQ1eGLc4WJMXPMJLwIleyfbKr4lUo HRWCev0fB+IFrejVeSIpZlsAhehTrO21Gqvu+3FDr7mIuMWELh+XNKJlpTkqvK6vgGx+kt9e1eVhD 6oTyhUc/g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2OZU-0008U8-5L; Thu, 21 Jan 2021 01:15:36 +0000 Received: from mail-vi1eur05on2073.outbound.protection.outlook.com ([40.107.21.73] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2OZ7-0008G5-Qv for linux-arm-kernel@lists.infradead.org; Thu, 21 Jan 2021 01:15:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IsRonzgyxudGLmBdlL6RSfDkAi57wOvqvIBAaM6ggL9EN1VzkKpzf7gDioLP7V9/vEsOZw+Pc96pv1wY2nqxuRRTIOC3cLJiJPwtgnBR+x/b7LXy1zyaPEq/hslR7DJIKf3sJ3HrOdNA5Wedcot95L24PMUy5FYVt9FjeVRD4oGe37ThMMt7wdpXwql0pBq2Pc9kap4oPcKxgdvXjdDg4Cy/Fzwz7h8I/LNIT30NCkRDVDEed+SZ3+amPsSoOcYvIfgXbUXiKFzCzVPP87LL/j8LO/qUvtgw3RUT/iTyK8Didyk75jDPEfImdrbhWFv+ww55RBl5RX8JnjfpPoukXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rI+IUMb1+JCMowDxbZUaZ3xdAvqxJsUkD8J2FuBMne0=; b=kh0rmusw9PnmmG3wSxww6sOymZ21hZFBthLEnDFGjLu4GYv3iFHwrwM/5OlRzQpbJYvs6YATP1HgnPyzlhZETkIgVLkrkW9DRihwjdc5QbhL+XpO1oVjB8iaCzhjsEfk+9AjRspHngIbDgC2X6N9a6dCFU2MQY+9XA+EXsKPbz6oPO++EyJPCW01cJRTCapDCYFWbtDnsHnGrFipYHnX2AmCrf7al9ZtI8+JQJ/IdWDQ3iXSdSY9xNVOKwaFjCdYOigDq8CrNh5hl6sx4spLrfUARsgDumk7AF/4Ylqgh1dx4v5kJNT1OIVUJMr5Njy8pCXsT1rPMMP4R9+f38tvKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rI+IUMb1+JCMowDxbZUaZ3xdAvqxJsUkD8J2FuBMne0=; b=aBmSOGy2NFoRkAeYF8V8cAjm6feC5NG40vkdTW4yqEV//86OdXpVDhvd9Jpx9dVEXCYPMJiYcfckWtiRV0vaPIJKkVxSl5wsepc8LD4OXRAMk4FosGRDkmczizc+wzQhRdBkKjL4cu2cUF138OSB2A2qwHQ0adepu45Zp8Ji1iU= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DBBPR04MB7948.eurprd04.prod.outlook.com (2603:10a6:10:1e6::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.11; Thu, 21 Jan 2021 01:15:03 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3763.014; Thu, 21 Jan 2021 01:15:03 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Subject: [PATCH V9 09/10] remoteproc: imx_rproc: ignore mapping vdev regions Date: Thu, 21 Jan 2021 09:03:34 +0800 Message-Id: <1611191015-22584-10-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611191015-22584-1-git-send-email-peng.fan@nxp.com> References: <1611191015-22584-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SGAP274CA0018.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::30) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SGAP274CA0018.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3784.12 via Frontend Transport; Thu, 21 Jan 2021 01:14:57 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 73860709-5ab3-4318-b6f3-08d8bda9faa1 X-MS-TrafficTypeDiagnostic: DBBPR04MB7948: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1247; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BcXWNgaC4F1m3n7WxDumbhBJ/mPIcl/IvpGq78QGjJfeAhxzZVRo1z9/5YK8S2nCvZRi5VVQcJHutY3KYOg1V5+2knF0/e5gCnE7ANxsQFpRyD3DctUOGJK1GDLiqhtR6tSzk31ty7bMIt8kHxbnmNFWTz0QJJNpr8SnMvgFCgjYwYyccfQBuTi95zR8zOXyCLxqwxxWgX0UejhjMFyCslrckRDGY7hfXXyxeCYbBH4vj/iNOUb9MJv9PDJ4QM7kn0ikL6gs3C1luvOlWLhkvDcTugHCbHyMb9XA1Cpiv2Q2Z6acVeVZl4m5EjE7xWTsF5n3ZYJUDp9PmUXsTy60CWDPSmW5AJm9fwcqE3cbbcHCv/IGa/gMMbWai39T2ErS2/44fGqR9NCdQfwa8iyc9M5MHbphywhuimI7VZlLRqlH5PAgXm5hw2+NDWj6ufDGqV4jt7snyI+RLODcQKVWnA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(39860400002)(396003)(366004)(376002)(346002)(69590400011)(66476007)(186003)(2906002)(6666004)(52116002)(2616005)(4326008)(7416002)(5660300002)(66946007)(26005)(16526019)(956004)(36756003)(316002)(8936002)(9686003)(6506007)(8676002)(478600001)(6486002)(6512007)(4744005)(86362001)(66556008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 927zAcV8xOlNVcgXY6uO/w93hhf1ChxVSkm/HmYkWuP6dMDNhpb0vZM6fOJN+V5FxOW6Xjsb/m0q0a+Q9xbQSXYhs3b9ui5julv1MLk5V718rSfO47+PADLX83SimagIsuEoC1tZYXddS4HWsslKJs6nWTBlaNFOR4cY2SjyF64Gi8xS7DuZ4AXNhJNXNuBRLSG7av19Jtp1lEvRX2mX/Yr2jKHBfDSU5fWh/OBFQMw5YtDZ+K8a6pkz1zXl2EA+wP3D0PTh/RLB/YbfXPP1jvqPWVhcCWr3nSGMHlULlJHcpwzDNo9vgiW4Z+Rj9gWTuSGeglCT0gML38f9zRW0HDxVV9BE6n9bNpXv/RDtzbpPNqh/h60yOTInV/E8oUSJRXhhkZYnXl+LmBMupdl4hKbdNhB1HNWm+FeHnzoMczayOfS8kgqZkZB1sKiZUAVWLP0GDSWz5awf0Kiqw46V7IwHRbZMNiDXpl4H0IjnpRqHOhbauPo1oA+gfIdJYpk5Cm4jiuTFtNaraSZcDDXQ5fY/FSdrLtVskj8HHHcvtPGsQLZod8QONPXEOARLnFTA6lQLNmEH1aIfRC/bwToBCM8Pwi6Lx7vz3Y9Y+nn5XYGIlzP4Ubi8kfKrrQhJN25hWVbFxqZvtTTQ6eCfe7NlwigNUgduQITHqyIBlCq0YEgx7vqqLgi0E7Ovlv4VVbySM4oVF60bxQEPuI/NRCXJs7l5hZKDDhCZRdy4raViaR8FbK/775Wdx3SB8fCv29LvvV8iOyE37x2IHlvamcpranftNCr82DWhFV18mxR8NpQ34AKTnAxLabGEm2JziDS8SuFLsQtZYQsCvaIAfcqPa9QLCH/qTUP9LBEFkmH0XdyXLpzV/g+mHOxc5vi7GA5fxdt6OGKWiOGPJmnf8T4Z7Mi7rjFDh6qF2mVOIm2PzMbCs5pK4Zzzg/FpJt6MBr4n9OsMQonAA5WariZ5SKw/+CZCF8f+2ORNjvdenQKuQgbCIWruBUdFwqV9IWf/kG3S X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 73860709-5ab3-4318-b6f3-08d8bda9faa1 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2021 01:15:02.9987 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3IogGmJDU/06inWtkPKWj6Yli2awb4aR70SCdBxC+VScFSm3ngWi01TmeIbhVcLIRLOJ3NI0UMMy//XFXZLAYA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7948 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210120_201513_919981_71A5A99F X-CRM114-Status: GOOD ( 13.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, patrice.chotard@st.com, paul@crapouillou.net, agross@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, matthias.bgg@gmail.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org 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 Thu Jan 21 01:03:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 12034061 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.9 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 4FD2BC433DB for ; Thu, 21 Jan 2021 01:18:42 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 DE71C23888 for ; Thu, 21 Jan 2021 01:18:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE71C23888 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6VqWD7QTn8qSmXwq87BC5UmN7Qu08Wu3OXhgnWwqoaE=; b=HLrLkVFsqcGHFYfrZ7L+rpsCM fJTjmO2uT4XZABjvNGm3H48+BJ+19MfI/for90xY59CAa3CuG0aGznN6ODFWnxtLaBIFGYci8ddpO VSbPAW8A0jMlqt3j5Fqb1+xqJQb0WBAF50NmmRQ6TgB61j+TFWNqtLjJIGtu/ZJUmb2NseNF+zzRB 9AinK42fwjymsUh418NyPtqroFfx1Wtykvijeko5Af1o3y2cs1XxHXxJlAz9s5Cqo05m4Il9PBAcg l4k9f8UxvtXIXF4US6j1X7VeFSgJDHrBvuVUea89PIFCelt1d69oPL/Mt1fZWUd4Fq/44+U8XyAhw MzQD0B/Yg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2OZR-0008Sp-9V; Thu, 21 Jan 2021 01:15:33 +0000 Received: from mail-eopbgr150048.outbound.protection.outlook.com ([40.107.15.48] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2OZ5-0008KI-4j for linux-arm-kernel@lists.infradead.org; Thu, 21 Jan 2021 01:15:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PSyUsuTKY97eehCYAgdq/j3NgB2DTfdj15dkKqsNCfE3ri+yUcYFZLI72loIb+uJ5Mk+gwy27PjvM1JQ0s84fEWRErDan3lgo+RihTX9QIazSTtlEX9pTRj1uzlssiELXgX9Y1NGEWm3zpNV0oCl3+4BuPOmsD+IdiCoKJSCVwk2n+9dRT+T6UOrNl4YmqbHBW2kYadA3rKXRTYLfSJb6l6O1obkmYD6rv82PEebCz+kmRScZFvKBuZo/e9LOQcd2PRAbIJ8xwY4pIZ3IScA+DRQnaCjEchbzUI3qrew/Cxw4jcWnVt8J3MZMuIexj8Lj2XbW5eeUir15kMQSgLT9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=w8prA6N0tCRFNc7f90wFWxXTMw+oe1yZsZ2xi0+JrHI=; b=Lj+DwY1v5MTdnUr9D4s7PQHtgHEdviwMtXpmXwAkMAtjpbXxCwgUxJsIziaevkTRRSnEAVXUR23nlqdf90Sc+PdX2VJDe/Ci5tZQtQg1/DSytrTXkobAOKXdOFfofg+dpn2azXdrJaKpys7SCSrqT3ye7K3linXOw/ggMQxKLMtcZLXjH/fSMp/fJvFZiURRbapMUu9sNjZY07X4Y4XDAMBndzHYK7BwiNyy+PJTcBR/3wYRjZVRR9lx44wl6Cc0xJGdLABsEnnfVkPFp5aO8pl46OgjpUP20ViRd7rIalX1g7Bub7ebj2iFSRs0gurWi/mNEqIP1h1k5CK7ZAgKEQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=w8prA6N0tCRFNc7f90wFWxXTMw+oe1yZsZ2xi0+JrHI=; b=Z2UKOg3pUrvmWrSXDlqvCXM6CoD8vEXQ98roNLVXZVjxDfstlnwPRoPoG2cHJKWM6RssvjSpLGiW3fF3eheQdcJ/I/eVm5y6s/ua2G4sV8RnmjiSMDQwsf3P0O49PFpU+UlVgJ7Uh7u2EQ32ozVwaqkQt+4DOy+Y4GsBz8XCKwE= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DBBPR04MB7930.eurprd04.prod.outlook.com (2603:10a6:10:1ea::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Thu, 21 Jan 2021 01:15:08 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3763.014; Thu, 21 Jan 2021 01:15:08 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Subject: [PATCH V9 10/10] remoteproc: imx_proc: enable virtio/mailbox Date: Thu, 21 Jan 2021 09:03:35 +0800 Message-Id: <1611191015-22584-11-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611191015-22584-1-git-send-email-peng.fan@nxp.com> References: <1611191015-22584-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SGAP274CA0018.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::30) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SGAP274CA0018.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3784.12 via Frontend Transport; Thu, 21 Jan 2021 01:15:03 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 820dad94-a1ce-4732-bdd2-08d8bda9fe35 X-MS-TrafficTypeDiagnostic: DBBPR04MB7930: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:751; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0IFYKDe/+2wKgFrltGstBIOn4yrtw4Hnh+c+LD9+IYQ7CYeJcjtTAL6TLHxkZqmdLBgYFfkQp6x1aU3cJ4SkWPWL5W8d3ohLkLnPBfFyipfMZ0vvrxBQ5Fe9u7yPItV+XTSnRRXGil2kZiWTPvIv0wU09pXZ2z+ioUEShRweO/ZQ7iNbdgKNWhRE8ENQyhGWhh7P5lWVidePeIphtiA3MquDINAfRdQLeX8gRv3dK8nYjxLPTlTGY0qOQ8ph4myjsdAYGxDLya5/6hVRj4VoDrUeo/k5HUIVA2+n0y8O1HElsjXE0xr+JQ3V5rylhzpWunpXxqqTexDkXNRBygcB4hNekgksR4bwXOHinkIwK4Ge+UvmK+iiCX3osYIIKA20fDcUtCFt4UbC5ylydA24gjuf+Xe1U/OHzBy8iecp33m8m0etYrmE37xf6w/9D40yLT/N5aB3hdAMeOsSMB4gRw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(39860400002)(346002)(366004)(396003)(376002)(2906002)(7416002)(6512007)(956004)(8936002)(52116002)(15650500001)(26005)(478600001)(9686003)(316002)(2616005)(5660300002)(6506007)(86362001)(4326008)(16526019)(6486002)(186003)(8676002)(6666004)(69590400011)(36756003)(83380400001)(66946007)(66556008)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: AvmRhOBYjXRvSrkCM2QQpc23rOK832Gg5pX0C3rNZkM3BxTiQN639ExTL+/LyOAZus4UK8tPnt7l/QJXsl9v5B8T+p3h3MKA0R4AnehGvtvcJUGzv2MP1jI9ReZvp20bcY6u39X2tbwAdRQdSWZS76sXUastP2YoxFkB2iA9ZYWu7DEA83VmkFUanqjWwZTgz1g1FFLExcba50CU8AOD7B83XWpqMymcmgbWJj0etiG54vm3b6nfGXUQkNS60rLibc3RpqqA4ke2JRhCbgOOnEK1nKCWFvFOACIhvaljz8DvOf1Kk+3lrOGQYDQEbqKFUwC7gxFdKLcGWqH6PKLY07qDiYznB1HOWXXcVdCahKRQuoVyja+ZbXER4NHcFUNUkhFl/nhgH5/QVsXBZ1M+7i5XPhh9/oPsU+lRkbSgFsY0R0ZaryJmjTylX1sC4/218I7Dawt2heHalFcpAijQs7WoIQb+P8ZGii04xbMly5kaz2Ta+lwN95xAGHL3N/ults3eiBG8RpNP8557jaPQvCWPsFSPzYuOwUPWcTuuGmhqM5LPGQKfFiivjt+q8tMo/1z8+WmJl5T1wBs5cUsMGCnWKKoYssoMK3eTbjfQjgE6RKCXI9WBB1czmbg63gsSG+3DRc59Rl+Q8J8KC6AUhgbzEJ2kYchic2BP7QK5WmeH8AEXEoDzQd1xz0x8gMRLUDAhlB9jKwnT+XBwmEN1pVUJj4UW+NwcrVYPcCp1YmXtpWKfhU9ki5aRDSw6bTfd17ZF3aMzoePGkKLfdrImKxtXBZzbVCGq4ri1/KFWqH0ei/XyzCUe5Z1ds463/B5Dz4oKs5P5DEXVCrUv3OxtOV+Fa+kM9nyczOWn48unDQXwxkDjdzqEa+ttcLFUbHZiuq9+gmjONuiAkLKJM3n5nh/FJ8BZy1yqYmQ3y6LqgRkygInEtC8lfuiToCcCyu2L7dbBWhhScs9abRq/4zuSpGLYMjNw9GbDB7E7PnCWQpcizILi1aHVdA9QeMgO8XJp X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 820dad94-a1ce-4732-bdd2-08d8bda9fe35 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2021 01:15:08.7801 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZxSohkGoNoI3fkQyvQ6+EVkBXPggRt+QulbILTMoYsOrIt0zHVgiF9SFtYlYv4RnCeul5GJd3xcD0pYhB1x3aA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7930 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210120_201511_215420_0CD3E51C X-CRM114-Status: GOOD ( 21.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, patrice.chotard@st.com, paul@crapouillou.net, agross@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, matthias.bgg@gmail.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org 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;