From patchwork Mon Feb 15 12:34:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12088161 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.8 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,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 5E663C433E6 for ; Mon, 15 Feb 2021 12:47:57 +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 13C8664E32 for ; Mon, 15 Feb 2021 12:47:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 13C8664E32 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=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=UELz+uIkVyLKjU5HTJEisMnvdQA5wg1MNINYYJe5ylo=; b=soUqmcWF+cKPxPrJOidcH0jD8 INL7jneqCOtCHks78qQ+S49db/e9nhmu2Yp+tog74m8wdATb5FmACK3xwhSnpNl0D/xl/Gjk37QOZ jzuiENK/952rTYQmjTACI7C1iFixp2Hn6kB51okjnt4a7ZeD6Wsf3k6Jf2xGE2ElD5GJ7euqXqk5h s5+HcgMguJwtJ3QgQgozvlXNUHDETyRTvxouzzTtyLMD2qxODhXIs+w0+PqclcHpGmPVLVnMjPKKr TLsx8Cy872P8XOM/FGRCokvGjt9X4inVOQHabjK2JMUP2GhtJgojkm0mIbppi7eyezgJ0lb/S3zzs IFSBvZZ9w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBdGt-0003WZ-D0; Mon, 15 Feb 2021 12:46:35 +0000 Received: from mail-db8eur05on2065.outbound.protection.outlook.com ([40.107.20.65] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBdGo-0003Vl-SM for linux-arm-kernel@lists.infradead.org; Mon, 15 Feb 2021 12:46:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pn0Y85StUY2cEcJ/p2Dn7HqPY4DvnoFhk9c+CFFSe6Hi+pDIVKj5CXylf7K/EO/8/gJwZY1trAtUIU8EMFeom4EgwZ6uFfGKaWnhM9RycLuzpsrQCmy+X8SjfwQmuwkYvChVQtczvrMiFCdGe+WpKfzr3KJcwebOUa4zpnQSAksjNGdp3d49iphfJb6RTjr7f4v9ZmvRISqoG7rrJ7n9VVvoS+ZhLZDb+5PZD51ckVy1Fe/elRDyJ+RMSSx/01BRuMkaVLj0M8UeNoPPjt+H2xZztOTaDt937cq9gTDuadegzeY1ljBt4hEgtd3b3M4LLblhL49bzcWQCzpFEZ8rwg== 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=+pZPVCe4IDZJzwE7wf2Sm3GKMMFW+4GxDTbzpdypFKY=; b=abirYql/mVQ8squVL1LgRLZzTGWe2p2gRJMnc0j6tUnL797zwJrLIG2bFtbMVtkj9Ksh6Bs3GNs58zpkmXumtl1993yR0VCOaTjpD8yGgvhvFJFZRvTcaHHy6V8errkB/SJXtOaGDnwlOt4NmxSx6hawfHWAouLV30SONsIryejvB+zXOYFtdwsfIgPRO67CHwaXTodKfLpS6gd4whZ0vmjJrl6ToxF4fPPf/7K/Pod57V5McM6jkoHdRpzgR0nAiH85X4sT9Orsm4h3ePq9APJSwZdhcx+ZjkDgsomeU0gNhMjr8CLDiC3TR3Pxtb5Wcr1LhnYcSx6NpzIQD1HBGA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+pZPVCe4IDZJzwE7wf2Sm3GKMMFW+4GxDTbzpdypFKY=; b=g8hfRMGaU1W2upMF4lMNtgp8c26RaDRiaKAmaNZOfOu0vvxnAWnJxg8WvHpA21U6HZKzk0ZnvQIW49u2Pwa6HK/mnHDLpryl8GoZK5irwzi/+QIIvpqMW2SfF0cXCtzCWcCN94k17UV+KEJdzmvvomWOBL+YWEYwvjuKrT1Ih1w= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB5081.eurprd04.prod.outlook.com (2603:10a6:10:23::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.36; Mon, 15 Feb 2021 12:46:26 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3846.027; Mon, 15 Feb 2021 12:46:26 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Subject: [PATCH V10 01/10] dt-bindings: remoteproc: convert imx rproc bindings to json-schema Date: Mon, 15 Feb 2021 20:34:14 +0800 Message-Id: <1613392463-9676-2-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1613392463-9676-1-git-send-email-peng.fan@oss.nxp.com> References: <1613392463-9676-1-git-send-email-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR0302CA0019.apcprd03.prod.outlook.com (2603:1096:3:2::29) 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 SG2PR0302CA0019.apcprd03.prod.outlook.com (2603:1096:3:2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3868.12 via Frontend Transport; Mon, 15 Feb 2021 12:46:21 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 653d73d0-1105-4c43-212e-08d8d1afb54a X-MS-TrafficTypeDiagnostic: DB7PR04MB5081: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nAryb12D1gmMuZDN6kGj8VivNFqntu5akB8jz9+LVmMgIFr7gE5w338uhhOfi964Xad11AC5AAajMqTTMqQbUPjZQm9B6/WtO7pbhRZBOoPj+4yAwcLC6ZITLz16DHlxL2/KrKHJluFbUswj0DNRxC1M4tlhBK1Sy0k9fEdQxojSM+71odmCuNmkEm6ApLG9T4x7admHbjsozEH8nZRV+Hi83AwxTOSGccf3C2opaargOoVJil/mwo2z7YThUS+GIqeBKuMKASmJme1Tljxljon6Ib2ZPs3eyMjS0QiH8OYdvV4Mt/HMp9cLVB5q6+nV4ek7SNB2rTe+g3jJ61J5dbhuPbbIe8V3hjg6LLK//YA+gudvs4+W+++FPJK+SvXsNip7ibhA9QoFeFq2n5lGZUopFjiY+VwffZrjWzrq2jbxpnLME1gqhNWGrVZBuSYHAwWc6K18NlnF0e9aQ5XeT/fMm+C4DRzF7kge32Llg9iZRkddrTo+DLkOiqCaUdt8HcbF2U6e/WixlVzteTVUJIzi5mmXzVpPI3fx3MLByo9TcY057zJXXBtap69N1nFMWD92DZrBiJMUOeGdWUbNpzZ8h8mislsow1d6217CCqg4VYdApGue0DBxR5AEKzVz9Rd4SQDzzry/QLK9vzTIJw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(366004)(136003)(346002)(39860400002)(396003)(4326008)(86362001)(16526019)(186003)(66556008)(6486002)(69590400012)(66946007)(2906002)(66476007)(7416002)(6666004)(956004)(2616005)(26005)(83380400001)(8936002)(8676002)(9686003)(6512007)(52116002)(5660300002)(316002)(6506007)(478600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: i3wDG7yzqcCmopNk8Dz3v46uNy/nPqX/M82LOp7Pv2q4LiX9VbNcxVmWgwpdguUWgZLLoYEILCjbCcyE/N1smQGrLrarg+O93GEv8klFICncHYXeuwkLJ55urSvUA/wdoMnRRwXY1U37iK74P0u0aRiPFdvFJ2ibkpZ93bDrUwNVB/rohg+unXlVw1znJ04GsX5CNA01LxxAWWRl3bAGpeoiZ1zBvfOzBqC2vz1RDb1ikjgiJ1+osuky3kSRutymXhzCx8XxmxBsyOfCfIgL+Bhf3hSd96WSqqVmuL9xOg5p58w5AuSt1f2tT50nF8EpmLLNnp0HlpPB6zG3wUvQt5TLxDtc3HQIdm++i1cipiDm1BkwTvFwPGX4ByUe/EYXIt1kBmiJhTS796+1AtceBnELsLU85qukDIQi2mL+/WnwRXFtSWqh9eRcB+Nkjl9FgPQcFGyLK9oJ53koawnQ/P41SD5CMCk1k2+m1KwzpFFErWQZrzipB0fpHUtH4b4OLlWS0pIpCiLLWIJac+WPbHN6BBYf6NO6NBJCNcJvgr6pGepr8KN6pBCJ270tuXKocbKzJ5arJqZJN8Tjnfzv/gpeYuUT85x1LoH+1z11GExBR4ITYGOxU8HRqioT/zgU6AOqwBLiLpw05jrj1e+mMes6A72NAiM7SLCqUDtpyMWcuVT5z6VjgPgbztZ1F8PBdTnkDSQHd8zffLFylKnDIEYv46RPuSS170BBLJgm7Lf2cwF/HdGVdN63T4+VZgBFoqXxkUdt68MMre/oGjGsvofE1Qep3yIZXpBBiRmF3Yas/b/450JMCM1MZG03SsSVYftYe1lZ8vC40wBq8MnNIt3hW+vFI5h2MaoF57hLSsVQq1i61gRJaG2WdC1qlW8UEE+Hps8ZMDorMkg26hbXlAFDkWZ+k3dURdubomVMuMQU7wcph+jC4LpG38kEj1dSTS/6i+4hnD6g2NREVfHwK5wnfldmfiLxoQ/roSdTQ9ryp/SOkQjQufdmgV2SJm1ksB8bFdXhobkz8sT3/cWeVVJ3k1CmbpvE3PiMIciGnyvaZv7r761S1xKwNoqG8Pj3fvhyGXQE63+wMUlJc/44c3wmZ650IqIXafVo7p46jXvi7+I+hsmSRWTXuwvRWhVevECMRQY0iZf1q0g6yA+F+5JRAZ4VMFhU64pClPjyodDwUAzqo6kyZ8EF8/x0GyNjW1nNEXEIDqLW03uxJFXrDMr0UeynC86ggchhyu+Bs68VAuMm4+4pr2s6CmMxHUXE1l59erLa9O7SM/Ex7ai/EmQpje6NE6VyVDSufLhqvwy5k0jxcywVs6Boe0qB5fKw X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 653d73d0-1105-4c43-212e-08d8d1afb54a X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2021 12:46:26.6500 (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: zj5QIutFIWh0fyAKF86k0/QwiH0ugkrHatT+tmA7zrDcoEzie4kNxNTxihQE39XwegnMjvdEtg9eF6z8/wgExQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5081 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210215_074631_206003_E8F0FF18 X-CRM114-Status: GOOD ( 15.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 Convert the imx rproc binding to DT schema format using json-schema. Signed-off-by: Peng Fan --- .../bindings/remoteproc/fsl,imx-rproc.yaml | 60 +++++++++++++++++++ .../bindings/remoteproc/imx-rproc.txt | 33 ---------- 2 files changed, 60 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..8427d0f6e471 --- /dev/null +++ b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/remoteproc/fsl,imx-rproc.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: NXP iMX6SX/iMX7D Co-Processor Bindings + +description: + This binding provides support for ARM Cortex M4 Co-processor found on some NXP iMX SoCs. + +maintainers: + - Peng Fan + +properties: + compatible: + enum: + - fsl,imx7d-cm4 + - fsl,imx6sx-cm4 + + clocks: + maxItems: 1 + + syscon: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to syscon block which provide access to System Reset Controller + + memory-region: + description: + If present, a phandle for a reserved memory area that used for vdev buffer, + resource table, vring region and others used by remote processor. + minItems: 1 + +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 Mon Feb 15 12:34:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12088163 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.8 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,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 6C933C433DB for ; Mon, 15 Feb 2021 12:48:05 +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 1CE7364DEC for ; Mon, 15 Feb 2021 12:48:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1CE7364DEC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=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=6bI+4+0M5o+ciuUblbK7F/GUTMpuiV/F1RMFeyEQr3k=; b=Jaq/vFuUUABcC52GDKvY2VBtG RQCcmMcF3Df6R9ZdLgy5MMAUp5/OQmspxOEgjGP1/qv+4uATC2FghP20cfVELERAOnjnQlbOJWaok J8VD1wP4tSNh2wiwNRZIjiJFzZwumbPVQcR77gpbZEWSpQaaGwhPCgelRkNWh9ZhP+A8Xx9FwRrAN aNT69FsActEecSfLkOgLpIvu9osqtMiQ8+uC4FsgqZzv3EXk8dz5oY7f8rNIRbHAwCKT3yQ6ZkVLo DEQ/rOS/D7+gupQO34myLv3ce5k3Pox+bUfNZCQ3HBZ4oAUbfYSKi7Ng1+fGzKXTgu7OtVZXMNrZD tOXcLswHA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBdH0-0003Xv-5w; Mon, 15 Feb 2021 12:46:42 +0000 Received: from mail-eopbgr80054.outbound.protection.outlook.com ([40.107.8.54] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBdGu-0003WY-Gw for linux-arm-kernel@lists.infradead.org; Mon, 15 Feb 2021 12:46:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gF+sbrB1PDGI8p5jfvVoJxop1SpIqxlFli7FYd/4+QoGjer76kxP16T/7x7RupDRrvRYbphFb+AxrzHDK3XBfXqgsIZq6a2FvBz0+DzVUiTfrL6WUu5tOfR9qXOYvW+zqzS2lrgkOxgaUik5lhSgBZo5GEryzNxYmQbNTg/sfE6s8JQr6ON4UM2OFyVmVJDJZjolNVmeuAifpQb28erhrsBuVmJm+gM3bPVxuO/X2vPR3EcyeTv1wkDxD5AztTOHQ920NlbY7yiWHUlWhoroqM1KoMLJmvPSSpgh0mmE/hCRGeX+oIflhiDzzwi0avC5ptLSk54C66EBE4fZm8YK6A== 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=dmoMHqZBPsl8SeyXNbGQhYN9YYgird0xDuOayiiXljs=; b=GPjzGJ/4udH+L/j+WjG3ZvZXWxMEps+w12bmTaONV4P2z/SF+jlbpdYTnPKiWkIuF36EVqHuiYJnz3iTpWjqia3iAMxDpWawiQvUYVbYtnmdGbgskqIssNWxtcILbZl2iyk8yCyglWVHNnMJZKoxmP3eh8vIV7RnrOL+0+qTZcK15aPnqs42WPlP5Ad15zsTXPVxO8qzxfXycx5mOo9j4dDLWwIaVgTHyOhr5YWKBHDzHsP8W+oPXPdF97yV2xciAN3VaCnxWVKr09DoXHtffyMp4cVomwr4mKQicCqYp2UA99n8woVqIwsuxc8nfI4KqKEHGveXwk2rrksMKv4arw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dmoMHqZBPsl8SeyXNbGQhYN9YYgird0xDuOayiiXljs=; b=FzWxOk7eaTRi0rn3G+PBtH0eALiQ4G47yUl3Z2iiEwTWAjrGGnegn1yt6EYebyWOFYnGM72fABVK2MKihVhVz2QYCxFkVrZJh1fH4GDa4+gjoDIQ5wFIV82u6t+eLHpxcXvQAAWM3h0IrEuwpadaqZ9RT+NUeLdNPS6eEjcDQCQ= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB8PR04MB6859.eurprd04.prod.outlook.com (2603:10a6:10:119::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.27; Mon, 15 Feb 2021 12:46:32 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3846.027; Mon, 15 Feb 2021 12:46:32 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Subject: [PATCH V10 02/10] dt-bindings: remoteproc: imx_rproc: add i.MX8MQ/M support Date: Mon, 15 Feb 2021 20:34:15 +0800 Message-Id: <1613392463-9676-3-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1613392463-9676-1-git-send-email-peng.fan@oss.nxp.com> References: <1613392463-9676-1-git-send-email-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR0302CA0019.apcprd03.prod.outlook.com (2603:1096:3:2::29) 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 SG2PR0302CA0019.apcprd03.prod.outlook.com (2603:1096:3:2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3868.12 via Frontend Transport; Mon, 15 Feb 2021 12:46:27 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5e00b708-d42e-46f6-f5e0-08d8d1afb8ad X-MS-TrafficTypeDiagnostic: DB8PR04MB6859: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2958; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XMDKrhPy5sm1IW/z7p6RWPHgH4JR+gL2t4p7PDNzLDuFmlOnxSrZwczc3nS4zf4N0+ilef/7bgqHAssBs24sJEfLlIygB/ny43yE0v7QA76V9sOjzdbP4VvUfLDrUllkVp0kJg9Xa14xBHnBzmnMyWZLFS4+ALm1GXIX0qG/vnREuuHXwduoHbDRrvtJxMwtUy7V/fpY3o6vQxZ8on8d8FPxxrMptNWsgGju3AcJ8RxNRDrB2bCN1+Q/kpGv5zXryAbUySosnJ+IH6ZvN/8bB7ew+0uEXZhhrCTWXLdy4GXd5mCgMOwlJqzhh1osb8Ez6JT1qxC86JTzC+sSV3JjSI84sv9GlMGSadSikMva6QsDCtHwmEnGUApK7HBsMFsrVvDDNugdcDscKXywQ0lQZ6CGylb8l2jLycNhqImaeoAuaYoXbxJW6fOFJxk7ZCRE3UiSAPmKhrzbaxfPaqpUxV17G7Jku5FXcW4kBL3aDyvUKdSjfCfFqXMJuO4ZLx7nF9Zr54u1M47iTOQI/WrYo+2yzEW0Dlqpbuwq1qIes+FRILdu9B/dlzR888CfhfPw8YQae81HTTohlVFD91JAJM+mBUFvJKnDimyEVS97owuLEKNchBuEUsF22tqqHPmr9oHthDnqWmeqVXZNJvDngTVx5zfscS94ZjM+NwlG+Jg= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(396003)(136003)(376002)(366004)(346002)(8676002)(6506007)(26005)(956004)(2616005)(2906002)(8936002)(5660300002)(69590400012)(16526019)(66946007)(7416002)(83380400001)(66476007)(186003)(66556008)(6486002)(4326008)(316002)(52116002)(6512007)(9686003)(6666004)(86362001)(478600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: UV4vTQVxgIuLit2WzZY8IeeIcDIOmk1Yv4d2XEWqsLqZoiJUSv8jJvWEmYPNggdLPp080X4OHkTrO1iLFfpokzUCpS+qL+prUZE+rCzI+CcPsFJHTb7AFtaTB7Wj9rJFYOUvdKlvm5PehFqJfBt10IL0eMLPBkvJLxWvXP+zzYnoqoA/SJrdhWcYsL+IMo1lRuXYBEdbAhhlUIpPMd6co8/fWUO1zTpEnjVDXYa3FuDB+yjWGyGPLULUsFYNybVcsyzCFDml/Pg4cdicx28uz2jKzV+jX81+1Ua73ZnhglP6ZLaRftmfCE3j3B/WgI1NyG4GxGwwDJRUNIyzk5TWYEiJJsuhInUZd5Js4YHb/xcdSdzo30sOUHF2W3GFN8XmoFARsqzYRhVBPKCdAPiAg2QVjHNMfUfN/+1KVfhlAe+9SxLKCKZ0N6mrCrANqeMLI16YhsbySFraIgnczbDbdxdeADH1tv8EdhFa7eNap1ZFiZwu6lBFD01ZtfxYYZR9tlOZYoFCt6z8DEBhF4DtxKksxlfGZGZLuZMS8YBwzDTsnYskV/F+iZsJf1hm4+5k9eCRnxPo7QwohCZChKrC9Z9hVDJFd+YCMcUnvZjQPVuwViMKCVPX4qZSs9R289wsJ2rgTJHE6JCrk2nOk8HJAaBWX4ICat6uzzbQJJTaQrlr3TIpb6hI62yxcnWOjaO+KDaO6Axs6InhG5qaFeq99XHJnmV9Wz/rkVIKZSlGrzqoRldSj/dAz/mZOaCQcEvcimsPziBpQ1PNRrEPZXdZ7DZcmwOOLKnEJm/r3JpDixUDWO3GpXc3EpTLmCbwb+0vcsomHtN5Fc/rEDwrus50QjMuOKy2OJk3xWrTDspbtKujlnZXV1Kdo5nbmDL8Ndq1VkmCg6nFzqNLxTgVjAtxswv60D25PtXhgI26T58hjdvjSSv9OiCWqEq6j3SZemnbBIf56mw2uxvSD/XYl7VMpXnGNLO/vV25hAd0yIryiniFt3pmvrLGUI1NywIS3fV5MixAOCK7CE+Yv79XV4Oa6N70PGDUbwWzJnjroHPOmpktwsoFEQc7guScs8OAZg+ySSqblguNIYTEjR37WGZdYBnEmLvJT3zYx7/Ue+BMIdJRuUM91DxA5mcVpyfT+/4JI93g91OT3bm/+rhF9NK+pzMcYm97rHrhsUQVuE7dzfvm3hrxEhIlnVc2bJDw0cFP94dGbroH1ZDiZ0uY5MFffsqHuMp5YLZTynxpQBXxjM9si/xGwCRrg6b/g62nd3FK6Q6SglcejOaZvNQeJdQR9nDUb8SpTuwdEbGfGg+rlfQ4poje7lW0sp8/lxRsmTeY X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e00b708-d42e-46f6-f5e0-08d8d1afb8ad X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2021 12:46:32.3174 (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: TCCcCFrzfLkQc1J+FZG7YO9543Ll+FaUT3mGDKKeVeJj8uwj6HtJePHnOIFzPFhnWVVXC8kQdVY6p7rdM1WiWQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6859 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210215_074636_638011_4A5554B1 X-CRM114-Status: GOOD ( 11.95 ) 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 8427d0f6e471..f87e98d98413 100644 --- a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml +++ b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml @@ -4,7 +4,7 @@ $id: "http://devicetree.org/schemas/remoteproc/fsl,imx-rproc.yaml#" $schema: "http://devicetree.org/meta-schemas/core.yaml#" -title: NXP iMX6SX/iMX7D Co-Processor Bindings +title: NXP i.MX Co-Processor Bindings description: This binding provides support for ARM Cortex M4 Co-processor found on some NXP iMX SoCs. @@ -15,6 +15,8 @@ maintainers: properties: compatible: enum: + - fsl,imx8mq-cm4 + - fsl,imx8mm-cm4 - fsl,imx7d-cm4 - fsl,imx6sx-cm4 @@ -26,6 +28,20 @@ properties: description: Phandle to syscon block which provide access to System Reset Controller + mbox-names: + items: + - const: tx + - const: rx + - const: rxdb + + mboxes: + description: + This property is required only if the rpmsg/virtio functionality is used. + List of <&phandle type channel> - 1 channel for TX, 1 channel for RX, 1 channel for RXDB. + (see mailbox/fsl,mu.yaml) + minItems: 1 + maxItems: 3 + memory-region: description: If present, a phandle for a reserved memory area that used for vdev buffer, @@ -57,4 +73,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 Mon Feb 15 12:34:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12088165 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.8 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,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 7ADD9C433E0 for ; Mon, 15 Feb 2021 12:48:07 +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 3389E64DC3 for ; Mon, 15 Feb 2021 12:48:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3389E64DC3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=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=MasD/tWRt8lxQqcei8KJRx/TFvFLSQVdijO7SE0LmLA=; b=tzCNVpWcqEuTuJnY/soNPLagR 92FmG9SIHxs08AaWBbiQubSNMbkMsTk+sUDhKnJ1p7yJPYqB0SvsxRZdlw8L1YhJM8Q/0c0yaHmvY l6zB2H22XGzLMRrikdfjUXGl+EyhAttA2qOyalJ1evT/BWG0zuzWbBTAIV8HC6xlE1H1vXs5CePMU g32c3OlmnGtV+8Wlx69qa+JzJ8pGq814vQp5mqTIKq+jD8DICx+tw7rEti1JAcRiOolGjp/4LwknP vDfKh9IX9SGRlLw4B4pR+ld9femhvYB0Wq0lvTymkoDZlZpCuSpaYrMgQiSqrXDTy+3FonTaoFXPK jVEuURJ7g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBdH7-0003aE-Qq; Mon, 15 Feb 2021 12:46:49 +0000 Received: from mail-eopbgr30063.outbound.protection.outlook.com ([40.107.3.63] helo=EUR03-AM5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBdH0-0003Xr-Pl for linux-arm-kernel@lists.infradead.org; Mon, 15 Feb 2021 12:46:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a56AWsNY1UaWLf6MAR44OP6V0mQKFBFyXGOJMiyow5lC/pu4KzhO6bvhygdQmzEy8cDmn9BTAHyg6DgPpr+908P+Auh2NxxV0XKi8AzL0fcx0pHiqgEmKoWb+exyITlqPK3tRjNhyAfbFQtJfx2YsLcSMr1O8JwFf5T04wJT4FAjvnT+2inznXD5S8BT6rm48/dcZB1GhMoFM115UyaqPvWAZ3R4AkteB2NuOSP1FfvbrGeN+uknMZ8RCrNp+XgxI4Fchw4WKlENLQAgWqVatq29kbppSCgQs3suApbQeTZN23P0sUIJznQz4qdJA0h+gXAAxLqa5rPTOqEFR3nPfQ== 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=rSh0Klx+zNLSyY9W2gwUiOZPVVqrU82ogdPg4tjElUs=; b=gVXvPdVPGHWtrT5Juzsk0XpLqBfRFLAM3rFaVWJnJflUU1PC2kJcfQR6FxBI5UuNmK3+Crmnm+JDbFW2MeMPIucESwOYGZwjhjat5e/05mze71ajwfePN7958jxo5tcQM9zseIXDtpK9HCq/c6xKcKrJJ5ffKV8K1kOG9/ucZHADapU7ggOqjep6+Kr1TXz2oxpaakALhp98uiVO33NZLyGt7Ri8vSDwdvbXM2727RMsl3a+G8N/1sxurg7syK7GFjYstXFRg7qcGo2B+PwjoscVejwDpPB6FRRDzb1Nik12P/tahrvw3IjwTKiS/pK5R/W3XK/kk4aSUIWBAqsyWA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rSh0Klx+zNLSyY9W2gwUiOZPVVqrU82ogdPg4tjElUs=; b=jU8Wi+6dVOME2WUH6HGLAR1MFIip+dL7gez96+YzPA4131rzL3o9HzoHy9YOxE4Tn0pc3KdsFzjJfLBkAsaEJs8KPIFlklVWt99LnoKly0XZ4aXWgy6gmGydOMCm2gOrGLmkH23p8jWByyqOO6fD6DTxk913WxMJCRCItreHdCQ= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB4091.eurprd04.prod.outlook.com (2603:10a6:5:1e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.27; Mon, 15 Feb 2021 12:46:38 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3846.027; Mon, 15 Feb 2021 12:46:38 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Subject: [PATCH V10 03/10] remoteproc: introduce is_iomem to rproc_mem_entry Date: Mon, 15 Feb 2021 20:34:16 +0800 Message-Id: <1613392463-9676-4-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1613392463-9676-1-git-send-email-peng.fan@oss.nxp.com> References: <1613392463-9676-1-git-send-email-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR0302CA0019.apcprd03.prod.outlook.com (2603:1096:3:2::29) 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 SG2PR0302CA0019.apcprd03.prod.outlook.com (2603:1096:3:2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3868.12 via Frontend Transport; Mon, 15 Feb 2021 12:46:32 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a702995b-ef96-4bd2-cef7-08d8d1afbc0f X-MS-TrafficTypeDiagnostic: DB7PR04MB4091: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1091; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hDrcA0Cxt6619pj54VI7XahowygU0bpacIrbUJldhb2dDV+aAJSleLBjMXA17+CTLJEff1X7kgK3xJ2yBWIHYlSEHTSay+WEEYQirTwhRBQBR6B/xgUDfr6GtKCSjWuke4IvOJ1am+Rdj8Qfct0G9DMBt1/o8hT1Dn+zLLZCapB0OuqK+C3XN2mO5fS2o2JGAGYRUSoayZqtcMsjI65p8PjGw2NQ3WVVmcHkLNU+sMMR2sdsUt/uxrdNOZItVZchfEkFpQtEnY8s0Mchf1Qx+T/OKiiqgqU5yGOFE2O5Iw1iXoFGoFgnSaa5YKVKij6w/ogxip24mME56m5sihmLWQ4BS6GyCebKmwJwaEtWa2CtJQ8/Pj0atTqfv4CYv39YHnsXAfnHQnrVEoEZd49h3HrJT+BfdBLn+vLfRaKgAw2U4v4YkNNigRYihNU/f7pzR0hR99D8iskth/I1h3v29igONhETy1zq7+qIPmT0DzsfZI8gQMHd7OIxPqhSPNlHd+of+v4/MFckte4CgfpFQlcDDmtLUYzthkVWeI3WnhWOba/JxQq+HBfjixWXy/WNqHE/ZsZDndXBigDkdUl93A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(39860400002)(396003)(366004)(136003)(26005)(6486002)(9686003)(478600001)(316002)(186003)(52116002)(6512007)(2906002)(16526019)(4326008)(6506007)(8936002)(2616005)(956004)(7416002)(86362001)(66476007)(66946007)(66556008)(69590400012)(5660300002)(6666004)(8676002)(4744005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: EVTmGrFw2C5K1cfyYZKypnRVrNMgPJ9Kxd5Ty+0zDQm1JZowgF/sG2mZ1WZDlhULYq5bk9+lrrIgmXj9bW11tXoEVo6z7z5wWiIZpGW5OsWzZvheGiojKQ4afl7IwFu1jFjcZdjF/0lzXWU0W5enTskcIjuCskgktxzcMICdpHTmuZGXrWIdenfWNXM9KHwBH3BMkhUnD7V0bAd4VV8+rm+lz7oDXktbuwnhqUrytrKPAkF2UFB0rxMCtA+54lgpg2hOg5ed3lyhciD6ULQ5L0lweKacpbwC/cUt7+hnRuaf4ItRIv91aiSwQZ0ZxP8OLthEB6ux3ATaz6WLvKWv66WDAZABhlhKKK+JifEHbuxVASINKHyyRUyjG6WXNh+YX79J78TUox9KKbkSIIeegW9p1qhrlOfZBtH/xZfsU9HsWkM9TthVx07lRcdqA2KxsBBgyj6mrPmD0/i0EEDQ+GeInkcaND72xUNmHeuW13TII8U00qp1Kccp+oIvwiCCa0e582iGuuhs+N0uCW6ya2DCz9ftuAlQQBZXSeUR5YjGx/Ody3uH6HMWrUZfn+XDaW7LpnwYTmtrjNOvVNkBEoQr7R2U/VEhbhRj2V00xiM4kT9Mqz5Gnkw5Qk+YjeQs7xpEs8dG8AdeemOsDnilA7D9rjBBWp3MWmTaGBi3Di3h3AOIqCUo2PWoEmYI01kBKw/+uqaSoXJgMxvPqh+3BZGm/z0po6CnZwpE61oTbrlFi1ksYSJsmlZHvSMOAMVtppyRmtsnLDeClUin2/6oUqPXIAk4go3/qBo1M+Bil2WsU5tBH/o/jkZAdYXbRlYn1i/pX3t91mV1Ct+/YszHszE5kKnlW77F6KYE4qNcAlHRukRPQyHz1XH0UZUGX5GvudH6vgFi0USRVpoU4E+fCxW86a03sBVE5rh1fOv5sLyneA8dOgyV+6kUaTQk37QW0E44pd1Eet+zHRVJk4Aelx/bwaU9JVg2EKgST6m1jb0kXqNWfSG5Dj78ajfSk5nzbIRja4QD+6dIxXuF9/71PX8KvPOVKqhPrq/5BpPJrFiWuKv0S3H0IcLjBs1jTtoD2OL603UTky8eM3MwMbgxIJMoDHnHDjLGFyufp72+jDoLEgsmE1jTPx6UZn7eFVV2I20EUjW9xSZaSbCt73LYVJeJNfLyfGt8kWIK3UIyY0AgFdSGozImd4WPTgk0KQ568zh4+TFJoTjL79LQtBNJH9J+QMLmtI0B7m+sKC54SxTjJeV1H4dezOLC5fTakZW7sSQsQXu6LEqZRpIyHI1AFiJk5Ifbt2kUkRcseHxYOnS+uKoEtsuCG9UJBL/sr1H2 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a702995b-ef96-4bd2-cef7-08d8d1afbc0f X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2021 12:46:38.1058 (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: bCpEHq0AIvikTtXNE7TU/+W2UY8DEihpwEUZTl8A+5hcXBtAEO5D064R//Ds26ubeqj0KGcYf6EiDk5EcEK43A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4091 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210215_074642_929435_A5C78F9C X-CRM114-Status: GOOD ( 10.60 ) 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 Mon Feb 15 12:34:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12088169 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.8 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,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 86BDBC433E0 for ; Mon, 15 Feb 2021 12:48: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 1635764DEC for ; Mon, 15 Feb 2021 12:48:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1635764DEC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=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=QVpQ4csuUIg8MN2y/hjvAFWA0hSfh2q98QjfLSmzMDw=; b=Jnw44KiJ+xpv9RGcHT6fobWOi FDM+g2V9qv2oMMAD9VCfQALt0ZbvfjwA8WB/Bg6PF2IBnxK8UJ47Cew40qH+xGvxK6yy4f1BzR9pT N1GFm7gONwmpdwORQgPZ7tUHJfHVzvN+pVB6wUZY+O8ACMtAwJM9aUKjPK0KpEuyZTdtrC+//Npgr FmfKIV1VnQ5YHv71dUaR4TtDACbnlSwXi5LBq3y8x7E6DROW6XWt06HQg58ieIEgizx5Us95IuBem jB1Ont4YZV4cB9zykWRZIGIZdGQHGUANfnOdeTTfd6GLbD5rLRyFnOlvglik9QC1iD5+2ih31cQwr KOBju2w5w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBdHI-0003eC-2u; Mon, 15 Feb 2021 12:47:00 +0000 Received: from mail-eopbgr30074.outbound.protection.outlook.com ([40.107.3.74] helo=EUR03-AM5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBdH6-0003ZW-It for linux-arm-kernel@lists.infradead.org; Mon, 15 Feb 2021 12:46:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ciCJ8dHMWPTljBiKHxd2pw9Ug1oiBxKm+fQaawcHDSlLYeJsb3SrZjKfWdrb911DIIazS7GndxrX6Zt41fdrrMjFQg/AvNUjsKDdtd8r6wAzcPi516EC1ULlUlpKmH4yLtvAo8ffP0oD8JcFQyjty6FYBXcG4ppdW1W6iWEjeowVTjeFGl1uuFYHoez3FDuTpDoLVPhuo64t3n0DWaS5LIvSJhc6bRhfqc/ackJgee4kiT9Je9EjdrkHQGpJud+wnYSK63HB3kq2St004yDgZEaPb7ArPVgW7uZB+fmkKRhDTW+ZdahJdPf2CYq5Lkmw4SW3rl7c/fwFuinf7j3MJA== 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=h3macN6te2ODWmWB9GoKYvgu/NuH/FlGc+HqUZ8HFWY=; b=hVi+zmDzeqEbjjsdvPlr0QlW33iUPdXbOJ8wVtc34cHYRWX0Co5rl5mqdeSFoz7atH4JBMOrzy1/aawXn/C4o8PTvfb4ZRlTgtXtQpOZZUE4VZrXpVf6C5XmLwghflN4hZL/qvB8ldST9k24pxo6bOPFw0yIQF019EGHEGCH+Mr8CQFSkpRnUMEHkR96BpNAJBh288rbnkzQ/F8hI0VAtjtzRWdMkdTcc4rAcQqAoZFSILoHBNrDxj6Knchb34vGpogGxrxdd/p7bFi/E4NVdM7OyX8V+rfEzBJ1IxAJrGpvSTAAuzTCypsxvBTeeZdALTe3zsr2tf2vEmBUj1Q5vQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=h3macN6te2ODWmWB9GoKYvgu/NuH/FlGc+HqUZ8HFWY=; b=RBQXpU+AChJqTJSFK12m0xIV7d1B3LHpkrzXMFuuQcEul57pJV3AJx6qQ2CWl/nUipHHtk2+sDvyO2U8gJLx7CcQ7z3cLUbm2UPjyry93r5sp8gXOBmTlpwbescOT+6jpaq/ARSp70pZNpUEZVM1xNsz0xDOolUnJ3jz/F0sIlM= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB4091.eurprd04.prod.outlook.com (2603:10a6:5:1e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.27; Mon, 15 Feb 2021 12:46:44 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3846.027; Mon, 15 Feb 2021 12:46:44 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Subject: [PATCH V10 04/10] remoteproc: add is_iomem to da_to_va Date: Mon, 15 Feb 2021 20:34:17 +0800 Message-Id: <1613392463-9676-5-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1613392463-9676-1-git-send-email-peng.fan@oss.nxp.com> References: <1613392463-9676-1-git-send-email-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR0302CA0019.apcprd03.prod.outlook.com (2603:1096:3:2::29) 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 SG2PR0302CA0019.apcprd03.prod.outlook.com (2603:1096:3:2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3868.12 via Frontend Transport; Mon, 15 Feb 2021 12:46:38 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 46d0d39e-ac22-45a2-f56d-08d8d1afbf83 X-MS-TrafficTypeDiagnostic: DB7PR04MB4091: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FUNpQt/7mbuc4bNMGBm92VdhBkwK/iHH5xW9b5QUUfMMfebDT3AYVMM9R5ABtHIh53W9s9l/M8luryOiF372JPPDMeYYq1j1ybIfnQ/6CyKildiIxQOYGLzE8D2AA+dDmm3zfateKR8E/alkWLLQws9ekQfxuCcUOxKDBXhFfv13qsozIbWhH7VVU2/a5O7fjFjcouzhaEewJUKecoluf/GSGCsIvLcxZ5NM/wZQHiOOsrvG589/PTm68R1Noojp72vbUf1LN53rlUU74SqODm1HYH3uGYYvzXXQdPYTbw1Anpv/t+n8S1ZO1Z3zpTvcxwlbH/xt+f7WdNFmO5LyqXhnqeCNu2iahwrSXD+5wBirld8npYv4Xern5Ov5S/L8Ta7fFGIbyJacsVQ7qmlAIzR6IwZEpE/DtTuKkWfVMdiXatcUYeK/7SWbo4lzCSsefGSrjWN1isor3ZWLXoYKLK5PC9EsoB8W9tutXbpe9ehGpsMI97tkvmR9ZJzq5ywjzJICf2A8eUlQbbu8C8Yotqpby7tt5zpLM2lPDHwr3sHK868820rBGykQ/+uEg73nuLHmBv5gEedZPPACrrCp6g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(39860400002)(396003)(366004)(136003)(26005)(6486002)(9686003)(478600001)(316002)(186003)(52116002)(6512007)(2906002)(16526019)(4326008)(6506007)(8936002)(2616005)(956004)(7416002)(86362001)(66476007)(66946007)(66556008)(69590400012)(5660300002)(6666004)(30864003)(8676002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Xxzkntt/6kuQFEEj08yES0Ee2mSX80R/xWEs5j7p1LLeIRnRs8Phd4pdBuZSPWAoG+ZweKD/iFrHkt47RwynrZDZg8sT6YmO95/94abcuBUgRQ2eJgflC/wh7wKFxawDoU1RLa34XAc223iFcaUsc3lU7FA2+ehZ4R8xZ3gtFC7bSNlpqQIt8IuVdAwHKH3sXfYuxkmO12nXVBAHzCWnld0z4pITzPaprwJ+NTvBryt6oalQAhXpoo5v+hAqIPyt1FKBwTmnoaBynNOhTCXr0RTjFSqgNdPHl/PIXAzUodbjxrf2Cj7smI5sPioWcru5wvWDGjVB10mi3zAqTIXlpc9FQR4sXyRLPwUyexGm/TDip5TW+p1KtaW4XBAzfbXwLN/UJRh3gC8WryZxHY2aC3+bd3TUKfnw2e+I5Pt4bQ9bzlVohA8mg525MvemudIva9lAfr703lyRvtQiQyv+ok6jlX7N38qbAl3qCEzBQpbmcNEzQRBuChoQdMb1/Iky4eyCazmlCGik1994x7B9Z1bas/rvt88GGXWI06O9CCWXlmu0tieRJGJC1dr5S77PHRXbJnL3oZlEcUXhZwTzxH3hvG6s5hxA5Il7LMw5jo5rLJra7my2uZhfzffx71Jf1llT7I4YPJNE5CVKVXKfEj82gTuRvQqJvEe1Djanraa+gyKfoZ3naOIZqrEtMKI1U1NG/ho016QX+AFsisTCNIgFg7eADzhrYKqlic6MJiQgwWTKCrw24vPZKK/d+k9GuFuFQCU7gCX4taG1uSGc+r41ztv6CfFLWmnYIYCW/FjF7jYDGw9L3yzhDlwuYHGfILRItD9ibzkpqm5jGN0KuWYGU3Zjeb4bXDhqfi7ap08uAIVPX2ggxrnwEFFw9kG/12s+hLB5x4QPMwa9Ap5UkdxlmIGsyO6ZKx3sVH0ncEbFOeJhjE2RFWuCWKQqVrqdEdFgVYK1lIJeMvdLkDjlLKchDpwWKI4lnlpc/UKPAC3opPM787DTdqPLx/2X7pCD1dl97CM1iZuyOwXPVdFaYWx+fkNHpYdK663Wjg6ARXvmHZrUJhEIZTPNlI8Y3qkNaeHI5eo5zP485Gjf9vrlWgbpayogGQwSh2GqBqxTlLbql62Z44cSy5L+0t7o7/NH4poMvy5Kh96i5t40qPLSkdXIiJKbPWT6FyUsqXpy43FRufp+W4rP09t1Ied3fVzjMrwQhzn11qORcm/oRue51oxWShn9m1Ckz2ymxbttfgCRLrnfCAT1Qsp5p7esEm8BFIs+sUNlCr0zxjeFHJCemq4thEMiH6xAKT3fM3hE+auLS0kHg6N/MAWs10HqiJc8 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 46d0d39e-ac22-45a2-f56d-08d8d1afbf83 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2021 12:46:43.9951 (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: 1TX05lO0Dfi2t9mMMwRPLP2CoCuDLHzvRdh+LVgYQcTy/0edQtFB2TLAfTKSVjtsszD9LWhpO0ElpeXpQSoELw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4091 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210215_074648_897565_8F9B07BC X-CRM114-Status: GOOD ( 16.87 ) 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 e2618c36eaab..a356738160a4 100644 --- a/drivers/remoteproc/ingenic_rproc.c +++ b/drivers/remoteproc/ingenic_rproc.c @@ -121,7 +121,7 @@ static void ingenic_rproc_kick(struct rproc *rproc, int vqid) writel(vqid, vpu->aux_base + REG_CORE_MSG); } -static void *ingenic_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *ingenic_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct vpu *vpu = rproc->priv; void __iomem *va = NULL; diff --git a/drivers/remoteproc/keystone_remoteproc.c b/drivers/remoteproc/keystone_remoteproc.c index cd266163a65f..54781f553f4e 100644 --- a/drivers/remoteproc/keystone_remoteproc.c +++ b/drivers/remoteproc/keystone_remoteproc.c @@ -246,7 +246,7 @@ static void keystone_rproc_kick(struct rproc *rproc, int vqid) * can be used either by the remoteproc core for loading (when using kernel * remoteproc loader), or by any rpmsg bus drivers. */ -static void *keystone_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *keystone_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct keystone_rproc *ksproc = rproc->priv; void __iomem *va = NULL; diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c index ce727598c41c..9679cc26895e 100644 --- a/drivers/remoteproc/mtk_scp.c +++ b/drivers/remoteproc/mtk_scp.c @@ -272,7 +272,7 @@ static int scp_elf_load_segments(struct rproc *rproc, const struct firmware *fw) } /* grab the kernel address for this device address */ - ptr = (void __iomem *)rproc_da_to_va(rproc, da, memsz); + ptr = (void __iomem *)rproc_da_to_va(rproc, da, memsz, NULL); if (!ptr) { dev_err(dev, "bad phdr da 0x%x mem 0x%x\n", da, memsz); ret = -EINVAL; @@ -509,7 +509,7 @@ static void *mt8192_scp_da_to_va(struct mtk_scp *scp, u64 da, size_t len) return NULL; } -static void *scp_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *scp_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct mtk_scp *scp = (struct mtk_scp *)rproc->priv; @@ -627,7 +627,7 @@ void *scp_mapping_dm_addr(struct mtk_scp *scp, u32 mem_addr) { void *ptr; - ptr = scp_da_to_va(scp->rproc, mem_addr, 0); + ptr = scp_da_to_va(scp->rproc, mem_addr, 0, NULL); if (!ptr) return ERR_PTR(-EINVAL); diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c index d94b7391bf9d..43531caa1959 100644 --- a/drivers/remoteproc/omap_remoteproc.c +++ b/drivers/remoteproc/omap_remoteproc.c @@ -728,7 +728,7 @@ static int omap_rproc_stop(struct rproc *rproc) * Return: translated virtual address in kernel memory space on success, * or NULL on failure. */ -static void *omap_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *omap_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct omap_rproc *oproc = rproc->priv; int i; diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c index 5fad787ba012..8df99318f18a 100644 --- a/drivers/remoteproc/pru_rproc.c +++ b/drivers/remoteproc/pru_rproc.c @@ -483,7 +483,7 @@ static void *pru_i_da_to_va(struct pru_rproc *pru, u32 da, size_t len) * core for any PRU client drivers. The PRU Instruction RAM access is restricted * only to the PRU loader code. */ -static void *pru_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *pru_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct pru_rproc *pru = rproc->priv; diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c index e02450225e4a..8b0d8bbacd2e 100644 --- a/drivers/remoteproc/qcom_q6v5_adsp.c +++ b/drivers/remoteproc/qcom_q6v5_adsp.c @@ -281,7 +281,7 @@ static int adsp_stop(struct rproc *rproc) return ret; } -static void *adsp_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *adsp_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv; int offset; diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index 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 2a6a23cb14ca..3a131163064c 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -320,7 +320,7 @@ static int wcnss_stop(struct rproc *rproc) return ret; } -static void *wcnss_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *wcnss_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct qcom_wcnss *wcnss = (struct qcom_wcnss *)rproc->priv; int offset; diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index ab150765d124..a1df4d7e5323 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -189,13 +189,13 @@ EXPORT_SYMBOL(rproc_va_to_pa); * here the output of the DMA API for the carveouts, which should be more * correct. */ -void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct rproc_mem_entry *carveout; void *ptr = NULL; if (rproc->ops->da_to_va) { - ptr = rproc->ops->da_to_va(rproc, da, len); + ptr = rproc->ops->da_to_va(rproc, da, len, is_iomem); if (ptr) goto out; } @@ -217,6 +217,9 @@ void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) ptr = carveout->va + offset; + if (is_iomem) + *is_iomem = carveout->is_iomem; + break; } diff --git a/drivers/remoteproc/remoteproc_coredump.c b/drivers/remoteproc/remoteproc_coredump.c index 81ec154a6a5e..aee657cc08c6 100644 --- a/drivers/remoteproc/remoteproc_coredump.c +++ b/drivers/remoteproc/remoteproc_coredump.c @@ -153,18 +153,22 @@ static void rproc_copy_segment(struct rproc *rproc, void *dest, size_t offset, size_t size) { void *ptr; + bool is_iomem; if (segment->dump) { segment->dump(rproc, segment, dest, offset, size); } else { - ptr = rproc_da_to_va(rproc, segment->da + offset, size); + ptr = rproc_da_to_va(rproc, segment->da + offset, size, &is_iomem); if (!ptr) { dev_err(&rproc->dev, "invalid copy request for segment %pad with offset %zu and size %zu)\n", &segment->da, offset, size); memset(dest, 0xff, size); } else { - memcpy(dest, ptr, size); + if (is_iomem) + memcpy_fromio(dest, ptr, size); + else + memcpy(dest, ptr, size); } } } diff --git a/drivers/remoteproc/remoteproc_debugfs.c b/drivers/remoteproc/remoteproc_debugfs.c index 7e5845376e9f..b5a1e3b697d9 100644 --- a/drivers/remoteproc/remoteproc_debugfs.c +++ b/drivers/remoteproc/remoteproc_debugfs.c @@ -132,7 +132,7 @@ static ssize_t rproc_trace_read(struct file *filp, char __user *userbuf, char buf[100]; int len; - va = rproc_da_to_va(data->rproc, trace->da, trace->len); + va = rproc_da_to_va(data->rproc, trace->da, trace->len, NULL); if (!va) { len = scnprintf(buf, sizeof(buf), "Trace %s not available\n", diff --git a/drivers/remoteproc/remoteproc_elf_loader.c b/drivers/remoteproc/remoteproc_elf_loader.c index df68d87752e4..11423588965a 100644 --- a/drivers/remoteproc/remoteproc_elf_loader.c +++ b/drivers/remoteproc/remoteproc_elf_loader.c @@ -175,6 +175,7 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) u64 offset = elf_phdr_get_p_offset(class, phdr); u32 type = elf_phdr_get_p_type(class, phdr); void *ptr; + bool is_iomem; if (type != PT_LOAD) continue; @@ -204,7 +205,7 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) } /* grab the kernel address for this device address */ - ptr = rproc_da_to_va(rproc, da, memsz); + ptr = rproc_da_to_va(rproc, da, memsz, &is_iomem); if (!ptr) { dev_err(dev, "bad phdr da 0x%llx mem 0x%llx\n", da, memsz); @@ -213,8 +214,12 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) } /* put the segment where the remote processor expects it */ - if (filesz) - memcpy(ptr, elf_data + offset, filesz); + if (filesz) { + if (is_iomem) + memcpy_fromio(ptr, (void __iomem *)(elf_data + offset), filesz); + else + memcpy(ptr, elf_data + offset, filesz); + } /* * Zero out remaining memory for this segment. @@ -223,8 +228,12 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) * did this for us. albeit harmless, we may consider removing * this. */ - if (memsz > filesz) - memset(ptr + filesz, 0, memsz - filesz); + if (memsz > filesz) { + if (is_iomem) + memset_io((void __iomem *)(ptr + filesz), 0, memsz - filesz); + else + memset(ptr + filesz, 0, memsz - filesz); + } } return ret; @@ -377,6 +386,6 @@ struct resource_table *rproc_elf_find_loaded_rsc_table(struct rproc *rproc, return NULL; } - return rproc_da_to_va(rproc, sh_addr, sh_size); + return rproc_da_to_va(rproc, sh_addr, sh_size, NULL); } EXPORT_SYMBOL(rproc_elf_find_loaded_rsc_table); diff --git a/drivers/remoteproc/remoteproc_internal.h b/drivers/remoteproc/remoteproc_internal.h index c34002888d2c..9ea37aa687d2 100644 --- a/drivers/remoteproc/remoteproc_internal.h +++ b/drivers/remoteproc/remoteproc_internal.h @@ -84,7 +84,7 @@ static inline void rproc_char_device_remove(struct rproc *rproc) void rproc_free_vring(struct rproc_vring *rvring); int rproc_alloc_vring(struct rproc_vdev *rvdev, int i); -void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len); +void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem); phys_addr_t rproc_va_to_pa(void *cpu_addr); int rproc_trigger_recovery(struct rproc *rproc); diff --git a/drivers/remoteproc/st_slim_rproc.c b/drivers/remoteproc/st_slim_rproc.c index 09bcb4d8b9e0..22096adc1ad3 100644 --- a/drivers/remoteproc/st_slim_rproc.c +++ b/drivers/remoteproc/st_slim_rproc.c @@ -174,7 +174,7 @@ static int slim_rproc_stop(struct rproc *rproc) return 0; } -static void *slim_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *slim_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct st_slim_rproc *slim_rproc = rproc->priv; void *va = NULL; diff --git a/drivers/remoteproc/ti_k3_dsp_remoteproc.c b/drivers/remoteproc/ti_k3_dsp_remoteproc.c index 863c0214e0a8..fd4eb67a6681 100644 --- a/drivers/remoteproc/ti_k3_dsp_remoteproc.c +++ b/drivers/remoteproc/ti_k3_dsp_remoteproc.c @@ -354,7 +354,7 @@ static int k3_dsp_rproc_stop(struct rproc *rproc) * can be used either by the remoteproc core for loading (when using kernel * remoteproc loader), or by any rpmsg bus drivers. */ -static void *k3_dsp_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *k3_dsp_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct k3_dsp_rproc *kproc = rproc->priv; void __iomem *va = NULL; diff --git a/drivers/remoteproc/ti_k3_r5_remoteproc.c b/drivers/remoteproc/ti_k3_r5_remoteproc.c index 62b5a4c29456..5cf8d030a1f0 100644 --- a/drivers/remoteproc/ti_k3_r5_remoteproc.c +++ b/drivers/remoteproc/ti_k3_r5_remoteproc.c @@ -590,7 +590,7 @@ static int k3_r5_rproc_stop(struct rproc *rproc) * present in a DSP or IPU device). The translated addresses can be used * either by the remoteproc core for loading, or by any rpmsg bus drivers. */ -static void *k3_r5_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *k3_r5_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct k3_r5_rproc *kproc = rproc->priv; struct k3_r5_core *core = kproc->core; diff --git a/drivers/remoteproc/wkup_m3_rproc.c b/drivers/remoteproc/wkup_m3_rproc.c index 92d387dfc03b..484f7605823e 100644 --- a/drivers/remoteproc/wkup_m3_rproc.c +++ b/drivers/remoteproc/wkup_m3_rproc.c @@ -89,7 +89,7 @@ static int wkup_m3_rproc_stop(struct rproc *rproc) return error; } -static void *wkup_m3_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *wkup_m3_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct wkup_m3_rproc *wkupm3 = rproc->priv; void *va = NULL; diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index a5f6d2d9cde2..1b7d56c7a453 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -386,7 +386,7 @@ struct rproc_ops { int (*stop)(struct rproc *rproc); int (*attach)(struct rproc *rproc); void (*kick)(struct rproc *rproc, int vqid); - void * (*da_to_va)(struct rproc *rproc, u64 da, size_t len); + void * (*da_to_va)(struct rproc *rproc, u64 da, size_t len, bool *is_iomem); int (*parse_fw)(struct rproc *rproc, const struct firmware *fw); int (*handle_rsc)(struct rproc *rproc, u32 rsc_type, void *rsc, int offset, int avail); From patchwork Mon Feb 15 12:34:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12088167 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.8 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,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 4F28CC433DB for ; Mon, 15 Feb 2021 12:48:27 +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 E724464DF4 for ; Mon, 15 Feb 2021 12:48:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E724464DF4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=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=anCFthcYs+LHEVo0dz7fXMkV1pMbhBwEOjDYFScguog=; b=rv1nXPg1UTFPFkpwJ+CL9HNYa TZtf2U99m9XnnEKlpCD72LYGHDd1nfANA4dcMp0OcWoywq1jYf/MkYyyNOdUpszEhBhk1hOt2ezAc tT+crdiQj0G76bQOGahHVvsMW8zY9g7TMbiVwqVVPQuIw0cd9/sI+qUVPdG57aC3rStfGSzVZB/h5 lzxgCHCaO2gz9IVhaXvalJHiVJaleSe9Lp+4Z/U4v4XMh88n+5OpYXIUd9jHTpH++m6tQjKjAdb6k 16zhnXBCOK5r0sO7E/2gsudYo4cBvf9l44TKknGaPYIF2QmtbPC/ZVxq5e6mtohi6wN7QyGCjbIE+ mm495CFVw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBdHO-0003gI-NW; Mon, 15 Feb 2021 12:47:06 +0000 Received: from mail-eopbgr30074.outbound.protection.outlook.com ([40.107.3.74] helo=EUR03-AM5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBdHB-0003ZW-Eg for linux-arm-kernel@lists.infradead.org; Mon, 15 Feb 2021 12:46:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=icR3NYMRVn6fRhl36xLXUaSJiNkMbNER7BKJuThPZpKbLfABpaPrqMsYQ4x9wRnSk4YgdQ99TTiLRkuOLEQuSVcPTMv4pNlhbRSO7q36x+SHaTgs9TbjzhTLLNuE0gFeX4QIbkV/+qQKMiEVKYB7YX1M0EKeq7WYneZuqogxnx47hoXhVPlZ47EIbIgd1bqUFlesATfxC7rqKJViqbI3faTzbk/9ce+CZ79qLTgbfAoGISY/RuPb+7uIbT42pJ5bPWQdmh4MZODStDcFqT5zJJCZp0GJT5pJWAKfLUeXetPvBFc9oHNhcZsci+d6QixXHWhBwk7+DqtEZra0keV7VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EM9JIC+yeL3C9WIVZhyYz0R6U9vBvka5aiesdeAvSbw=; b=Lh1ieTqHFgxcztTTSbOQ93NvE4b1MFpkOvoAPU2Ja4aMfR5EOGgeBzgiGn+y9jiottWFRcAU55o3dEwVXm+3oiifdFBAN8kuQYJN9oTCWwepMojD9mThNIt9Ne8SCrrS7e+oSqi8Xt/oGhDMKeOT9zkqqcyHlORwgbjkxJNyNj71YcHMgYKpYy5vOPfJhaCdW1b6C77UCBfJiqaEhFCob9QgM9jpjtsZm6QHFfrqi/2FUq1lD9xqmV/M5pt7cquPYS327NYpjni/rLZTnxdCwNXXyG+FouOM5KMIWCJGBmqeCS/g6nitUsVsvt28Hadgy7D/9K/qG4apRFZ3mLWXEw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EM9JIC+yeL3C9WIVZhyYz0R6U9vBvka5aiesdeAvSbw=; b=VmNEkzfSog2jIJXYcHF8u8HFfHwdNROidYfNMQoWnPhtmmSQKlc3GMA9H05EBtMxxfADixcI6007inw2PzvBFVui3XJDQIAcv3uT+ui3LpWg5JE2DjLIuHj5KzfJSH8QKofyJkn1Nu+Bz3gflo0hPx1JeeCfgDouKJcq8xuJFvc= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB4091.eurprd04.prod.outlook.com (2603:10a6:5:1e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.27; Mon, 15 Feb 2021 12:46:49 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3846.027; Mon, 15 Feb 2021 12:46:49 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Subject: [PATCH V10 05/10] remoteproc: imx_rproc: correct err message Date: Mon, 15 Feb 2021 20:34:18 +0800 Message-Id: <1613392463-9676-6-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1613392463-9676-1-git-send-email-peng.fan@oss.nxp.com> References: <1613392463-9676-1-git-send-email-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR0302CA0019.apcprd03.prod.outlook.com (2603:1096:3:2::29) 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 SG2PR0302CA0019.apcprd03.prod.outlook.com (2603:1096:3:2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3868.12 via Frontend Transport; Mon, 15 Feb 2021 12:46:44 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 7389bac4-83e4-4fe0-e6ea-08d8d1afc30f X-MS-TrafficTypeDiagnostic: DB7PR04MB4091: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:989; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dpKtsm65esLP+/NsU5zhJQo2hEevZdJbBz8Nqnh1PryIzxXT/z38s2dLXA00IRfTcQqbPqsQXiON21VYeXiLxr5YemUUKVcRECcAGHxzJxaUQlscODTRyHSqHl6A8k6epevxbN6sjnJZnse3HZget5I5xiuCi47gzmXmNUt9BVZtZyoB6NF1jgwPG8Mqaq4qxbVLMdHKkdP3DHamO2ijmiWNkTBoLipP/+8HF33pcSTQRiwakJbm6/crKi3RbaoVWyP+IO9Q/76erM1zWfAuP9WpYhTJ7X/jAyDdQzlvVp2crXs9UHi5hcaRtloj/6vvHHPtWdXXP0BqEWnVWuZ+KQfPEpmBsHzCBbflLlhzuR6t0WZ0kkbeflrD/m3s+7EppCfH+tTYiUJfgRuzEENlgnFeXqdM4HtsOjrYmCX7EHrM5+robussv1zBUYnj/OBjK5qMFE2V0uzxN+Q8B33fOsFdfVFf32zmKcTBrJS1Ys9K6TdSuXvbQ3Z++OZn5WcBuM8rRNDBDZ5tTo/SM8Ct9qz0qceXSqm0iWbaEFLu8GorTygTrRHlopF8YZdEFY8zEefUe+0MFqJ/1h3MMdZQ8g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(39860400002)(396003)(366004)(136003)(26005)(6486002)(9686003)(478600001)(316002)(186003)(52116002)(6512007)(2906002)(16526019)(15650500001)(4326008)(6506007)(8936002)(2616005)(956004)(7416002)(86362001)(66476007)(66946007)(66556008)(69590400012)(5660300002)(6666004)(8676002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: T85DrJf+pR9AAi03ctyL0akzLzTp7m1YSbNF44FNnRzyw4BCxdPwuqrgjednoLsS0xDtqpkX3ZQSLZ2EQNsM/Wgni75X6I82Xm2HykU1ccjWMFdvd/GibaSTmEWNmG9FvdEiQbhRmq4oT3H3TK/r+p04BXRkmBqknRy8Y3LHrSf+FscDt6h1GWZotbhRaGJhsIkK+b9pGsg/Wp2WhVtPItHnKYpnzsN8s6uYvVaFZ7FhUngieWLoP2jWDOMp03V61MDt7yG09ihCJnO8FMLFEEKO/SuN4Z1O9HtABx+ci6x5PVa/VXD3+86MJn81VB4XyO9QoxOLa22V4u8Wpte/3Ti8/zJklHwM5BKiCZm3aQpAFF5EW103Jdtt0uyyHckxXvEKk5e+9cjj4yn7gbFVnZsE12st1mMr9cGKX10AvahVACj/Ln5d3ZEBg1CQD79Y2AD4o7/q3yP+QoC4YD80Ub9BBsHFgbuhyB4qEUwFzG7jD6GCBuP42qYUsunqf6EUo4cfiyy6eP2KPeUX+hfe7E1PfqtaORKgHJytMrwmPt4CqSKdTlG6ZqU7jdkh8j/Zf9e0hY5BVoH0E70Vqce6m9SpWcungECi/NPvdX9daPhrMMbq/6atkOgYZJsjOZuWlfuL1xCtKJpW9KCax9ocbZrjW6sKKcBGfV4UVH3XgDT0uFH7lEevtnmwF2o0+HhVce9JRWQER1S+NruNxuELhylkjbGo9IBym8Ee7we33U3xTp44zYyU3z86pFilG1RkSfPCTuRT4gHXZUUUKDW6fmFW95o+licIQgsAQJtrSJzISPiqkBdIJzzVJ+kECrMoJ7B5+bA3pffSRC4mbvaItRfBC/o6eJ3AgqlShyq5eFshX9/rma+2PipUZar0E0xuBclEcw/UFDYucdnn4U3bGASHAWzdFcEuxI2mWxWyrFiAUQs9VslPLPUGd9d8cDQoZddjDYk7JD7QyxAw5JEzQIThYN3hQbl6/CFZB9uAmYMbENskmIwiMmlICC1EE/MPh1cjTYEeXO18o+aVH6+WwDj3oCId6xq8Izj0qaeiQ00SbNd/AOpMbOnvceeNYy2V8owHXoGW6id7TAVLFVWGlHxB4nxZf2O8LoxYnCTvt5vcqJCeTTyG446Fp4gxpcGz3FbHh8QZBOW/VKEAdJxW/yA3sTEejyHS9kBbDkDxmuJo62EVw/HJ3FKppIg8sXYupsWz2xB2FQCgFJUVmKok74RRfTMLegDP+eKHKw7vJ7WR1IYcHV5WOXSiR5NeR3uJSDyhGV44eU0EW5ZUZSnZkxFivI6P1lrcy1GeYK1sfK7xDmSrtcfh+Mrzvs89YoUa X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7389bac4-83e4-4fe0-e6ea-08d8d1afc30f X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2021 12:46:49.9194 (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: 1GvwxalZg9PNnKIVDTwrW/NJdOgxlkBwrmg3gjDDpxBc+ODwbvgBXW6XVGmYfPUI8SB/T/nXydbbZDG+DT/a7A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4091 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210215_074653_584824_2537EABD X-CRM114-Status: GOOD ( 12.43 ) 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 Mon Feb 15 12:34:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12088171 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.8 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,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 702A4C433DB for ; Mon, 15 Feb 2021 12:48:44 +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 3159864DDA for ; Mon, 15 Feb 2021 12:48:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3159864DDA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=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=gKaTbHcOBnnA364m5GauAUUxnq9SeuWoYYnqDAAlIhE=; b=sX5F859mPk/baOYeV5dO9TViX jH5I8R5xUpRj8OY6Wjmc7MaCeMW63o0nkhEGOrZfIU4DY0R4ifN6Q1Lh9akoqhnWWgvsdrpORqYnY O4LneRFLdjyevTXghaLDY2kSbBbCTsZNS2K0M6WJdlNp4BvAh5NIAF8Gsj7LrvkgNYPYSz9/v/VWm gu2KSEuVz8O1R/ciDWc8PqZXvPaSQrVBHEu3aVZY1vfUg+XftfCJl8UCnvmk2Wv4ivDCSoUe15Y4E +66xxh0JpS2BsBxiMsGAqX4ISfblHpaJCzscY3qC7pjri8/dBW1wtP8wXD1x8gx7AqgOp0errgDhU vduVjw1Kg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBdHa-0003lI-D4; Mon, 15 Feb 2021 12:47:18 +0000 Received: from mail-eopbgr30047.outbound.protection.outlook.com ([40.107.3.47] helo=EUR03-AM5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBdHI-0003dt-5E for linux-arm-kernel@lists.infradead.org; Mon, 15 Feb 2021 12:47:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Doy0sJ6/2D7go5ChKU+/q15lNGg46grDnbn4dYWO4rtRdABnCacg+aSE5DLgksX1jFTN5pPbod5A5vdPByS+uuID4zKtBspso4sFIEROLGUfP7K1TpUY7jLexVA62WQ7uLgf2mihC+4L7fkIId0WVe7GIWnDRqfRVp5TloPODSF3g/bidBNbIE2pFusEtMVhA/609K4RqOmO3ltt54yfI76G3q+eLOkTLyQIyC78NUWZvDk5JwYHfVPrKNfOteV8f6yPbER27irrmvcK/WeLdBR3lrmNpIJLBsP7deB8m+RiVG0fXLYzoVdJpM5WcFsGwN6qmd5710046BqWSWLZuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nJE0Ov249gPUdtT6ZeB+lf9+Z+9T/yJFkeTd4I25VJs=; b=UJQB4baRDZouC4N6Q+Bz6oNvFXknyzDRqsyVZra+zvV0BTDouW2I3hDHX/9apU7uoiTe3XxZJh2iZBUXbT0cAbwVzgNN2MA/JJBC48Anp0Qt+lC4Rl4bjTkTlUU5okLDXy0kCkTdqA9DjtZxzfBuYa2lF6AoakqSqXNWwsk3tGvb5bpgoTK+wqksWH1OPddNunKoICeW4wYfGGHZIHOsrRnh6m2Q8zStYC6sl1a5t1IJlSpfRIzFp17QcD1HvSwwKiLdBUM93bNsov6TPm1ErgTnOhUuu10RqenGG1hp9YLhuEd78fUnIrbGe12FgjtkOlE23HqUXHERhK7g+vkjxQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nJE0Ov249gPUdtT6ZeB+lf9+Z+9T/yJFkeTd4I25VJs=; b=dpA4Mt/RMMevTHVO2OquF1bvsxIZ7PLmOvDB7fIAKdem0V5QPrsr/ZfNOdaulH3WmVtHAZGWF0ycJfZDu1ZApHrTLcP0nEJ/gauwLslYYERz1o+MIBrekFpSF8NPc9UsWvRnsXEZY4m5QbDN9UYV8ue14nAUv/1K7Lx3e0o7Oqg= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB4091.eurprd04.prod.outlook.com (2603:10a6:5:1e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.27; Mon, 15 Feb 2021 12:46:55 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3846.027; Mon, 15 Feb 2021 12:46:55 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Subject: [PATCH V10 06/10] remoteproc: imx_rproc: use devm_ioremap Date: Mon, 15 Feb 2021 20:34:19 +0800 Message-Id: <1613392463-9676-7-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1613392463-9676-1-git-send-email-peng.fan@oss.nxp.com> References: <1613392463-9676-1-git-send-email-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR0302CA0019.apcprd03.prod.outlook.com (2603:1096:3:2::29) 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 SG2PR0302CA0019.apcprd03.prod.outlook.com (2603:1096:3:2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3868.12 via Frontend Transport; Mon, 15 Feb 2021 12:46:50 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: dd40fddf-5c16-4c0b-496f-08d8d1afc695 X-MS-TrafficTypeDiagnostic: DB7PR04MB4091: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:849; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HlkFgNG4eckEnKYDUSsKi8VpKjyvrXdPHyZc0dWJbGg2XWOnP7tjRt8o9hDJn9w9xvPxq0qbai1CLnaQzqQnbldLqKnrwvtcmbK6dLdwv6EBaH4Y9T8ZqKL9nS8ghxN6uig/ifB0A3ltPLld0h5cDjaAnLDySHxgOioc7v3Vs5WvK/7VeSODRImAvbuYYNtVgssMFmUVve59WXDuwJBI/5a3yZV0TM7V+NkMTlE5mFjfr78ik/t42zp3H6vRMYIQ5GYKWEKaMZqmmnqma3RpkiWORenvt06GmShrlm/foVjPyR5pD+VyJHyuyOLaruwxhGHlcX/z+NC7g9UJfKwXHlXbWPygx5dEAQjBCSYuYFtHdMWOjiq10uCoEnBmezPvgj4bmd1VhiD8tjW5mSV2JmZDBFz7wtWZFtCYfGFiEPbRzcLQ+TqN4QWRcN4rbc1ZTf7V4/ccMGKOKnWoQ9bFmQZTBCTmIKC1yg2YJCjz5J+4xY7YG6b12fTw6YF81N6ybFD9te/lznH2/QT7tTIo8NciNUP/AlyJMD0Kiqu9O+zoMQKpOmPOYhTRkN4rNhJlnJD4x4NVOxBRpiPo299XCQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(39860400002)(396003)(366004)(136003)(26005)(6486002)(9686003)(478600001)(316002)(186003)(52116002)(6512007)(2906002)(16526019)(4326008)(6506007)(8936002)(2616005)(956004)(7416002)(86362001)(66476007)(66946007)(66556008)(69590400012)(5660300002)(6666004)(8676002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 4y7htauqArsbk7H3EreQRZj31ZdgQgUqGjSJhm+p5z+1cdqXwlBw/byxcFHvc1HqoaMXxZ4bXRwjdwWimDU0rqgk5XQrU8Z11KmjnWh+ltLAdl3XTflAB3v+RvLp/Zmf3EZs0mw5Gbzu4AvhrkTuqBzqdHGV6zOpwNQATruCdOHUbknZmJGe5amikZ22ptUw+OT89hBQnuMaRyu6Q0g0xInwAKc6qBfx/gFJ4IML99zj5IBOFgatgixil2LKVLl6lKGJYV5bqD6mDqfctaeikG2uQ+rG3oLv+eTkA41CDKLsZlDekm73LaxfkouXpLnCqhLcsiuVNADdFOFU5fSNiU8qZnD2S4JZp8jL+8n8Eg4k0TLfHeLmEX2iyon9hms/OTGhie98G3PycsvFO294xChcEU1VxwGLE95G0+8HfQ/F+xGxuS0HVu2fg4TzrL51TfqsvEjiyInwNm2OJtyQ6ItCWJniWE+zPZCA3QoU+DLKuRWmTqK+AtK/+yMNWvDHfGbG52yJNv86MhXiIopLFf7GVtr0YG3+JfXfJrfujrR85q8n0vj2S/HAyWI5jcnpRXVxKccHXFLlRERW2fteEe21PPWVvt1CnJuN9sKMwtbkSt/2yok6hkgboh2SPx1HIthryGFz6sEfQO+jfe9Kwc/IWEIx28UKfWGmspDFOc0NIDVLEyG0ZlOWzSNVYiq2LW34nw+o3tH4uNfC8Zbm2Ub0cHQHNpFF+BwJEgxTSHDZJfvB4oHWtw4fDwrMxaHV3H/3fOe+YTgk1QWxduokJhIAONLPnFsNDbeSKp9tPE3HyoYPienqfYIXfMJTNmym0nezOXi64lHfIiDi4roZuzc3lpKxS/Xdz78nMSzDElG5Yxh3480FVC5K2RJf/IcP1VVX3EOpdpo88jtsLu8bnj+iKltwCWgkEMkOOPkux3W26E4YxssJzgtx9NAI7wyIpzZJ4x7WOfORxiszQF2XOpXgyqt1ZfMk4IE+OTfGhA0qYi4q6l8/I/U6TOAI7wdse1NfOWhmWaImJPzGQ6IIu/kG5TfeCtco2ypHJkp6LiIFsHXRFLUBreEGuuCf+YPRuGL+LUYHtr7Gsm7ZOFc/wt/Y7P1JdEWNLsgVZu4iOJ/d6bQxAj4AqBmoDk00jdZGyTAmNva7GMcBl+e8t5Lu1IHFTutTW6JK/5u5bo5xCpcaDQfiU/sD7FKD/BKkeVqzjPIIoClPEQXkXX/HPQ2xpdOrR0c0zzBXdR2cnWXCHxT+S2ib+5jaYGfqHAMf+4iNyKy3dqBWXr0DBlaNwLXtE/ygA0KiVGNN/q+4xLksqCE3CJKy1j2eTc8QmfOCHIIr X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dd40fddf-5c16-4c0b-496f-08d8d1afc695 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2021 12:46:55.7787 (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: h9z+8j/CV7orgdacaqZroIAw7LQrs7RT8W3911VsEs9vQ1rOwnf5x6/1cZGU/IA9EbH7hhDGxubzIGWTdEaE1w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4091 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210215_074700_268038_5EF104FF X-CRM114-Status: GOOD ( 12.00 ) 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 Mon Feb 15 12:34:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12088173 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.8 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,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 D930FC433E0 for ; Mon, 15 Feb 2021 12:48: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 7970E64DC3 for ; Mon, 15 Feb 2021 12:48:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7970E64DC3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=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=Du05bwx5lR2v4gVt25jrDgS/oRYWdHXBvQTK8fqC8C8=; b=zlEB/YzyYDaqS7c1eO87hKkD7 SABYtFQOhBqwxKy3FYbrqGin9CDumQ5M5rgD6HYT5C5tIktnmJVkPHmmrCCD8cOFB5oKVUf4L/qoT zrMYMSKLOXPwoeOy1ddoxc/zSEpuUb+c//o4KgdZRHL5TxgZBF7vQqPBMAAcGeOjZnlsShlkeXYeG 84vUHGR332Xpw75WDYWPPWJKQB4LTTM31hv8iCRaeNP/7GA88ooN0YDu8DQekhQGasFZpogSnrnm4 N4+nfy4LSd8zp1YvtOY/QxsN5XdqZ7vRB1igv0aTtp/97WldyFXr5ua6JM7V6bxdSEVg6U2E104q2 L7k4NRvQQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBdHj-0003pe-IY; Mon, 15 Feb 2021 12:47:27 +0000 Received: from mail-eopbgr40071.outbound.protection.outlook.com ([40.107.4.71] helo=EUR03-DB5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBdHN-0003gK-OH for linux-arm-kernel@lists.infradead.org; Mon, 15 Feb 2021 12:47:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TK318kwzqQ4FWwgrA4A+Tc7OzU/PewnZSd0hjQdUtCVRTug+JESrNRDn8vbGm2IwWuaojz2Q5xhpbAJKijgrnD5PKE6no4Ye78igJM34wVpJp6k8GZJB2j5mdnfO5ZL33xNbeYDzqEFpldvBUUNgC36Y2GvLs5d1rtkfbD/GZ7dnSzFhWVCsV7+UMQtqg8o9oA7cCJDalKPkAfyDAEUzCkBlCL6V8nV9DZEq+I+v07IRZFwsF1QbzfhjZZI93BFbEscpgPWhx2CvI5BVbghHzetRGc4N1Fh0nrDoeXjyRRbiN0k/vTjSgLOes0NbJkZ/Ov4monYQIS98rmsD9KnE4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wO90q2o6bhxpdxSyK+I0HmaAKEautFRECt/1AuiEMOA=; b=LPqZJNH7mDl3RHUbH+LkDLUlwtEoKR3yMarCu02N1onWJUdVG3Xpj9qu1x3+ETKLHI2eH4fgXuzBV0qcQTXs6i85+Lz7tS8aYgITutvjgBASpi3xN5bwb4s0zCONoF8XxP75z3CDVJn61pUdHRpO8mLpCam6oSz82UjSjlOqrZSl27asv02urxjbjuBgPqpmaLe6zXaJm/KCyEPT9n6IBMKdcvRPdY+AB56RUTEPZAOk4rqgjhSXFOhq/fMubnQXi5Jl+ux8040nxtv0i9ypI4XL8WlTYHvk1wCKQKUC7a+AXqbM47O1m49hiWsCTjTx3iSfVFoJQi6ChD68dNCF/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wO90q2o6bhxpdxSyK+I0HmaAKEautFRECt/1AuiEMOA=; b=Xq9S3OWpTMFiGEXMokqoXs7DAmAw3+84GDw0eg6N1rojK0+OUyYsUKUbw8gkZwlJWspEdGQ3KnlcVXkytIPWiysTADsucB6VOM6wk23uqD8lKijPBdFUy7USA1Ondru3laexeKHBP/osO4vRah2YOZMWXZ8Yihi4rnQj0RLHJRY= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB4091.eurprd04.prod.outlook.com (2603:10a6:5:1e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.27; Mon, 15 Feb 2021 12:47:01 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3846.027; Mon, 15 Feb 2021 12:47:01 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Subject: [PATCH V10 07/10] remoteproc: imx_rproc: add i.MX specific parse fw hook Date: Mon, 15 Feb 2021 20:34:20 +0800 Message-Id: <1613392463-9676-8-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1613392463-9676-1-git-send-email-peng.fan@oss.nxp.com> References: <1613392463-9676-1-git-send-email-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR0302CA0019.apcprd03.prod.outlook.com (2603:1096:3:2::29) 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 SG2PR0302CA0019.apcprd03.prod.outlook.com (2603:1096:3:2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3868.12 via Frontend Transport; Mon, 15 Feb 2021 12:46:56 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 4123f667-3b05-4143-d75e-08d8d1afca21 X-MS-TrafficTypeDiagnostic: DB7PR04MB4091: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3276; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cmLZOguwTef+T//2HJJhlSLfPcKVOlOyFrqHzJDnmrPe9jN+ibEfXd9mfmXrx16wXShFzVOPed1qO9mMKVUMs6RyZ7AknwJ8SD7MZg9B1Wyu6luEP9Eqeyr+AhDVGQLqzJ0bRi7sztyzg/MTCllFB+HwNjbfAuSCiGAQhJyNsZ4vvLMj/MfpIsPcjhirPceJWm9i2vCmDrkadZf0D7nap48pWAQLlJCwn7pmeo04reEokhxlS2hiaV5IvH54TVvTRDIRclARDhpa+giFETcvOYAwE/PAi1C/3yGmY5wfJu1bbeGCXgXhDUHXZSdOrsAdqE1UjBK4ise5WIc9R/eqaNhhn1UPBn5SUgaTSY06O/3qVOkn29g9Y6XW4NhgA+7TBWARI7rd4ZXbjnLLhgycYP/eN5+mqQoTszAYYKUMwlwstlVYcUbffOHin3xQ9gXv8CJBP1bQKndBng7c/gBcFcIhdDJ0c0WAWHxNxKgjJ5XV/2N4NWx5u4FfRHCeNgDvxyPrKAfWUr0v1Dcb6ZJvzU9qnGj9x0lIGTddt8nuC7IkxZlI0rcjj6ncEM7s4Ay0AA+h/2xH99fQPYygRXqUXg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(39860400002)(396003)(366004)(136003)(26005)(6486002)(9686003)(478600001)(316002)(186003)(52116002)(6512007)(2906002)(16526019)(4326008)(6506007)(8936002)(2616005)(956004)(7416002)(86362001)(66476007)(66946007)(66556008)(69590400012)(5660300002)(6666004)(8676002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 6UGyg8CVaWVzRTY3mxMy2d1cimA6fxuxCwHUOvNKp5J5rfN2My5aE2sE5gwFhiD+r3wVLvtnlDyyTaz7R5vhEudQfsxix+OpWKS/JwlZK8Fdw7BRY6WX2rj2+VOCQT1fI4ow+vOs1qxmL2Kfgrkup822DviGYcD5+2tPXGeocM1GVccmRhK9DKSyfDkzUcwAKFX5QZV1GcDuCwgpuJ5aSUl0hisneumB+4sYebO3m48cFAY75aP14SHZj+f6nRr4tqHL4TTvBmCa/0BBpig1kSdBmrue8nkHJwADuL1/Rg93nVatG8HG7crfoOZ6QgB6vaIJBDIOGVfO252eOEnuPgzuGhYRiBLHJs5TY4akHbhzSD8s7Z9kLx7hxAGmP9qIZI676I84aMRaOSiKunV/IL0/nBJYzbw8sQLVsi0Fi8baIeU2H/wErLuO543wyZh2h4WGfCGFKt5Gdra1THnPqMwtxu2Gi9jle8ixmD0smgqkpOS5zR0BkirWtiaE5I5sNyN0YLs8ayKzSVoUTVCOve+/stiRJSp3CG5Z0P4TY/iqFkfB2AKWEbb6xqgmvdp1kSGWXo+xDLQQtfONPz4bIJgJS+SeTKgK2oJ75dYMkfEPTM4vax8aATbOVoE2JF//Dbax1jXN+jriFvAvVd2FriCWuEYF8uiKrcIsB89GMggPdRRAZ1HtrgVTQO2c+oq07426V33ur5plBXglDiJuw5C21Lj2t9jHGMqd52emSKuOUDD1nm44xaUE+Hvw42FlD5omLgci5xJCNkvEDZ6Q1vEb0Qo47FPs92WI+p3LDdkwfhLhFzXdL3zVVbfkNi5nUpSzRuig/vZ2LMF5D3RRGf/k2iQhTDjDTiBGcULati4Se0odvAXeOm7Xa/JAzyRrJJDaTuVsIvhFRCSfY1vFebdTUFa8l2hhwXm3enj0ZsjqqnlswWBxYF+pFfZCWCMm8BMUhX+B4gUC7BWHsYdWeVcQ8+sy/qutS7E06dk3H8kzvelH/xQ1Fruzjj8wfgVfu1yMT9HpnRdJFGMIgshoUCJqp5QaV0PNjenE4x9z17CAVTznqv+jMoEs4fKr1NTN4N53o4FFxVN5QjWjl+4KRKRSL/Am4DeTK59O8Ic4FwGGwPS9GmT7UghDD6qA+Bk0Bm3MBBy8hrha/6y0YGzvNDdN/jSIxaVHDXdfVuzndh/Vmmbht8KkD/9XW+J22YEDHM/ZFw1LPIxZmWvS5WGzDm1XHplNvV8S8f0Jj8993bdTYqp26MWrTgn674fxyw2lvHWlyfbbOgqCSHPFQa0lEodXBSpkrNzrmHyjpLajhcA3+j4xkkWRnFNKfqLyUcWA X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4123f667-3b05-4143-d75e-08d8d1afca21 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2021 12:47:01.7031 (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: lELNqQDrKp0IyZWSO/KT9gkSauLoMHPVyAr24gNQ1x9MCtGFkLIBZkjEO+L2H+LjIhw21lmupBT2DnW6aFUt6g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4091 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210215_074705_981601_A89D64A2 X-CRM114-Status: GOOD ( 16.98 ) 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 Mon Feb 15 12:34:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12088175 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.8 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,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 73E7FC43381 for ; Mon, 15 Feb 2021 12:49:05 +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 2AB3064DDA for ; Mon, 15 Feb 2021 12:49:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2AB3064DDA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=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=qrEdgzs9YOIdpghkeXxlfQn4B3hUS7edBC0gfejNQU8=; b=pH0U+vRUTG1lTLjEOCiqkBmiW rvk/lPpdYsGyIMrWWWGx8YYGsIAFUW1Q4LEXlW/bIcRkiD4BL0LnJ+kv+OSnGJc8prtHcYoVFVhPV PI+qtsx6yw1G8ZnKRObMvevAEn26HIfsJN9eNPJ7oeJHLIkCosvseTk+LIW2C6zA1womeuzBsXKPv 6zA5d4wm74iEGoPVlE7RLCG3CEV5X+4WYiAUYU7LrASpGtxY/95yW4PPcjA9J9vRDnW46AvJKnGJ4 cB1tJw6AQnegCAV/BnrLqSukNVqPycZb2sAZyQivwofWWdnuuuGa8HGDyK72HeErHTddejeymSmvp Z4wm+Mgnw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBdHt-0003sY-0k; Mon, 15 Feb 2021 12:47:37 +0000 Received: from mail-eopbgr30076.outbound.protection.outlook.com ([40.107.3.76] helo=EUR03-AM5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBdHT-0003ia-Sb for linux-arm-kernel@lists.infradead.org; Mon, 15 Feb 2021 12:47:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bch6H8a/dPrYrZ3Z0pi029EGRLiWUncjYhO6sHIXke65xGWXDp3mf9QSwgZByYM1vclhlIrkJease6MCyoy80Vs6LWbH6CSSF/nIFuBBvDdY7hFbKWQ8UMxZyEZAOVK0F87UhadFbJlyUQvRae0w1LHZnGTcIc9TXpS28y70BcShpDw9+hyg35MEQHsF7YuPCHOjha9jITVCf0a7ebDexWR91MXzJZLNb41Dm5ghTxJXvZot8TAX2fC0RitMiab4kQXV1f8VTncii9XJ0hxNSqXIjEhc4Hvl5HxEkcEAFZWO0P/dPSYkpNIWRo4UdOejxYHpiUBNwCmeK8mcVK4Vcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hO1+r3GoanYoQG4pSNUPhcwcRzBSJ+js42Xn0O6ntMc=; b=cLmvZfE0voawMar2PHk99ALuovFlkQV5/ooZZ2YbU066Xk2YodOGQs0EDT0aznyrYIEhhM4HAlNyudKxRzr7dcgCPiUHihhaU2ycQpD1wX130cPSP7cVMaM/UiZAOGqOx2lHIeUBiSOMaCxzI3Nwtnj4X0QcGMOs8nCBi5lVbx5BG9CietAq/WZFRg+gAOKFYF9sBVDqFiTfWbvgsCRTTZWUG8ecMuN2atX+PPS1bWSdjRN9rttFgjYZglWt2ctjJNS8JEv35JKTgQ2KEH7kfTNi6PA+MnDGfJBO7JnqOBUw+UDeRjnCRKEueGYZsFJ/R8oOVEyt4XpNFhC0CzlcqQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hO1+r3GoanYoQG4pSNUPhcwcRzBSJ+js42Xn0O6ntMc=; b=a1F3h9Olwgb2RNZaNlEyDM1fkYwPwdPJKQQOjTRCDgAYFqNjiObLn5qbTL3cUKeq379yM0Hys0g5LK2BgVD2uO8LqeEukuCEpZhmirt+pIKZNtfHgHHWSeGp0caReLwgYrKHZbDx6XH9PQn5W1Xv8iw6VBsA/I6o1gsuT9G6kkU= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB4091.eurprd04.prod.outlook.com (2603:10a6:5:1e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.27; Mon, 15 Feb 2021 12:47:07 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3846.027; Mon, 15 Feb 2021 12:47:07 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Subject: [PATCH V10 08/10] remoteproc: imx_rproc: support i.MX8MQ/M Date: Mon, 15 Feb 2021 20:34:21 +0800 Message-Id: <1613392463-9676-9-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1613392463-9676-1-git-send-email-peng.fan@oss.nxp.com> References: <1613392463-9676-1-git-send-email-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR0302CA0019.apcprd03.prod.outlook.com (2603:1096:3:2::29) 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 SG2PR0302CA0019.apcprd03.prod.outlook.com (2603:1096:3:2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3868.12 via Frontend Transport; Mon, 15 Feb 2021 12:47:02 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 2324151d-430f-4b80-f1c1-08d8d1afcd92 X-MS-TrafficTypeDiagnostic: DB7PR04MB4091: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:158; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9BDGXpJYMk6eKYxx4OIqMaONMHCadXTkyqBpnUWIUhe4uQNsx2VPrtp9Cug03KgQHlrYXy9NdtPMr9YmW65Pc6jP8gidQJ/K2xePkI88WT2rEJqFqI+2vE3HYa7jsFh4qvTSQcfSoomO6Ukr06GaYy53qC/h8IXC7FIFF+7wdkFYgIJyGnB/4VocFlFlX2jBjlv/TeQ34jaaWzzLUXtL5U3u38uYPC75KiiRrFXr0G57+R4IwYWbwXyqeOmfJgSLopnhI9l36h/s5BIBeOQXXUpj+mHr2wbX9QQAnHshVATCNip/9+xM33zON7M+v+GdCLwDvj0hjptdx7VpA7gkypEkVciIOwFa8JILaW4LcUr+vLnOOQToyVORl35gG4oe8r9nIAcGl9ZsWN4vRewfDBZcM2TRJIb2xpcyLncRQ0Tdudv5MMRS3YBs+o3Y/tA1LfBF61UaAIfuq/jRzhnBsjdUu+2/YlvLSu2FwiYsL9cSoTJ4p4FyaEDq1gKWC9LEHNRctEFnk6pZR6LVmvB5xgfd3xT3xM0aoLqs6IPCNL9xBgyeBtZDS0h0BPKzzrD0yaVN4lq62GcBwogW0Zorjw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(39860400002)(396003)(366004)(136003)(26005)(6486002)(9686003)(478600001)(316002)(186003)(52116002)(6512007)(2906002)(16526019)(4326008)(6506007)(8936002)(2616005)(956004)(7416002)(86362001)(66476007)(66946007)(66556008)(69590400012)(5660300002)(6666004)(8676002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: mE9shQWeF1iDFwRY1gbGJoh7Fbo+nIfl8Cs9JCuilre2GkJ8QngOk4agkS5gbLuwrKFyyYPPI7P90msC55bwujfyRKm9l5nAHaxuhH5+F9M68n4KjJczD08xFD8aIzw/Oi6py1mQwuWdpl2NIxMHkILhinVfEsOKeUbmJQynuzpi1hw50ZchM8ZWtYvGwuXtcyA+iJvKJLShy5r9gXUwv5kXOvGXBa6kpAayTrY3v/GRYHnL+1IdlIhEeEe2qGwYebFFxK7C6BG600rC1Zhy/6AYy98FI7ZTi6f+TgXxsioEfH/skfKQ2bBkKwLsrotQUiQt8aPMfdVn/NafPEIVRAZYzkQ3yz5LL7Ia7BcPeMCbg+ms3uoTuw9b58PsKvIzeXQV4cCsE7pPPujTlmtdnBT9mbsuUry4Knk/MRpC1yT1V0C3koxHtXteQj716ld+x6nU2vHxQEPsAYt+mLK7QpUEXEg/eNbK/Zi5z9r/PwpH6gLsXJtrrLxlxWiKpQEobhrXEhBGFkmoh7iGiBSmRjF/n0TprnQ8gvVIDYyLusK52/Ri4BQjuPFwHajC/3YLAIcm4ALRmF1S9F4RHYlRYRFyd+2F21WX2e8N7VgsZYFO7vBGKeKZ039dnA9sq9IRZlTQYLv0o2xcWLqufHEOt+UdcnTz3GHK64GKDMtBi/q2aCPr/phJOBMqutIjF5DXdzfcJIi7Btww63fchiJFoWPBtrRxoM4kLp2NuiZpXGEbWl3P3fYytCjkorxA1jkg0FQtX3W5VkYXl8tKeKwZ5Hcm5LgfelmeZ+RmLDBeUcpCFHgqFGAwMR0mT6Iw0gCXaFtwPHzKrb93afqX7mSwrrMtUYHJwj/wpC9OdIB0phnATFj4hyx9LRnAXa+1GnYYvRz9sj/qC7MWxDoqqWAlUsXlr8hcNaoBwplYIXxrbYC318GU0bjfauNKpWOpkSgJrzGfA0KsKwW5X0pXQrbDQD3cnWzuPDH7NrjIa1QSHTfso+Qq8Q88zQgvHvNo0sMPNxZGCPoGgU+dvkqjqjXKWevMArgt6ylIqj4WmGwuM0mUgEoBWqKqbQDZiDLECSvU1H7uWaRfGxGxHiSM42NeH2QLbJvhIYEEM8x2tb2/FoVl7WShz2Xu51CwwWsTUWExNVKh5g0+wdAHzX+dDVojW98TMf1rXY3QkLC3M4u75rhWaxcL8GyNiSELAQoXMXv6pHIK9frUUgJfJ0JmiSCwVIWxvmrALEQj5Rp+T/vNMVfss3ZzJXskT6dU9nGchJ2OvyC0r+wYQvaXz0o/YRZ47wekMmt7sJSo3lmhSGKOeU+ntI7GVsQ0e0qxpTXrSo4C X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2324151d-430f-4b80-f1c1-08d8d1afcd92 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2021 12:47:07.7893 (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: Y/zvyspGQMohQhRw6Mikqas9u0VSWjw9nDI5im+dtAmZ0mLYr+hnzK9dmNVxbktDF8Ccj9V1K0jAHLwWOAWv6w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4091 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210215_074712_024622_281B179A X-CRM114-Status: GOOD ( 14.55 ) 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 15d1574d129b..7cf3d1b40c55 100644 --- a/drivers/remoteproc/Kconfig +++ b/drivers/remoteproc/Kconfig @@ -24,11 +24,11 @@ config REMOTEPROC_CDEV It's safe to say N if you don't want to use this interface. config IMX_REMOTEPROC - tristate "IMX6/7 remoteproc support" + tristate "i.MX remoteproc support" depends on ARCH_MXC help - Say y here to support iMX's remote processors (Cortex M4 - on iMX7D) via the remote processor framework. + Say y here to support iMX's remote processors via the remote + processor framework. It's safe to say N here. diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 5ae1f5209548..0124ebf69838 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -88,6 +88,34 @@ struct imx_rproc { struct clk *clk; }; +static const struct imx_rproc_att imx_rproc_att_imx8mq[] = { + /* dev addr , sys addr , size , flags */ + /* TCML - alias */ + { 0x00000000, 0x007e0000, 0x00020000, 0 }, + /* OCRAM_S */ + { 0x00180000, 0x00180000, 0x00008000, 0 }, + /* OCRAM */ + { 0x00900000, 0x00900000, 0x00020000, 0 }, + /* OCRAM */ + { 0x00920000, 0x00920000, 0x00020000, 0 }, + /* QSPI Code - alias */ + { 0x08000000, 0x08000000, 0x08000000, 0 }, + /* DDR (Code) - alias */ + { 0x10000000, 0x80000000, 0x0FFE0000, 0 }, + /* TCML */ + { 0x1FFE0000, 0x007E0000, 0x00020000, ATT_OWN }, + /* TCMU */ + { 0x20000000, 0x00800000, 0x00020000, ATT_OWN }, + /* OCRAM_S */ + { 0x20180000, 0x00180000, 0x00008000, ATT_OWN }, + /* OCRAM */ + { 0x20200000, 0x00900000, 0x00020000, ATT_OWN }, + /* OCRAM */ + { 0x20220000, 0x00920000, 0x00020000, ATT_OWN }, + /* DDR (Data) */ + { 0x40000000, 0x40000000, 0x80000000, 0 }, +}; + static const struct imx_rproc_att imx_rproc_att_imx7d[] = { /* dev addr , sys addr , size , flags */ /* OCRAM_S (M4 Boot code) - alias */ @@ -138,6 +166,15 @@ static const struct imx_rproc_att imx_rproc_att_imx6sx[] = { { 0x80000000, 0x80000000, 0x60000000, 0 }, }; +static const struct imx_rproc_dcfg imx_rproc_cfg_imx8mq = { + .src_reg = IMX7D_SRC_SCR, + .src_mask = IMX7D_M4_RST_MASK, + .src_start = IMX7D_M4_START, + .src_stop = IMX7D_M4_STOP, + .att = imx_rproc_att_imx8mq, + .att_size = ARRAY_SIZE(imx_rproc_att_imx8mq), +}; + static const struct imx_rproc_dcfg imx_rproc_cfg_imx7d = { .src_reg = IMX7D_SRC_SCR, .src_mask = IMX7D_M4_RST_MASK, @@ -496,6 +533,8 @@ static int imx_rproc_remove(struct platform_device *pdev) static const struct of_device_id imx_rproc_of_match[] = { { .compatible = "fsl,imx7d-cm4", .data = &imx_rproc_cfg_imx7d }, { .compatible = "fsl,imx6sx-cm4", .data = &imx_rproc_cfg_imx6sx }, + { .compatible = "fsl,imx8mq-cm4", .data = &imx_rproc_cfg_imx8mq }, + { .compatible = "fsl,imx8mm-cm4", .data = &imx_rproc_cfg_imx8mq }, {}, }; MODULE_DEVICE_TABLE(of, imx_rproc_of_match); @@ -512,5 +551,5 @@ static struct platform_driver imx_rproc_driver = { module_platform_driver(imx_rproc_driver); MODULE_LICENSE("GPL v2"); -MODULE_DESCRIPTION("IMX6SX/7D remote processor control driver"); +MODULE_DESCRIPTION("i.MX remote processor control driver"); MODULE_AUTHOR("Oleksij Rempel "); From patchwork Mon Feb 15 12:34:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12088177 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.8 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,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 7B91FC433DB for ; Mon, 15 Feb 2021 12:49:19 +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 2E10D64DC3 for ; Mon, 15 Feb 2021 12:49:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E10D64DC3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=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=VVkGXWdnekZMTtyPRnWG94YyGZre6aXZ+/hyosbmucc=; b=LW5H5lHR0LYoBaY+pZKo24w24 LgOGj5U1+mBg+J88o8YHDrG294wM3pipI0EMO712pBcp8bJnMbs14DV8BIsGdr8MXW56ytiKqxqIw A0mXV/itR36Ayk8Ksm6M71IVKduSKkMO3l/qQYXTyFCxrroYqsUQVRNyvp/odvgo3MT1N9I6Y36vj FNxf88McTBL/WfqnglQ8W41W8ZQ5D9s8KbSNCtgGdQtmwDof6iyZqgMSwsCjyUR5klyz03+RFq6Mt 6oVdEZCcoyfU6jTtVa8nO/Ugyxd+I1Fp6om+FDz7jqSxTQTzRqmnYZwVoOWf8xxT4vw/nfl/ynDMU WGnsBe48g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBdIA-00040z-Du; Mon, 15 Feb 2021 12:47:54 +0000 Received: from mail-eopbgr30057.outbound.protection.outlook.com ([40.107.3.57] helo=EUR03-AM5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBdHa-0003lF-Eg for linux-arm-kernel@lists.infradead.org; Mon, 15 Feb 2021 12:47:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZtHpkHCFPOw0gKHSkCFPQEuwiWnKKk/4xPBMpnqQf0CzYhE7DC18i2HtE6kQrlVEtwN8IBoJrii1dqE/uaqdUzHUSjcqu1e23qfg9rgUuWdjsLWH8JQiWPIk+GoA8xTA2vCCwwQVjD4u5ZWqR3VDdYq72CkAO9RcEs084crx42IB9DMl1+SlobAfz0FX1mnkbgyK++L3KUjO4kKYPoC7lQuvops8kur6hlx/2i27LRWmpqZCTncTN3VpssbGFNd+g0ajzbfEVJJz6w2n5HKwkxUuHf0oLCfsoyOZduZQVNSkN/I6ds+TGoT6+GArhLJWBrwpwo92vrm3x4QUEBHS6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ylGtRczgykA3LROiqvT5P1IRIRg5xXAemZjMRiCZwqI=; b=Q0fZZc2MpZQLJDbUPSCiKH5WQr8JfkwYqzwnSQIxys8LUzUAtu5F+muNJhArt/mtdpW20TUheqQPDhvSbomc7nGcQ4JisCDGkDwhzJ2/Eqkm8OJR4lBZWsAwhUiXXrUTJJcu9v6NnOa3C5paQpzS1cyKv6rPn2KlwEEcZXYIE4bUMD2XKfraDbYla+6ItqcXgSzoorH3QdZJBHxwTJMiVSVXfpkYcypj9T+4Np2+HkBNU7V2kAqJr6nezd3fMOjWCqi5cTCiEz5pktCxYC+UK8kbwbTsoy5o3xd232vlUfBazYwKx4c2eks2Vpfnuna9OSBEdTrjFwP4NljJTFhL5g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ylGtRczgykA3LROiqvT5P1IRIRg5xXAemZjMRiCZwqI=; b=XkNXVhMo49blUbChTgWqup2GFmUxOT2KFyNr0GDT/dD/MORsuKP71oHTnA+JKlRceEAxxd6c0QjTET5jZkQZclWJMPUbb1abzjkRHrh4xb+M1DP9hGUz7teuzZ3pkf1/YLJhv5IHk5TPMLGL+nOAtN1iJEoKx9/geGpi7JQFC0w= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB4091.eurprd04.prod.outlook.com (2603:10a6:5:1e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.27; Mon, 15 Feb 2021 12:47:14 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3846.027; Mon, 15 Feb 2021 12:47:14 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Subject: [PATCH V10 09/10] remoteproc: imx_rproc: ignore mapping vdev regions Date: Mon, 15 Feb 2021 20:34:22 +0800 Message-Id: <1613392463-9676-10-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1613392463-9676-1-git-send-email-peng.fan@oss.nxp.com> References: <1613392463-9676-1-git-send-email-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR0302CA0019.apcprd03.prod.outlook.com (2603:1096:3:2::29) 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 SG2PR0302CA0019.apcprd03.prod.outlook.com (2603:1096:3:2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3868.12 via Frontend Transport; Mon, 15 Feb 2021 12:47:08 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 79cc3fd9-569e-4eec-b260-08d8d1afd14f X-MS-TrafficTypeDiagnostic: DB7PR04MB4091: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1247; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bVoM7i2asLfAAOZrze0WAyYR9SmTpFMcqcK37MBTv/maPkxbLixDoyT/4QHpInqW9kjoI9QuHJHA87umvZNS6lNpkYIEMRqf0rgbFQD+rupzzjtSZKEPzBAJavI9WD1H1CmxXnepREGyCg9apAQKE4J06dPxtvenoE2th2tozm8D/Tm6B+HRoF/6gneDmspPDRy9s+DhZbW4zZFE7rBfeb7psTGj2fuxuY5ljGbO7g8HUiEn3WBEgNDVa/tAq92MhWYHVSM2hgD7cz9J2u4sWBLc21zH19i7mnLX2LGySlmCNyp0djqe9NCHUo6Sk+xj0VLOwjNWuE+Ys0zPEIKwwvGP/BXAS2B0bsmfsYBoO4XE3eNcJiLsvFqdQUWg0i6hkE+r1C4dgniFygj+RtIkB9+arM37F2hLCiJw3v5dmzY9e8LliJZ/APZp6lHbUr8oSBKs/pnrMw6dLnPgdhC3nSehccnG/k/Rv0GT2BB5kymExlLje7pBhCdl7wg0Y1xrbK+AhRZLrDh4VlR3fLZc/v/Z4zWat/gJtENvUpKvz2u+tJAzj+LdsYpOlIpAyt3UIxvLfaa/HTnyR2l/+3emtw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(39860400002)(396003)(366004)(136003)(26005)(6486002)(9686003)(478600001)(316002)(186003)(52116002)(6512007)(2906002)(16526019)(4326008)(6506007)(8936002)(2616005)(956004)(7416002)(86362001)(66476007)(66946007)(66556008)(69590400012)(5660300002)(6666004)(8676002)(4744005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: t4GlAx2XRCteQ2yk9PzGMBgutBgLesWLER7cRUdstaYCkEN8odhaUM5arDvJ2I1zdqDZHJStY2UAc8BWlaRw8Hamk0g4Qmn5oUq95MUUPbnm5Fi17cG2R8kLxzZJtn1bwFnqL1kj+4v9J1Gh2TacV0DU2dXzN4JN4W+FX+umdJUpY8V1CQR56+Q1WRlOtBtXS3O3ucGRxIt/dVIlwwdiR5b0xxMMlpQg96q8nSHolypz+radPTVNJ+Qf4+gj3tt3gKmyYoC/JGz3xo94aaOFQKDdnq2lBZx0zY6V+vUW2EcISOglYsWEv0R1rvp2xsfGuBNyiV74JNFlOJOAD0ngJ35pTx5Np+5KWriwWw/RrsPNNf5IRbdgRG7Tsn2YSJC9YchgvvQnyMhG3kSvqbFluoqLowEG82jOW9EA/5SKWsqn3jRvoDIclFwVyvB90puTUNUUbukaYdrPZ/G129YxGYukFplRSGFo1g73jknpxua6bvfqwAVkTO7j/8Qf8wyEMm8PIUpt5gBocfIFLklCLescmUe498eVjUJ9w2SdC5DIXsTiAPNOSxgOasd2xjekJumvhhbS6QWfEuHhg6WyHetD/6B84tM21jTBMRnc2q/pqGuddqJvyiUGqV/cYjNxpUoQmjO/vLkY6PGGCrVjH7fvZg5NHzPW/Xe7D0evjPOfvbYjuXZo6qo1ugbubRSFci1s/Efr+QtIHvIyu3yuOz9wp2gEDnq0qJi9WDX8jzRVcXgxlmZ2Cvusa8nLKBmXHz9mp1J2qJbcguOZHp/Vp+bKLrhz4s2abbcJioWCtKFdDypGCccDdYvblLvW7X2AbDWIq6FPMn9wq0+m1pZOsOAnorU98z5D3sxZMQNao0uJH3e4HgmT1vhRNiS8TztJzxh/bg9uilPuQz9W3UhAEyNtKoMI43HRcnT2jPNRxV50zEfkVmGckxMMVCqSArSr/X78CvPDQH2YuYVadcx2DdRYA2f7QKaUuM4XuFxg541+j26z0wg6WnJ9Z1up+ab+CKv8whhpH2H5GjradfOM4vOykr1Okk+I9d8J6Uqwq4QycNuSA4AoOS0g0YEf6Txt3XrEeBgsQnIAZh/usZgztR4LMectdYM4+nEj3TjIdYqlAbPHLlWSnOfMs8LSiNEOWiVflPsJD0K3r16goqF7aFtLh/b+q9cH6imREia3XegIHYewMPLylZcPOYnXQHLr0ITrSKF3S9NYApuepn/ytCsY3n6HTSEMxpUsudRlVScWpRU9LM6AyCpmRs9l1Rgu1x10zsqHFioNauBNt09pzuxMumPVwVsphqVAIxqzbYE/g6tcGw1zZIz8LGQq8Acp X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 79cc3fd9-569e-4eec-b260-08d8d1afd14f X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2021 12:47:14.1614 (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: VkCa6BSDST64d2lGDREoli7yWxxQViZoPKEdjc0TGSxsNjYn17he2b2wf4zJ3HO5W9+Y/9SGXZoRAcwx1ENwkQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4091 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210215_074718_578930_79BBC2F0 X-CRM114-Status: GOOD ( 11.31 ) 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 Mon Feb 15 12:34:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12088179 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.8 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,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 C06A7C433DB for ; Mon, 15 Feb 2021 12:49:24 +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 6D8B364DC3 for ; Mon, 15 Feb 2021 12:49:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D8B364DC3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=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=5gusAlzIxuj4lbfPoFTvHu2UT1NzffxEH/pVGP544rs=; b=W9QLQBx4QIoFStWINInAFZGkI ktMLUUFe5IVpqKLdNDrehPvgTtusrYsXyLVAhSHNGizmqO9IA4GsezPy8r4xuat0ijPgyBA4Ku67V h6Tm8SYqbOTL+DrR5xnmKtIhFKD2r9bO12+H482rhG6V++j6xEZOJHtMSicqMjqrv7NR07bzyvhcF m6I74Erx3DXIQRWSENwkMCiUsPnPQG21NryFNo33PKnxll5bPndq2E09iVBDTvadRUUlBnqN24aUw DxvPUYHE2Q2u5FdNQC0bT3IDTM7xGoReKLaYYHOCcNkz8z+9+xPnWAIf6B8IuUGoeCTl4gfpTdBZN L+tLoMP4Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBdIK-00043U-RW; Mon, 15 Feb 2021 12:48:04 +0000 Received: from mail-eopbgr30073.outbound.protection.outlook.com ([40.107.3.73] helo=EUR03-AM5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBdHg-0003oS-FA for linux-arm-kernel@lists.infradead.org; Mon, 15 Feb 2021 12:47:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RM2Avyp9OsBd/DhbOojL5OXyzielBiGf2SkCgrAzWJM9Kwn/UnUJJy8p6eAiNB9gdO5zfgdX5sGaYaSYvues08Q6shIfj4I/OtxeYCaAq0sqFp5izkglel2I6LQhaBxFKRcmuZDL2pduFB6nc+i5xPgomvG0WXjFduiYGPJv1HBAeccSho8NOUpSIcQ22BMmoqBqLRzUAhaCzChDOEte0uQ0y5z2D2AE86HrtXLCPnvUBZ9E76VtAFCE5NIcZie4LoNUnQ44TtXIYPkVbke6JwLj5bj38Gqh4sedcx2QyG5K1HDksg8Wo4/4cX8z53f4zXdnZ+kMUgKWTapKmzXpXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZfBczTf+RB1EWa5ibevseo+tYbxVdHstdpl8p+i5B30=; b=C1mvo/JMVs0vRTlef2IldPdw9SjnNRvPvHYH6lXt/dxC8afDmNrIioOMD1NzDaLNKF0hkQSxFxDvFfKmKeshH+GEhzVpZClekKHgDXKJ6K6qMp1P2XFNlA1VU9NY7xw+fYFd6Jwid9B1Lj81MDE6Tz2+phP8EvB9Ls4+d6YH/VYskifIniEyz1A5KQ9K7tkfC9vzfih7KKee4d4+0CxJCQLVh6CtfH45IHESluWTI1jzu4OlnVveRDO16w9e1KQd8rd035sbxiecnSlEfye8Suo2XcT3YVXQ0DEZi24/AA8n8bOUh9YU8o0D4q9IKa8D6P91sbLPqeSKdvL9NSA37A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZfBczTf+RB1EWa5ibevseo+tYbxVdHstdpl8p+i5B30=; b=jLf7FGhRwO25St90vpoSWd+yzV4BhfzSxBcP84aEwB9uDqOC/avzN1ncoV1jgGmllxzBiVcv7ohIi6jtBn1kC4hjhd1ePNMCiS4f7lJv86aZ6zDFHo6CdLJ1bmy8Zphtjl+b3PYej7kSYISyAKwXFs/9gwffan0oU5RxRT7Ktt0= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB4091.eurprd04.prod.outlook.com (2603:10a6:5:1e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.27; Mon, 15 Feb 2021 12:47:19 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3846.027; Mon, 15 Feb 2021 12:47:19 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Subject: [PATCH V10 10/10] remoteproc: imx_proc: enable virtio/mailbox Date: Mon, 15 Feb 2021 20:34:23 +0800 Message-Id: <1613392463-9676-11-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1613392463-9676-1-git-send-email-peng.fan@oss.nxp.com> References: <1613392463-9676-1-git-send-email-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR0302CA0019.apcprd03.prod.outlook.com (2603:1096:3:2::29) 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 SG2PR0302CA0019.apcprd03.prod.outlook.com (2603:1096:3:2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3868.12 via Frontend Transport; Mon, 15 Feb 2021 12:47:14 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 377695fa-411e-4bb4-77c2-08d8d1afd501 X-MS-TrafficTypeDiagnostic: DB7PR04MB4091: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:751; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HvJgRAvvNfVTSmXdAeF6CrFluVMxe0OYoxvNvK8tnr0RbLKxS3yjAdGykbUrsuxa1iY/gqF8c4hfkZ1l4tDlFow9JpjsfjEEAnD2yGecFC0mOwI6pGU0VRScnpvcdrbT30q+0kb7V22HdSaKpSASuELPjQF5QevU/9bZ4ESg+01BoWJks/4c/BKL26CPSM3cU971mB7bC/m/VcAfOFiQMbKZKJjRQbH+anof7BvfQPkZNHn7B7zeJps1K07wvxpsxsDwU0a20IdabobFtWOmWLH955mM9924FOgflovLQY2Xov2UMihyAT/QpS0byCmextTjqea62ZQQuXVZdtBnki0h9ZVEOXS11xaoRP7PjlEaA88HJNbuTydzQI0LpignPmZac3gskKqHzoH9S7cA4xM6arEFNelZxn/YkwLaUSjNJFg4cNQTHBBYRPxhm+NwnfQafra0cZ7WW12kdtcDRqYAUn3vi0R+w91UK+w33MIcYu/WM3wXRwykJ++MerkeUlaYPXdCO6HoB4esBxr4Vpsy8McThupU/IFKlywB0S37EAdG33V7kFR/xDy/0EZKvharRysQdtr/9KRpE/i7Kw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(39860400002)(396003)(366004)(136003)(26005)(6486002)(9686003)(478600001)(316002)(186003)(52116002)(6512007)(2906002)(16526019)(15650500001)(4326008)(6506007)(8936002)(2616005)(956004)(7416002)(86362001)(66476007)(66946007)(66556008)(69590400012)(5660300002)(6666004)(8676002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: HNKBTAG3EhBgQXa4LaAuPDQ57RGQ74TIgqAskFH7zCK0GD3ClZAgJIOG+tXHwc6KdknE7WEEtPzax7ODGVvbOsM2sIed88s6mFWfYo9cuUdldBO3BqrfiH4Xgq9vAtYpIQQPaUOV8iyreMYnajKpIlHKSF8tNbLq+jyd9LpiGCKBTOmtueCvJqO+h4K8bfJXnIQ9hS56pWcwWZUN6FJEYfpAXQNce17eUq3MdAPsH5/d3YplsHxX34HZCYqRL1djuOcAS5h/6pdf9gEYZPw38YkyfQW7sp/3NIVsNLr4yT2420dU+U5SrQhHRN9ZDPaVJve6MlzRMtdlB5pVkoL/RLbWW/K0kBzAyyX6lMe6+cvWy/RAWXtodStylFb5Zg/zBg9Xzt6F5hApaPBLBDsEBjCI0Am28ba5SFU4o1Cs2oJtapZd/aNv/qF/Q+i+atMQJgtn6jWXhwL9hPnpMncW8KVRERwmIDYzlWrN4XkpiYMxxO0SgMRtGWqkjZZZfJh2LS26PXhav2AJJko4GvdcGrB4mPqYlaMNvGitvW0Hvxyv6aOjZfyjUS3fP7G+E8I6uLWvAzC3btavruLLjzg9lFt5Odx8zd/C9mPTN2jOGd6AR4BAl38FhxTgMT9ypzGE/Bg074STZXotsIOeLvfhjAUhfeE+rzgBP/c47Cfjra/GyU4paBAB3Zh55QXZav9FXLVQhXKFXKopTh0JSDEwd/IbBfMTaeLB4o5091FPTLLRbYOyRMxTkMjUqEC0c7INZ76ecYGxEMe4bxyzf8q6zq2zDF6FhOiQaGbwiZUT+O0vRYK1tMBuWWh+PVxczBBLCc3MfS9jCfBS1FvVK3cNuT2Xty2dmrAUgpkcuiKpS0yJUeymc7oLb3TSNRSq0nLxy2fUOOELU3WuBiPWRQC6D8VpMiUAdz3DD7Psm+SN+MLPBvPws5dLY72q6JRvscq/4Dq42Ub/ajT9S++KNy8UfXrHk/MARor0Z4KtW/qiSmfheOCjs9ouyy2CiU86FYGlw5u2p8aC4dmXPeTBwQUHe5R/YHCihuFrAALqkRvzWSKxpvIzZ4CIxVKXSO7HpbAHpUwHxG0/4ds3saPD6wD0Q1lywGCrxf2uq1sJ1rdqinf9O/4cPWD8VAMX+8FIyby3fsfJ6iDYnn+58muI9NX3Zzn6+s6Z/PGjAsqvrAFQN9WDennP5CggPKH14wB4cfF8aX4tQgJK5yKVzMN8CX7B87hGNBB68l9vGkEtEYzF4hKxgRzwBw8UWy2dNBRdbkVgte9Tb2W919Ig3ieanPoDcLlYcIGg/17dyEj2Lw54S0NV7/gYv2hQWsAZ3cfXiOAH X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 377695fa-411e-4bb4-77c2-08d8d1afd501 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2021 12:47:19.8829 (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: +KVKXU9o6K2OSsJdwDTeYr9Wxth+QGW5svMqDstLurEWecgLbPhecAcrlaxPyycQXzyU+NiWeefAt3hWAQaJBw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4091 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210215_074724_763680_1DF716CE X-CRM114-Status: GOOD ( 20.00 ) 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;