From patchwork Tue Jan 12 09:39:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 12013067 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=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88FF2C433DB for ; Tue, 12 Jan 2021 10:05:43 +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 1FB4222B30 for ; Tue, 12 Jan 2021 10:05:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1FB4222B30 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YZEntgS5CgS6SDa1MPoH2L6YM5quK8jNwhlobHetRyE=; b=jJXBGwjNObMiSv3bwdiJ3x/A1 a0AryHUROHqtGQc9plj2KJt5rMGV0MIUGiLkqOlG08KIoCqLM4i5GpcCCP/pYFvkoVN76KOYFaLEv kTIJEwWFoPjbvzNRV/FZBRi+GtchBRbkX2MmdZy+if34+G0Su2Qca4sW9hX00AHiA7Ea9FTIMyVsM 2Sir+KZq6A6BTdkh4yVpOiO8fJU58tOSvT4LVW0iIiatFgfWsvbPiBSk/8WT8TkXUqyA7NvRgplTF CqTbJs9axofEzjj3OS5vzti2fLy8zVzSqcd7zJzbsDm32Xk6OUrH2fWPbPybNa53QvIws84fUZpSM TC1avaHHw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGX2-0004BW-3T; Tue, 12 Jan 2021 10:04:08 +0000 Received: from mail-am6eur05on2066.outbound.protection.outlook.com ([40.107.22.66] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGWy-00049c-Vx for linux-arm-kernel@lists.infradead.org; Tue, 12 Jan 2021 10:04:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k11naD3oTFkD/L01ZF9xnuCLYYHmOzA7xbwIJzCUjElLggpRHynNRZdBB5N0+MJ6v5q7/xutG/9AOMO71TcTxbCDOx5/lMsrpXx+cLTenxLKkIGyVf7wk9MRhHC4QvSpU0BTzTOJhdSixh4qnqgln+Xvs6B4f/ldRFV8smxIgk+DK0X7qRfYEeQnCMYI/nGzN2lQGO3fRR7NoK4eflD3Cbt+Gnj9owtTAp4mWj2uCLwVbLTcrY7KGFeHqioEH7H4B6K/WmUFE3zcw6QauU34oNo8isaehEaS/CaBqc0UNJYkTm5heVsMu92o1lKXevREaZDZ+wIkZXDYXNMDPAik6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gDE+R7Ch/mAEdmQ1FO6tocOoj14gW072NHZg/cEzn5o=; b=d/AulnLDUhV2VmFGvFgmC6wJ6bHVSFMSIDPV1fZ2vjwg2FttdQ+lOXXhXuEeUcY92p/6sfZyJZRc1P8mURy+U1o9OPBQ+qRYKvheMnRQ/nMTqipKmke1Q6nw1XWknWg8iObgaSoYDiB1Eg1u5kSQ1t1ZjWnAOuS7wJO3W4lx4KggtVggRNCyS3dnp/TDhLWzGyQfe+ULbLHm/tcI+pN6g38LVt2I30xTUApqx2B7jndJHD9NnrHt00YleUccH/qEM3d8SHCFmEeSXhnao9H8EMtrhUqIrh+GAJHhjU7wC1dVFFtO/2TMT31wcDT1BM0bOueK8r7z7ZPBbALQc6Tmwg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gDE+R7Ch/mAEdmQ1FO6tocOoj14gW072NHZg/cEzn5o=; b=FHCU9J4F9Cq5hDR1PzImKBt9yb69pKekKNlyBLs3TdQ7v3LUcUi3fJwY5+XWs/LfpSi8UffwvZv1MDikY+vqQMQahw4T0wpr9r6Aj4EODZaggCZbj7/juN2flF5HSLbUJvzPGtT9V9Nksx6mtIjpvxxYpJFAGo7ZT6shhqpjM+4= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DBBPR04MB6025.eurprd04.prod.outlook.com (2603:10a6:10:cf::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6; Tue, 12 Jan 2021 09:49:24 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3742.012; Tue, 12 Jan 2021 09:49:24 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org Subject: [PATCH V6 01/10] dt-bindings: remoteproc: convert imx rproc bindings to json-schema Date: Tue, 12 Jan 2021 17:39:10 +0800 Message-Id: <1610444359-1857-2-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610444359-1857-1-git-send-email-peng.fan@nxp.com> References: <1610444359-1857-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) 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 SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3742.6 via Frontend Transport; Tue, 12 Jan 2021 09:49:19 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f7a1a15d-fe85-4f51-3136-08d8b6df583e X-MS-TrafficTypeDiagnostic: DBBPR04MB6025: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ASn8b5Di+FE0rUhVf5Q2HfigRXJUdm2aNaWkKOi2iSrcl9ih4Ly/vCv+7LQgvsUmtLAGBdPsMXNO941BVG6wgDbhXPwAgJN1dm+fIc8CIYRBu9twE+S7fW9VN1j3JKHiT6Ydvbq/kZokFNDJGsMIw+TU1iA7Q2j6PhduOJy5e2+xGuJ2qkdyhVKZLMHq4yaYbwVIbCl399wLymD4d+IKrKH5/3b6lHICQbuuY0UkJXPEG3IKc6yQvBVxvBTm91ldhBQky1Gu/l0RvN5h54ITsV3gdSh6y/qrHLoEh2ZRNqbK8jSuEYYaRSk82dheMex6nsJ4xQmrGSFntT5mr7J5pRhGGYrwT8YYUslU1LNu1+w/0niIhUdK+NudwgyQ14cjw0OfyiW5vcKenCEGw6+FO1nLM5JRuryRnrFqwjhoQA1Fjge49kic1dmCJ9UMAFdDBXk3LFT0V0FzTcFNWEv7oIZmnfQiNdzQcXSu0h2ma4Rnc4DwPBljJAyRDdgMZ4lbkUPhS0UbBB5Px/yZr76pVw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(4326008)(498600001)(6512007)(7416002)(6666004)(9686003)(69590400011)(66476007)(86362001)(6486002)(8676002)(83380400001)(8936002)(2906002)(66556008)(956004)(2616005)(66946007)(52116002)(5660300002)(6506007)(26005)(186003)(36756003)(16526019); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: n/piyPIC1/TGDKw3LJKoBmmTgbfggC/ABbR7Iyucyq/+bSlmefskVmH/6JrtAQOd88q83aF1KoPJR7KkCqTsN94YdRtz8Lt8jnN/i7LWwthLp+YnPhpAbu232s93XyWRWr77XptRj1agpE175u4vP6X36d+C+284aNGJ3M4MRg9OfH6UDvkcMwudIyHY6mlSTf7mO5Yl3xCc5+/zTQNrRJgZsxAhwqbKHeVemuSXzHUiQUYZ2yI1Zbov0qQFGJlU6uJGCYqR4/AlJB9vQJBs08R3favFVtMFeaEN49HvZMoTp7ejvWjPDZJfn8YFDOZGZd3plGYhyREEmFJlVQFvpDjd3JKn0e0Pjy8mrmFJfZuC/Q+FJs2DJ9sseDyyi4iWfOhbhGNN+oeI/bQkrl4yQJ1qw2vngfwWA0ALFA5klOGz2dNwbIkvVBL4+PJZ1gP7auGD+IeEN1nRM6YMDpyFHHsHzmbnNvPECrby2eUgs0oA71k8LNyIf/bsOnaUfFRMhbo/u5jK1E9LXSZFnMM5o6tPIvyml3Up1rHpkOicYm7e9+KAp/OooKBcqcAyAH9Dpkn1p+ll3AGCpJCku8YbSR4a/8N62HJikU1oPqP+Eue2O+UdZimxPFcJuBNiw1+OaPAfq4xRS6laBJ2d+3BRCA0288SgV0DKYGc5KTJQBD20EilRzynLjtf6aAl+rl53+IZ7FODI0J6bWgla5ZSKz4K65ADnji9fez+FZkeX9Q9dqePrp1/tLCvaCsEG97lm0HIgxc8E3zsu0NURWi/WK8lchlQqO/r1A4fVrlqZvn4rdlw3Z1YzdjGqY7ocK/ZAjX2ahH5EoC357Zz5lJjEEftlj1amC4qimfvuXNE/oIJXPDL/y5oDquqYTlLktuH5q//IjXOdTdFursfWpGmVqtj1lqTK8EUUjFEA/wcN+9mjuloFz7gqmLD331/PjpvRzoYAh8qYfsApnqQpviXHuHJe2B9hBtAlNqxZYNTmtQjHz7wT1s+O9OcKr3+qBy00 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2021 09:49:24.6498 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-Network-Message-Id: f7a1a15d-fe85-4f51-3136-08d8b6df583e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: s4D4t8l8TiG820EEfz7+JKYeJ4pssL8+BrekAL2nz0ffaJo3cZlo5nc7LD8vi0eFzjoBEBAMgTRzTg1GGLpNhA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB6025 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210112_050405_069635_47F72282 X-CRM114-Status: GOOD ( 16.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, patrice.chotard@st.com, paul@crapouillou.net, agross@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, matthias.bgg@gmail.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan Convert the imx rproc binding to DT schema format using json-schema. Signed-off-by: Peng Fan --- .../bindings/remoteproc/fsl,imx-rproc.yaml | 59 +++++++++++++++++++ .../bindings/remoteproc/imx-rproc.txt | 33 ----------- 2 files changed, 59 insertions(+), 33 deletions(-) create mode 100644 Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml delete mode 100644 Documentation/devicetree/bindings/remoteproc/imx-rproc.txt diff --git a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml new file mode 100644 index 000000000000..bce6ccfe1538 --- /dev/null +++ b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/remoteproc/fsl,imx-rproc.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: NXP iMX6SX/iMX7D Co-Processor Bindings + +description: + This binding provides support for ARM Cortex M4 Co-processor found on some NXP iMX SoCs. + +maintainers: + - Peng Fan + +properties: + compatible: + enum: + - fsl,imx7d-cm4 + - fsl,imx6sx-cm4 + + clocks: + description: + Clock for co-processor (See ../clock/clock-bindings.txt) + + syscon: + description: + Phandle to syscon block which provide access to System Reset Controller + + memory-region: + description: + list of phandels to the reserved memory regions. + (see ../reserved-memory/reserved-memory.txt) + +required: + - compatible + - clocks + - syscon + +additionalProperties: false + +examples: + - | + #include + m4_reserved_sysmem1: cm4@80000000 { + reg = <0x80000000 0x80000>; + }; + + m4_reserved_sysmem2: cm4@81000000 { + reg = <0x81000000 0x80000>; + }; + + imx7d-cm4 { + compatible = "fsl,imx7d-cm4"; + memory-region = <&m4_reserved_sysmem1>, <&m4_reserved_sysmem2>; + syscon = <&src>; + clocks = <&clks IMX7D_ARM_M4_ROOT_CLK>; + }; + +... diff --git a/Documentation/devicetree/bindings/remoteproc/imx-rproc.txt b/Documentation/devicetree/bindings/remoteproc/imx-rproc.txt deleted file mode 100644 index fbcefd965dc4..000000000000 --- a/Documentation/devicetree/bindings/remoteproc/imx-rproc.txt +++ /dev/null @@ -1,33 +0,0 @@ -NXP iMX6SX/iMX7D Co-Processor Bindings ----------------------------------------- - -This binding provides support for ARM Cortex M4 Co-processor found on some -NXP iMX SoCs. - -Required properties: -- compatible Should be one of: - "fsl,imx7d-cm4" - "fsl,imx6sx-cm4" -- clocks Clock for co-processor (See: ../clock/clock-bindings.txt) -- syscon Phandle to syscon block which provide access to - System Reset Controller - -Optional properties: -- memory-region list of phandels to the reserved memory regions. - (See: ../reserved-memory/reserved-memory.txt) - -Example: - m4_reserved_sysmem1: cm4@80000000 { - reg = <0x80000000 0x80000>; - }; - - m4_reserved_sysmem2: cm4@81000000 { - reg = <0x81000000 0x80000>; - }; - - imx7d-cm4 { - compatible = "fsl,imx7d-cm4"; - memory-region = <&m4_reserved_sysmem1>, <&m4_reserved_sysmem2>; - syscon = <&src>; - clocks = <&clks IMX7D_ARM_M4_ROOT_CLK>; - }; From patchwork Tue Jan 12 09:39:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 12012945 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=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66C2FC4332D for ; Tue, 12 Jan 2021 09:51:36 +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 1A9FA23100 for ; Tue, 12 Jan 2021 09:51:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A9FA23100 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=n0LM4W7UzwEUusSQtRj6y2p2UfgK3LWChZbgOBMfdbo=; b=fRIzMkjaym9gaHyGIp6bW0f97 YFfW42qOO8+MnCnIQB8+JZSAwjSPYREfJ12Hj9bs7DU4osjpinbA0klsqtEsrNfqnSOzgpAc0DT8L fV++jyzuW6Bs9J3oTWvmvPga4VYA0+a4kMo5cqPoZbITCefQM2nAadyDrZe8w203VRGDcERO7ayNA L/0gvyGmlTMBkdHf7RMUnNDLildh+OWqwg214IAxgex3fMfHU2s2ybwbPZU+4y4g3G4uF8dHXbjPm +teHZoF1rxMKfc+Wl8ptU8mOQD7NB9SdHvN7MjzLa6wOzoejo+KF6YGhiy7YwlTDSJG26yLscu89R DcYppPaxw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGJ6-0005Rc-63; Tue, 12 Jan 2021 09:49:44 +0000 Received: from mail-eopbgr130080.outbound.protection.outlook.com ([40.107.13.80] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGIx-0005PH-Sq for linux-arm-kernel@lists.infradead.org; Tue, 12 Jan 2021 09:49:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YKRFtr4mhjHYPloT56+MZefuCoTG26EMLQmDxmyUUFsevQfayzitEqcW7p1FFj0dSg41ck0RHs4XskSyocVJ48Hp5f5c8OU8QxUstEa15t/WVrwnPnxcpvuFWm/StXbMBYJrxi07GWA3Ox0pcVELKIYpm/e1ki7rqdRXVSvXTTw/o0dGC5mEp5fx3mOkMB0ODOgdUJhlxFcP5vhLEUMblzBKlhp08227lyViIggxeVlo/iU2UKg4KrNhbXsQfgaYhC/ObIttGx+t2H+LjLg7vCzi6eyocmr6IsDK6eK1HovsfqrMWIUmG/+fdv8PSTB2jutJ6G2cJZRlCu3K9Ia3ig== 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=pd6ac21P5Qewd2ZmHmUa7bhm0Fg4CDbanYbYIYDKsJ0=; b=MlbnlDKqyBAw04ma9qqShoutQNekVspXri2X+1U7LPp35HT5yBZAv6NxQh7dWawzyA4guviyOyVBIUbFyQqmFTJthHYpvkxVoBqfjo7kfHYIUcLbQGvjwzM++ZUW0n1FfWyYCiBB3npeeBsxjvu1cFP6pRMKVUZzeHCt9N+aB/ITbikrhadqKE8IFUZFpYquUpKMBzuNNnU+WSBinHq4pOSBt2+yF91v+O9MlbBx+UG6Bf3MDgs+fKgVYbbSAwG0wmuyf9tVkmRn4Qee8Ok38Q6qhQUS4AH59pohlqGceFWiq6gjnCkzhKa7x5yvnhQ/TJ8Z0hdKmCvYSzKXkvZVzA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pd6ac21P5Qewd2ZmHmUa7bhm0Fg4CDbanYbYIYDKsJ0=; b=CpskRu7JyVO2Q6zm9YlVVil4B7tQyMmCqlRjHSsYmT/DIKciP+VOspxHA49WWOhSgdMr/ciJjpl6ma7kE0JsvtXC4DEhBpJImlnBhqfxD4g+m4A/kyV+Gj7jhPqi7aoCDHH1ytY4699tEWY7D00PxwnP1o3JzSRxQQQYd5ZdLQ4= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB4089.eurprd04.prod.outlook.com (2603:10a6:5:1b::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6; Tue, 12 Jan 2021 09:49:30 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3742.012; Tue, 12 Jan 2021 09:49:30 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org Subject: [PATCH V6 02/10] dt-bindings: remoteproc: imx_rproc: add i.MX8MQ/M support Date: Tue, 12 Jan 2021 17:39:11 +0800 Message-Id: <1610444359-1857-3-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610444359-1857-1-git-send-email-peng.fan@nxp.com> References: <1610444359-1857-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) 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 SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3742.6 via Frontend Transport; Tue, 12 Jan 2021 09:49:25 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 6079a8a6-36eb-4a78-dcaa-08d8b6df5b6d X-MS-TrafficTypeDiagnostic: DB7PR04MB4089: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3044; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: M3dtvvAV+b29G8zZ3GKxXKU4WriUQIhRtxJR54z7z4hRnt//ZLyIDR6w5mrZ9MuW7n6e61Uujz5ApqE4EsTJeppTN0XYr1qOK62hGNKuCpA2s6E7Eo/dqSts1gKBCsMTHBQ1wTxugRTFlvN2+Xo2BsMq20Lx6bbUOx5nzs93k+c5WT+d+Br5HgiJulf7VBAkXq+ozQznoYhKqWSg3vESHQAR0xh8O2CX1rb2qYsYe6iQxmiLlOQoKVgER8COlnHPsBNbbl2791vAuFKe5ioeYhGBZqRhzB8mbVbhuZQLZDOfT+lCJorBAMKw9vfp9TBerf87JsEqPGZ9el2vq52eXAoH5AqX85LW1v62HFKnm0cFlkp7PVOFSdCR8BfqPkKr670p+EdP3AvPti6WhwzEXRMbpW26KreVm90q6f6g7CyB068uChafPOgZy/Z1gIuwmJLMDQXIlTLemFalUMas1Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(86362001)(36756003)(8936002)(186003)(66946007)(66476007)(9686003)(26005)(6512007)(16526019)(5660300002)(4326008)(2616005)(69590400011)(52116002)(7416002)(8676002)(6506007)(2906002)(956004)(83380400001)(6486002)(6666004)(66556008)(498600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: z29muCEXuYbatZQ4UD80rnODiV0NGHyEt5HvApB7P70uuXl2V6gmyiwUL9nQ10ZI/AmxuVO1g5hUcViwK/+doozeN6cERr6onaHAl/maoMJ9NPA00GACTF992XHgXqD4ClLtUAB1Ez8HVSy53pW2DP0t4ZQQ3e6aGb/yZmKOg9UtReBe6mE7cY0x4cUfcUkjWTMh8w5trjlpun77kqetW5Or3BwKI2KKNYMnmJVk1ttvrKgPAxlcKEW3dWVMbb0FbsLQ4m8TZKLAtRkEZ7aFwlrs5maCmll2IjLaGmDC+9MHsLAMYOmvEjy65PxFh8p5kyAvEp3bAUTc0Ik8AsYhlJGGCHpJvxIdx+hLeQBlgi6+ziBMd6qgsHPTY2lvnmcjJv1zpp/1Vu4pgoseSSjzT9wcGCV0OJEicJdF/T4Pr8954nV7PvC1vLsicauwMnb9q8AkST0LZs+e/cAFqqA0TUb9NVoABm9A3nJKiQit7XhztmkB+Jb4HAx+bYW7X9vD1mW48plJhm+a0Z8oJVFmQ67eI3y7yIvxSmZW+bKE5viIfRk8X+YuHf2w4PrknszVX2kd6ApaJ1n3byx0aBPnvmjXn50D0AtljnsPYf5MCY/m/UxIYSfpZ7hwVFQdN42OFmXtZWx48upTT0oYkCRtD6S3yAo5sPeSUTVmVUNXzZoUzm/R8kkoF4/u8Q1YgHhdmo4OApsnPoCp0Kjx3utsFJdj2M3UYJn7xkrxZOinOypX3J0HWotIaJQ7PHvrKKPxI8FrQM9GhgC/BI7DxwtgZixhyWznRERQY7KckyU/oIjgJkaHkVtAaGORuXWZUwOaahwSJiH36X1pfoFEenBZ7n0c3AAPa8sRMwqD6EbLFfySmXWf+ZD3QDKnFmXtIoRT8zLRtY7UgCTMogRUQOnkMrIzeLOGWyu+0kwYviEQOpgzicPtSepvJmn44D1fEEOgrqlgzINsRJfhNATj10Y5GhbFHK0K2ZAESC0pwWI9lBfs7U3SSY1GnBoX+SuR+c3C X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2021 09:49:29.9864 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-Network-Message-Id: 6079a8a6-36eb-4a78-dcaa-08d8b6df5b6d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 14mj/YcZcc6E3I1v7U7ZANXmVLd0Ice5dGakBIJSFhShBOfdeX2cTDjJcTZAS5af/0WwuLKn8tKOC5ehUnyS3A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4089 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210112_044935_998895_3E552B01 X-CRM114-Status: GOOD ( 12.56 ) 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 | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml index bce6ccfe1538..0b534ce227af 100644 --- a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml +++ b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml @@ -15,6 +15,8 @@ maintainers: properties: compatible: enum: + - fsl,imx8mq-cm4 + - fsl,imx8mm-cm4 - fsl,imx7d-cm4 - fsl,imx6sx-cm4 @@ -26,6 +28,20 @@ properties: description: Phandle to syscon block which provide access to System Reset Controller + mbox-names: + items: + - const: tx + - const: rx + - const: rxdb + + mboxes: + description: + This property is required only if the rpmsg/virtio functionality is used. + List of <&phandle type channel> - 1 channel for TX, 1 channel for RX, 1 channel for RXDB. + (see mailbox/fsl,mu.yaml) + minItems: 1 + maxItems: 3 + memory-region: description: list of phandels to the reserved memory regions. @@ -56,4 +72,37 @@ examples: clocks = <&clks IMX7D_ARM_M4_ROOT_CLK>; }; + - | + #include + rsc_table: rsc_table@550ff000 { + no-map; + reg = <0x550ff000 0x1000>; + }; + + vdev0vring0: vdev0vring0@55000000 { + no-map; + reg = <0x55000000 0x8000>; + }; + + vdev0vring1: vdev0vring1@55008000 { + reg = <0x55008000 0x8000>; + no-map; + }; + + vdevbuffer: vdevbuffer@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 = <&vdevbuffer>, <&vdev0vring0>, <&vdev0vring1>, <&rsc_table>; + syscon = <&src>; + }; ... From patchwork Tue Jan 12 09:39:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 12012947 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=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 823BAC433E0 for ; Tue, 12 Jan 2021 09:52:12 +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 135A6230FD for ; Tue, 12 Jan 2021 09:52:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 135A6230FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TeL63D8bCGgMSAwkzCKJfmrj4OUtLgqGVncUE9rZ6H8=; b=UMGeYLbjMAxfaHlAbtcwZLbHr 8L4LuziZa7aS3iUe9ma9XvfC/eXMzGEcWjls5QgoNlN7AShh4tlMfCiULsiVckdlgqOLWYa0r98JH wiuoDP0/XFDxPgzAEur2W5IHU5lciXKwqQAVIxyJQEZqf/kktpJuH4I2P0f5eGPVUBo8eyAgzhBOf kq97Jna1JivyMfia+QQdQvMHz+fmS9b9UaDZih/uDd934B9KvkC+oWUd5/jO1mDJ5xdx8TIvC1bld Gw++h4xQ4UKEccUEJV9dLHBZQfCZtOEtg4Z8SnSfwCmYF1wYEVsXtBQe0CmJbVD0PNmYC+wT8XRlb Du1cAYZ0A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGJQ-0005bT-Bj; Tue, 12 Jan 2021 09:50:05 +0000 Received: from mail-eopbgr10045.outbound.protection.outlook.com ([40.107.1.45] helo=EUR02-HE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGJ1-0005RS-Sf for linux-arm-kernel@lists.infradead.org; Tue, 12 Jan 2021 09:49:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oZfhzWc162V03nhVL7+6oe9oIDe/O4rI5g036IYT/80p7dnXQgenhHdD66KjiZBXoumcOOzhdQazOu5uLrijRZZdizpn9bavCFnNdxxgX0EuQYMPzjPMwDvtQfwxmpQVrBqyFRuEzhVvYh++9xNhRrushYgdH2aRQ8QOKGevjlSgvMwS/ehtk46IOzuCUJdQ0eyfWlv/NlAI7b0VWbcsu8zw0mXlnuQXtMXkJSSVzfHGyfys722ior7uXFh2ho/f0ZHe/wtS6/rT805TxZRTp0UCMKmbG/hf0PdUM3IEqEMmDRdcUiEatQ2DLyk8P1Zf8dIeWx25GhdAK6FE9N7zqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yOyXY+Wu7yjAZykW6d3WzVozTOhNuNfY+00aYS59St4=; b=Y7GGeIK5puRPKAYhID9GKfBBI7P12AX+bNdAmj/KbpUYM2LGtiXNm9awZm1JtDr59ycqtva7QBm6SiTs0nE1qwEFQV1eeuxzLoXpK96geWSoqnKM804wGuwc408gpZgZX2Ev/qzqrX+0D962LmBhbeQDMjjuqnpbLA9KRgMIeGXSF/oJ5Rm1wXWV5IvR7jshENoUuxiFZI8r1tE2Tzr+NrB8fmEk4lVhGMa5RHqkobN9/STTa5itE+zo4HpWbCIXxkPSh/u9yY8B5H+Bd8HnI81vQxuFQH6Nwgw974mBjBBM/RQOsgO80YBysus8NGpduKDteenzuTbvO1bvU4zrIQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yOyXY+Wu7yjAZykW6d3WzVozTOhNuNfY+00aYS59St4=; b=iXMvTJKaSErsCQUkEZXKw702rffh4ba537pIx1EG9tvs7UILwPq8zyTFluZ+XMSzlg72fxJODWBCwDS+E1I0HMrRzxcAgAubLOZwlaT8Iplvzft2ATuTHhObbeh/UAIYU66tsND+HtQqAcRvMMntYLVy4Ns18Mpk4udW81aXQAg= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB4089.eurprd04.prod.outlook.com (2603:10a6:5:1b::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6; Tue, 12 Jan 2021 09:49:35 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3742.012; Tue, 12 Jan 2021 09:49:35 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org Subject: [PATCH V6 03/10] remoteproc: introduce is_iomem to rproc_mem_entry Date: Tue, 12 Jan 2021 17:39:12 +0800 Message-Id: <1610444359-1857-4-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610444359-1857-1-git-send-email-peng.fan@nxp.com> References: <1610444359-1857-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) 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 SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3742.6 via Frontend Transport; Tue, 12 Jan 2021 09:49:30 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 92bbdb52-a622-414a-bf6d-08d8b6df5eb9 X-MS-TrafficTypeDiagnostic: DB7PR04MB4089: 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: iaca5x/E4vcahzqWx5LlAgOe1uE2yOLmfSPWfDMbGyRtc9PdNWbTA4G2dcTFzf4R8g4LPIGqjsDF+57PnWwWUtPX5fJ+QfeXAa3m9hwrIp+orSXXXbMqt10UPfkCDyM4vtCXhBiawQay0ZnRRJusKaNDpgC6EnlkSaeszA2cQCWOMhKh8ZctqQGHZrl1N1eeFdYhlp1d9s7ik6zpACmGPgSrI89DPF+G8oUD36kGqxYEaaXShmtP37g3OBnntE10dIp/Sf52osL7WkvvkCiL4+5stPjoEQ9w1+iZBhrRXnVLgDDlHGRMIuNfHYXDo6KPcnTuZrZMUV04M/aPZ0LPqPlfAVySJSIeTNXKkNMDKGT/yKbVlTSzWOdUne1Ji5zA4P+W6E3jnVntytLx75/YkVc3Vfu9KquMuZg6blIeOYG09J9bmUooddAt+tnnBo/vulAUnTOL0dZpxHTZSYri8w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(86362001)(36756003)(8936002)(186003)(66946007)(66476007)(9686003)(26005)(6512007)(16526019)(5660300002)(4744005)(4326008)(2616005)(69590400011)(52116002)(7416002)(8676002)(6506007)(2906002)(956004)(6486002)(6666004)(66556008)(498600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: aDQo88/j+PvT4KQT6MeJI7EeBGQzIvOx1E2Rz6BO3WpGb/sPBqNG5BveKQfUbthHduWO5VCtiUfH9lgXFetJrzjMMUYMTQoc+IW8wewC9oVSI5nzY3vLHGNlUplaW3JgzAG+/jK12cZtm1xChrmczS+Sr8+gOF8J9UhCztETEPxoiMzEnT6JeBRZM0h3huXibb5CdN5hZtvX8X9qVDbY3zwjrt/Y349N73eZsK69TnB0uyyHkGUcMet23w3xDWtRbDO27ZeJxizJxOi8ceAlKVaeOYXWll52etzps3ObCgtTD3p82DDjFJtbc/b+nFUgxbsAIXU9sldEMzvNrFpjLtCrLdriecoq5nKzIs4/VZBENZO00+ZhktLxmbd0P6YuGLgVic/JF+N6uqhlwzCsypsi3peEoJU91mW+TQuXbH2v+P4e/FzUpR7676WrYCVvy4z5NXPhWG79H9QN+DKN4Awj6NigLsoFTpUAYqKj8QnodvVsbFpSZCCfAJq8xk5gh11VZkR8cuCF6mknmYQVk57Vt9yprxJwonXNMn3n2ukSoAPyq4EAH15+ukGNW1+QQKXI5IexwJ+DZkcccJpsMyX+7v8iuhL8/X0j+9A+RxmvwoGlnB+BbnG2XoKHVEF5yZlDJypxmGf1yq6EYIowtSOkg+Fn9LLsZ0ozuiSJLTVCtM9KFrdvBbpjwHhUUj5Op41EXzzAL0s5S6irw6cKk2DGekGegxhQr7udj0Q35nWxFEwjUFxm/PlbFiZHHvgGXsU6T6n/fTtUs8xnKH0n5mLhAmf2k4WNn1F7JNW8nVswtaGbs+FhNfjFdVyt3FQYV9RUyQX7jP4eUjoS5qoeA6WM2zgszYMYmNX7+DjcGyE9tZS2uo+ZwknMtVG8o1Rfgi09E29CZaBAZqxckuhVY/sZzIUbga5Puafa9/21YYKtrvZyR8xeHTf0KBVtJRcy91RKEde7ukFyUBWLsODSqoYhUT1R0vKU1Hp73eYyRvhF76QdejJjp0XXz8dRdl98 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2021 09:49:35.4599 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-Network-Message-Id: 92bbdb52-a622-414a-bf6d-08d8b6df5eb9 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: MZZ9r2gAFqF4L+e1B/gcomJ1tB1SgxF4LE7Yi2b5nJIzZ+nZFU0dxxGXIG/Ur7F+OwtMMvAocHeeoFlkaHKU/Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4089 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210112_044940_012859_3C0C1C44 X-CRM114-Status: GOOD ( 12.88 ) 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 Tue Jan 12 09:39:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 12012997 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=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1A86C433E0 for ; Tue, 12 Jan 2021 09:52:42 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 17AB4230FD for ; Tue, 12 Jan 2021 09:52:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 17AB4230FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YW/E249TC6Y2iCMs8edKfAPveVUbZix+Y4xOJ7pyjV0=; b=f2lDqfZ8vuj8Yp4KAaCRofTTA nhqWnJ54vREt5tm4j69hqnwRDjRET5HaYLd7rXatJRNyFZnBB+Y0G7HSlqubBDisxbHcKPqLB4vVY AMvffLBiDDYM6BBxmClU0gHcUNfxXbFUala3MnXfXKTmyEO56WjzeKlDeFYfcxR8Tn55AimjtS7Jr jKkjo1/JL3gq+hHrgkt4hUrqjspwh5qQb7wQ7tsE6Tj4j22KSj75cF7x3x2uK6nPBZnnNEwicMOio d5h/jHkVyaxPaVIMjRmdVoJnWRA1ZaUcflfRdgxDWos2WEZc9OrtCLnfVedMcyRnznHEx8NtwzoCE XEclvyaeA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGK5-0005wb-6J; Tue, 12 Jan 2021 09:50:45 +0000 Received: from mail-eopbgr70052.outbound.protection.outlook.com ([40.107.7.52] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGJF-0005Y5-DF for linux-arm-kernel@lists.infradead.org; Tue, 12 Jan 2021 09:49:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FvGxDnxtvE0wXK4Jj/NQl5HKxlFTzXq13RfSifs4LgHV5cX5gsHjarCELd/d7v/982mo4kDEvSkdtDLdS3qykfUh/Wu9Js199/vJ440HtlM74KuHdzEXTKuHOf43InUMbtiLKYPskJw12WsW98I0phfkb373rBV0nrUhpPz53qURLGac4/6MWo9yLZfx7mafPlEXZAQcNd+vtE/tSOjLIufK8AHAOQr4R0iYUm96FtufA5FVpXTgo42XanNCptKrxEaBceBiMGqOLfB2MW5/5WHDQxqP0D4EUNoWwrI9Ck8sDk/O7N9lATlO0ANr442jrzaHk3hXBgDu/xLXoKjQgw== 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=KM0e3uXBYaDJEVYLE2Ire3JPDTV7DsYUFzjB6EkDINI=; b=QYJX7DXBC7A8cw2zcVl0iswTt0Uvt7smal+r5n/Jf2HBY+TIWGmDRuH1QFCJ1ZbwX+pJd0jaUzkMAi193cMATEHiJMwRPAPKRxGFfDgw25YpBmyYNH6hzCulQuHBfz8n3EvyGJMP9aVOliNLHjRPhMahtYfNFYQhpMXWMLKJIGFvyKktUV/vCXMaUd+c0PqsLzd6RJjFP9UqJZUUPN+FANlzPLl3QgIlFsCyXGjkdYhGB0qdYZ8LBYgPN6KN2/yvCRKGn/WJNGoTmK4gQrwbcAHkWisoxeOIg/nw7fNOLoHFYnouPu0Pm+54HxVna9KhiFvLqEplKtqhKuVAQn9V7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KM0e3uXBYaDJEVYLE2Ire3JPDTV7DsYUFzjB6EkDINI=; b=pjiXsCDm9BbcZiqwRYruTqPKQ3xjlQO7npUwBi6dSD0NLlioBxPJ6E/qUF7XEtpAOEqZ3FLf2Mxndz9Q0uOFxYsYYoEdnQX7sH7eqBrAKvY4xvGofercAwCjFAy8Mv1ZiazI9Reb9KcmMflKjiTaGaBgk8bwK6k6hsJWUN4ioE0= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DBBPR04MB6025.eurprd04.prod.outlook.com (2603:10a6:10:cf::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6; Tue, 12 Jan 2021 09:49:41 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3742.012; Tue, 12 Jan 2021 09:49:40 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org Subject: [PATCH V6 04/10] remoteproc: add is_iomem to da_to_va Date: Tue, 12 Jan 2021 17:39:13 +0800 Message-Id: <1610444359-1857-5-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610444359-1857-1-git-send-email-peng.fan@nxp.com> References: <1610444359-1857-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) 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 SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3742.6 via Frontend Transport; Tue, 12 Jan 2021 09:49:35 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 7c9081e8-9a3b-43e8-84ae-08d8b6df61ef X-MS-TrafficTypeDiagnostic: DBBPR04MB6025: 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: fIncy3Bi8yaRMrWJVwEgE3w+y5OPIUaTIl+WaO4/v+uzW1Lff+B9lMOvMjJjoQOM3Q+nliGGNjGwr+IfnN1qh8oXGsuisiiGgOCB384nEKEAv3srekn3py+M08kEYKq2ONQuNCnm6356o3WeJxXHFa0/E9b43xt9euIfDbGdChWLoK4AG2FD2+c32nfTu7stRcze6WX65C28oeVfOqMw3En0GzdUcIe9CGw6HhwnSSTfF9on+yapDQW6ROzvKdz9wfpzijLWAjxT1mzEu+xa7rFe2RjDh1izIXG4AxORFtUH/ChtuC9e4+9rKXK6VfwfGYy1blxEeNQ+BQC9+DBH7QsZd+ZSLVtR1Dec888odgu5yaSPKWElcEiPbl6pTLZkaNwMTCEGlkBWzc/chEtVFMH4O4Rrq3VUnwnmcvOlBlBR4Z6frA9+HAj8omq3M839BBw9RmVaXGXgqlb5r3NHow== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(4326008)(30864003)(498600001)(6512007)(7416002)(6666004)(9686003)(69590400011)(66476007)(86362001)(6486002)(8676002)(83380400001)(8936002)(2906002)(66556008)(956004)(2616005)(66946007)(52116002)(5660300002)(6506007)(26005)(186003)(36756003)(16526019); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: gMnRvKnx0sACO+4IgbTqW64ZhODJ/Y7c/tv+eIP4YtWn/aBPgjim9RX93fAkT3Bt9KqgBBV6bjQXXh1JWFrTHVeHUDImjRgwgTt7TfKEFVXjRRrvOILBoklykqe6tzMVCxUGxQ+omON1+UMsQyzQnBDKBlLAqMfvq/CWnZcHiPOw5cd5iZQIWH5N5w9GClMNIfRo/q2d0or/wNf2xA8O7+SjqRmcyiLZ0/T/SzhX1pvBOiIArYPvrnJLrG9bdgJhE9jbgncOLAcqkTBYWaEK+CoUeUApk0w+CZgJarYio2KH/rNiVaqYiND154FrIc4qCte5VcflFSHYqHrEtAcMTsaJZNkAsSfq09hBLbL8N0RXGztSslJ42GXmBWIE3UTGbgvQZ3mmOGCifUeJlCYT03GYPFu34ygMB8BGSrZf2o+dCOrCOvuYNGW+MI5RHdgQY0Ev3tNhhbkpc6YCTnEhJFpO2wz+Fi2dFiMxrunO2egCNxUEA7to1gmEQlt4U7LuEmA3Vazj1Ksf/A555liqG3UJKJDHw1b1JkGHiyQbNXy2YTh8ix6TJTUVp/Xw+EjhmWHgWWsn3mOSWbqo+RPQAh0Dye8+j1j4rXlk0VEO3EevUUumfbaacWhMLKnKLi8I8vJFkEXmOyga38GVD+pj5jIVhgiV5VaybF8hBCMPUs/RZeAMNAFy4NqaUx9wnXqN7a1pJyLmz61icUj7nfHogRJIPMaGkoh4m9nGEbEdjRs/5g318aw1qpfs3tb9XQv/OK985G7ngG+NO21qdqE/uc839W6gfEn0FGnfa6C/BV2qf/XMsn5WFyv6fRG3wH96ikbdWnVifCLBL+W5fX6qfcv0JUafih2+AwPau0eX7Si4q6xVsNHweeSOWATn/iPsn9Sem9I/epvNqeSh4bqq6lYwzbAkNpYvKFnzhKcU7R1FxORJgvt8ELrulpeEwOBfG5xmLtGRbtXz5FWcc6Dh/DOzXBy95cPB8+rqTpUA/JBtppOpTtfP5glDG+d7rBG5 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2021 09:49:40.9054 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-Network-Message-Id: 7c9081e8-9a3b-43e8-84ae-08d8b6df61ef X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: c/NYL8kXHjgZBD6ppJDV2gZa9pgzi9KyG/RqFcxIZ2RnKqeyvOfg0TIO1/5uSc/80Rg6f20woMOuCji3flLc1A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB6025 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210112_044953_983970_0CEEBA13 X-CRM114-Status: GOOD ( 19.65 ) 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 Signed-off-by: Peng Fan Reported-by: kernel test robot Reported-by: kernel test robot Reviewed-by: Mathieu Poirier --- drivers/remoteproc/imx_rproc.c | 2 +- drivers/remoteproc/ingenic_rproc.c | 2 +- drivers/remoteproc/keystone_remoteproc.c | 2 +- drivers/remoteproc/mtk_scp.c | 6 +++--- drivers/remoteproc/omap_remoteproc.c | 2 +- drivers/remoteproc/pru_rproc.c | 2 +- drivers/remoteproc/qcom_q6v5_adsp.c | 2 +- drivers/remoteproc/qcom_q6v5_pas.c | 2 +- drivers/remoteproc/qcom_q6v5_wcss.c | 2 +- drivers/remoteproc/qcom_wcnss.c | 2 +- drivers/remoteproc/remoteproc_core.c | 7 +++++-- drivers/remoteproc/remoteproc_coredump.c | 8 ++++++-- drivers/remoteproc/remoteproc_debugfs.c | 2 +- drivers/remoteproc/remoteproc_elf_loader.c | 21 +++++++++++++++------ drivers/remoteproc/remoteproc_internal.h | 2 +- drivers/remoteproc/st_slim_rproc.c | 2 +- drivers/remoteproc/ti_k3_dsp_remoteproc.c | 2 +- drivers/remoteproc/ti_k3_r5_remoteproc.c | 2 +- drivers/remoteproc/wkup_m3_rproc.c | 2 +- include/linux/remoteproc.h | 2 +- 20 files changed, 45 insertions(+), 29 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 8957ed271d20..6603e00bb6f4 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -208,7 +208,7 @@ static int imx_rproc_da_to_sys(struct imx_rproc *priv, u64 da, return -ENOENT; } -static void *imx_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *imx_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct imx_rproc *priv = rproc->priv; void *va = NULL; diff --git a/drivers/remoteproc/ingenic_rproc.c b/drivers/remoteproc/ingenic_rproc.c index 26e19e6143b7..bb5049295576 100644 --- a/drivers/remoteproc/ingenic_rproc.c +++ b/drivers/remoteproc/ingenic_rproc.c @@ -116,7 +116,7 @@ static void ingenic_rproc_kick(struct rproc *rproc, int vqid) writel(vqid, vpu->aux_base + REG_CORE_MSG); } -static void *ingenic_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *ingenic_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct vpu *vpu = rproc->priv; void __iomem *va = NULL; diff --git a/drivers/remoteproc/keystone_remoteproc.c b/drivers/remoteproc/keystone_remoteproc.c index cd266163a65f..54781f553f4e 100644 --- a/drivers/remoteproc/keystone_remoteproc.c +++ b/drivers/remoteproc/keystone_remoteproc.c @@ -246,7 +246,7 @@ static void keystone_rproc_kick(struct rproc *rproc, int vqid) * can be used either by the remoteproc core for loading (when using kernel * remoteproc loader), or by any rpmsg bus drivers. */ -static void *keystone_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *keystone_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct keystone_rproc *ksproc = rproc->priv; void __iomem *va = NULL; diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c index e0c235690361..535175f013e4 100644 --- a/drivers/remoteproc/mtk_scp.c +++ b/drivers/remoteproc/mtk_scp.c @@ -270,7 +270,7 @@ static int scp_elf_load_segments(struct rproc *rproc, const struct firmware *fw) } /* grab the kernel address for this device address */ - ptr = (void __iomem *)rproc_da_to_va(rproc, da, memsz); + ptr = (void __iomem *)rproc_da_to_va(rproc, da, memsz, NULL); if (!ptr) { dev_err(dev, "bad phdr da 0x%x mem 0x%x\n", da, memsz); ret = -EINVAL; @@ -458,7 +458,7 @@ static int scp_start(struct rproc *rproc) return ret; } -static void *scp_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *scp_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct mtk_scp *scp = (struct mtk_scp *)rproc->priv; int offset; @@ -587,7 +587,7 @@ void *scp_mapping_dm_addr(struct mtk_scp *scp, u32 mem_addr) { void *ptr; - ptr = scp_da_to_va(scp->rproc, mem_addr, 0); + ptr = scp_da_to_va(scp->rproc, mem_addr, 0, NULL); if (!ptr) return ERR_PTR(-EINVAL); diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c index d94b7391bf9d..43531caa1959 100644 --- a/drivers/remoteproc/omap_remoteproc.c +++ b/drivers/remoteproc/omap_remoteproc.c @@ -728,7 +728,7 @@ static int omap_rproc_stop(struct rproc *rproc) * Return: translated virtual address in kernel memory space on success, * or NULL on failure. */ -static void *omap_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *omap_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct omap_rproc *oproc = rproc->priv; int i; diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c index 5fad787ba012..8df99318f18a 100644 --- a/drivers/remoteproc/pru_rproc.c +++ b/drivers/remoteproc/pru_rproc.c @@ -483,7 +483,7 @@ static void *pru_i_da_to_va(struct pru_rproc *pru, u32 da, size_t len) * core for any PRU client drivers. The PRU Instruction RAM access is restricted * only to the PRU loader code. */ -static void *pru_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *pru_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct pru_rproc *pru = rproc->priv; diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c index e02450225e4a..8b0d8bbacd2e 100644 --- a/drivers/remoteproc/qcom_q6v5_adsp.c +++ b/drivers/remoteproc/qcom_q6v5_adsp.c @@ -281,7 +281,7 @@ static int adsp_stop(struct rproc *rproc) return ret; } -static void *adsp_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *adsp_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv; int offset; diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index ee586226e438..333a1e389fcd 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -242,7 +242,7 @@ static int adsp_stop(struct rproc *rproc) return ret; } -static void *adsp_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *adsp_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv; int offset; diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c b/drivers/remoteproc/qcom_q6v5_wcss.c index 78ebe1168b33..704cd63c9af4 100644 --- a/drivers/remoteproc/qcom_q6v5_wcss.c +++ b/drivers/remoteproc/qcom_q6v5_wcss.c @@ -410,7 +410,7 @@ static int q6v5_wcss_stop(struct rproc *rproc) return 0; } -static void *q6v5_wcss_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *q6v5_wcss_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct q6v5_wcss *wcss = rproc->priv; int offset; diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c index f95854255c70..1bf60dc84f69 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -320,7 +320,7 @@ static int wcnss_stop(struct rproc *rproc) return ret; } -static void *wcnss_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *wcnss_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct qcom_wcnss *wcnss = (struct qcom_wcnss *)rproc->priv; int offset; diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 2394eef383e3..9bec422ccce3 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -189,13 +189,13 @@ EXPORT_SYMBOL(rproc_va_to_pa); * here the output of the DMA API for the carveouts, which should be more * correct. */ -void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct rproc_mem_entry *carveout; void *ptr = NULL; if (rproc->ops->da_to_va) { - ptr = rproc->ops->da_to_va(rproc, da, len); + ptr = rproc->ops->da_to_va(rproc, da, len, is_iomem); if (ptr) goto out; } @@ -217,6 +217,9 @@ void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) ptr = carveout->va + offset; + if (is_iomem) + *is_iomem = carveout->is_iomem; + break; } diff --git a/drivers/remoteproc/remoteproc_coredump.c b/drivers/remoteproc/remoteproc_coredump.c index 81ec154a6a5e..aee657cc08c6 100644 --- a/drivers/remoteproc/remoteproc_coredump.c +++ b/drivers/remoteproc/remoteproc_coredump.c @@ -153,18 +153,22 @@ static void rproc_copy_segment(struct rproc *rproc, void *dest, size_t offset, size_t size) { void *ptr; + bool is_iomem; if (segment->dump) { segment->dump(rproc, segment, dest, offset, size); } else { - ptr = rproc_da_to_va(rproc, segment->da + offset, size); + ptr = rproc_da_to_va(rproc, segment->da + offset, size, &is_iomem); if (!ptr) { dev_err(&rproc->dev, "invalid copy request for segment %pad with offset %zu and size %zu)\n", &segment->da, offset, size); memset(dest, 0xff, size); } else { - memcpy(dest, ptr, size); + if (is_iomem) + memcpy_fromio(dest, ptr, size); + else + memcpy(dest, ptr, size); } } } diff --git a/drivers/remoteproc/remoteproc_debugfs.c b/drivers/remoteproc/remoteproc_debugfs.c index 7e5845376e9f..b5a1e3b697d9 100644 --- a/drivers/remoteproc/remoteproc_debugfs.c +++ b/drivers/remoteproc/remoteproc_debugfs.c @@ -132,7 +132,7 @@ static ssize_t rproc_trace_read(struct file *filp, char __user *userbuf, char buf[100]; int len; - va = rproc_da_to_va(data->rproc, trace->da, trace->len); + va = rproc_da_to_va(data->rproc, trace->da, trace->len, NULL); if (!va) { len = scnprintf(buf, sizeof(buf), "Trace %s not available\n", diff --git a/drivers/remoteproc/remoteproc_elf_loader.c b/drivers/remoteproc/remoteproc_elf_loader.c index df68d87752e4..c02d4fec93a9 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, 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(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 Tue Jan 12 09:39:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 12012999 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=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 880C0C433E0 for ; Tue, 12 Jan 2021 09:53: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 3465023107 for ; Tue, 12 Jan 2021 09:53:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3465023107 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=If/yjzihB8hNF4C3ws9PKtktGyj6SL4B/3CIKhDDtGs=; b=UlkfTFF2hWDX21wX+OWrSpJtN GzuhQI5HO/5wwnW7UT/nRTt67OxD4cB59jVbZ0iswCQwAkFeBVhffZ/LbQcQVSHsjGuLg4bUiCWkt lSLuLdcahP7pBcobC1T3v7FHJqpuNj/xZBtsSCsWlkdKLKGNnUK/W0MqLuJ3LM9sJQkJ4LgsjnqO9 bIkjbZxokY4aeHsw7O8prRML8oKRJEZt/b4RCApysH26u8/4PMe2CUqW/x7Lu2VBpFa/En/Lyu7GT NZ62vEgbyKygFXIiSIjjL9YhTIc/vs4paa7I7USOM6/0pAiWYM8Df0FvIcDUv+7nrlfZzYNAzIGVX odMM8PE+w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGKQ-00068n-CP; Tue, 12 Jan 2021 09:51:06 +0000 Received: from mail-eopbgr70052.outbound.protection.outlook.com ([40.107.7.52] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGJI-0005Y5-5J for linux-arm-kernel@lists.infradead.org; Tue, 12 Jan 2021 09:49:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g0kT7VcXKc2ygRBfowmgGTIhH2z+CJH94tpKClVTEthYmizhP1Qg0lHRXml3/mhNQhOgC9pV7mmHScnyzauq0qclXasyYFlCSfju++gyKii0UsMOFPjxwbFwTWn0Un1s3TQBchVk9GC0Y/tkOkfVmunl0t3qHVYvryIiFXf+/ibD2P0p9qokTiXFixe1KqlggrUF/gB2T+qf+g0VTyie2ubr+KqSrWzmjrrg4gxBsvm/gd18+RxCvN4rQHeA1aomrIawZRUXCdqF6/EG49XK54HUPl55MOE1geM0gsBBpCljxSOaqnJKZCpWIn06MqY4udUhPPILDBzrUgaoiTLoYQ== 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=eUws0LWJubfkCKMzVE2OTCjjcSiV+Eg0XmEBW9PbJ4c=; b=AAR7LadkbNbpucFVFk4LSYdI2Rgk8UmpklsAfsyokxZ4B8DQRudXOAZfwe5AbiFrpnDzHDmR0y0XWkPliB5mXEYx1hfQtGH5W5qfRUiB0aNypa4dIHWY5NSjC1yyd595kVw2SKZbHX30EBR1c9UBbYSDrcH4dkwwokdiK9AxbZ7rIWhU6UYskGsg1mkbczQuHEawH9LL2BeCeEOJxOh6wpbAmcXMskqAgUH6O5bXlctUJpHjBBG0+4GZiAqOtw6LSA/LvhJYbhV0LfQPRhDJxXwjJ4IziHvGFzO0ebd1OilJNtpWNwCjmLHqYrKmPguUxsaVEEWHccM9fkXE9D7G0A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eUws0LWJubfkCKMzVE2OTCjjcSiV+Eg0XmEBW9PbJ4c=; b=AOjnW2NvOmHRzd34PmoJ/q9l2hvUkuFUh1LId8MxR131UXxSyhwSbKMx1WOtx5131w9J0t1FOpbV/bJDB4g8KpvQvi11gmVCq7PmLKMxktW/X8d5230/BieD7kjpZf/BFgSZAZiBK3EZIjP6W+dgjZQRTtb+CTyMK3QZETbqMtc= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DBBPR04MB6025.eurprd04.prod.outlook.com (2603:10a6:10:cf::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6; Tue, 12 Jan 2021 09:49:46 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3742.012; Tue, 12 Jan 2021 09:49:46 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org Subject: [PATCH V6 05/10] remoteproc: imx_rproc: correct err message Date: Tue, 12 Jan 2021 17:39:14 +0800 Message-Id: <1610444359-1857-6-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610444359-1857-1-git-send-email-peng.fan@nxp.com> References: <1610444359-1857-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) 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 SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3742.6 via Frontend Transport; Tue, 12 Jan 2021 09:49:41 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: b87b5ad2-0055-4215-b1cd-08d8b6df652b X-MS-TrafficTypeDiagnostic: DBBPR04MB6025: 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: EDLQVm5DruampIkAmA9M1p4qBBZfAEIMBP0WFBnFOfjkjQqfqmFfNIWVQrYtOrvI0dWVH0Fbh/Zs6qYHOw7PuDCU8k8rqTcLBJrbfx4H1KkJIGYYvITFT6FYrB0T9+tPCiD0EJBA7rR5EwwEOT9slMDmm7QWJ427Uq7D4Y3twiI4w8x6aEEHo2b302who698s0AQA2KjsByz1wdwAZAK7YdYIJWEH5gAUt6qPw51FDrPSBu7gF4XyxErQMOSU30Z40p0ief1ZOW/4JDSmHA7BuTfwD4wBHZNhiwGFwnzBkUB8MAXZqdiKwJgS44N+Bgf0pTbymGlBPOl7j7SlmMPlGMnnZ7pJKpcockdP1DVI3arV1QnJmeuQW0sSf4t3lPVXHflEVhPIhJsuGfJpqhON2WGchUCER89bU7ZVxkOhUGXFcmFbKoUkdcnMJma+xL6Wi+zAx/HBeg1Zgh4MQarqA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(4326008)(498600001)(6512007)(7416002)(6666004)(9686003)(15650500001)(69590400011)(66476007)(86362001)(6486002)(8676002)(83380400001)(8936002)(2906002)(66556008)(956004)(2616005)(66946007)(52116002)(5660300002)(6506007)(26005)(186003)(36756003)(16526019); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 1gYtMI+slicDeb5UuixIhgVVkowyDl5wTSvs25GgJtckyNPIt707UCWOGE4R15zWtRi5I5qoZ7Yb3RkwuMhieYL7wuYys/eml3bDKZXFeQ6lefJ8YMeIp1BB71p0yLNGNXM+tKomPz1hf9EUjKeiH5wODBHg88238e2S3DMn6X0SRnoCQcD47+SEMB4G6m5OpeAQRPyzDZnK+QOln77+RR5He2wUdFtrAsNFwMZFCVwvbqOTirqKULZVrVL6nHu3/6kuBMS26asE2Hdz8PERNPpf+bXgaxCXuGYkHZ0vzTe07+GAiINk54n90JQ6FxOLbfrp52QiQRokQW+A1C3kjuQZptw8nj5SFsIpLx2sQ/rYkdDTNHU/Tc7yU4HtpO93owE5TgRCnAYKyaODcL8YPSP+TDnY3UBzma0wNayRcibLiOMyY70lx3bIyMGjN/PWmrk2+ZI+qvOaOh5a2+OBj0NpFbwm9II8cgXJ393lzUWrM197GRMyvxIhEsX+KhmijYfiMZBxxK1SpCL0li1ay5sQQcgUj6VexhQEUD/kxfrWdg5LQDlwzOeEuGmZO19TTVW78YgfxrHkcvYHZmT2ftxkOQz7+DGFIEA9fu94CZKUCg1bscswzkvV+pMU5hBPvvdnLbEc+1r9qymFdmRYaoubGvMU1/BAVJD9FoTc7wL+5DD3JBERl2JKUyRda64gotbg4qnz2JxrkzYgZkLsore22yH0aIAKW2gnmqP/89gGvLqBgZ0kP0EnDF5Blj5dW0wa0wQNyLfaQyilHWsmiTeZCqlfaK7FNw6menNH3M+NAZCI67kzcepskGjVu4w8eTm5+DfS7OKwuOL+x9PX39xewgRQTtYtFqH5I0nhY27hEEhyPzMQMsFfivQCbUtiu+F9IJH2ksTe4gOnUoRCNC0zQoZhq/JCQZnDyHTjjLB4HdwAumh6E6MfBgA1ZeLUD62CGzJ/1Cjbue9KQdKhgipI62pgyI/0pY6uj2p4HIAa2cIl5nKSnT8HCPKLX+Yw X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2021 09:49:46.2870 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-Network-Message-Id: b87b5ad2-0055-4215-b1cd-08d8b6df652b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: B3hHP4NW5Ga22zyHwwwShrXThhglasXC7mU+6r4lKkda5Akb/V+S7nBfL35w/a6N9EEzn7MIzS6/6/HFcDrEvw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB6025 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210112_044956_229509_7A93E9AE X-CRM114-Status: GOOD ( 13.96 ) 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 Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier Reviewed-by: Mathieu Poirier --- 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 Tue Jan 12 09:39:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 12013003 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=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF7BEC433E0 for ; Tue, 12 Jan 2021 09:54:01 +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 F1F49230FD for ; Tue, 12 Jan 2021 09:54:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F1F49230FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kFHanEakSdTcrbz0nm9LgnvogecTsIk/Y7h65tYgnDk=; b=JLL43tjp8+9McgRJu8BUEfOo8 7x73XkwWv1z3XeugsRl1wUFiwTuBRcfJiWOnKnPo2u3GGg8GXTHpVY4eDx+IIbmNOtjww/s4A/M7e jqz9lT/ec5EmoS0UUoS2+bpV3VA4u1B0bNJt+IcMUk3l75/+J1G1iQofRxxg6Y7BXuhXneBtTZ4Sj R3afKjveGPKZgTqjZNirw8fvFc6vgQ1B34mJXcDKtVm8IO8yiVI63kLhdxKbpX2KAmPnInHqGj+wW uQRtINIO0ACoYqZ8R4gRCP38fQAyJ86Oi5zpFRBomh5+UeULj6t03zgpnbiWdJg6DVu4ojpUGP02x a5tG/p/zw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGKa-0006D8-PP; Tue, 12 Jan 2021 09:51:17 +0000 Received: from mail-eopbgr70052.outbound.protection.outlook.com ([40.107.7.52] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGJJ-0005Y5-Cj for linux-arm-kernel@lists.infradead.org; Tue, 12 Jan 2021 09:50:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JJMVFuunKY7ofZSpguSlFmZURgB9r7T11Ra/wUnvhyjsL1XRHanKAWX7IQNvN01h5BKvUwFnfdlVmkwROVrhQOHA83WPPA7qWFx/BEGgr5WKp/GeEA6LMAgyFJOVW6JSPbLqfWNJoSMQ68voWCcIuYK9i0pcFnXoFc7aoYoegxUGb7P6V58nY+zfYJKG6Xo0aUECDbBvQ6oe6hoeFsxT+HWW72NrGeYKhBSx8fPbWkl6ieNwwTFBSNpYI46vLO0WZLLwHfeiJxt7LdvVkXq6xBWzq79HJdDUTxOa+s4nMz8kmVZBdsQMLrxPNil9S0Dbs2IRb8E9Et8cJddyq5iMxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NrM/10lxX+u8ygpoSj3Cn75qK7g8pM1NhQgG/rAaoNk=; b=NawoSvHLH8V59SQJLJnYVRhWL9xTYmwlZjg5/aC53YWlsBdMyU/mR1CZK51BA2leBELWHUo+4WZdMjBL6TmgHOmhPa66KaGSp0jOuqjMz5QXRYMeQI6lgkiPJd3tKsen5qDaeUaaUxMYhpL5ovt1EZwF47Q7sg8Io4YzeFr3KQ8VZ9nC5XluEsEeGeGKYXEmQCH2wLI5+vhV4pkQSjLXh7h0vUgn2yc86bkHsC4z60CGS5s8wQBA6hTDl6smEz1ivrlQaZQSPJ8P5uyzWaS69hnsioVLtJi6/EzKDZBP/5XD9VIaODULWn0hG3gaJH1jMoLV4kjr6o22tGSKQiZU6g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NrM/10lxX+u8ygpoSj3Cn75qK7g8pM1NhQgG/rAaoNk=; b=qofN123OxXjBOdTiuIOXhLxETYyTtGJ341ldllTyzu8Ju870BTxYp4ZHEeMp6PhFmQ8HJ7P21pWteAjGHOX4HkAffwpDVxJA4sfURR37IRBDzpxtks72lRhIk7SLtaWSj+ronoqxDvcRsgpgQ0jeNh7YRvqv6QXXsSXh9279dCA= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DBBPR04MB6025.eurprd04.prod.outlook.com (2603:10a6:10:cf::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6; Tue, 12 Jan 2021 09:49:51 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3742.012; Tue, 12 Jan 2021 09:49:51 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org Subject: [PATCH V6 06/10] remoteproc: imx_rproc: use devm_ioremap Date: Tue, 12 Jan 2021 17:39:15 +0800 Message-Id: <1610444359-1857-7-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610444359-1857-1-git-send-email-peng.fan@nxp.com> References: <1610444359-1857-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) 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 SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3742.6 via Frontend Transport; Tue, 12 Jan 2021 09:49:46 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 554e8347-1ee2-4f19-0a13-08d8b6df686f X-MS-TrafficTypeDiagnostic: DBBPR04MB6025: 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: VOqoCL53/Oir5Phe51N/q1ZMBYG0+f+0B37FvCTBzW/yJHcwLrol7JzDVy52709yCpJ7pWgjhbQysSoB2me8i329wSvOrXFhvvmFN4HihxOsgVP2rWDOfj3GDHkOTdfuTlabdtS7iwP+PHB8BqCZuOYo0ppUF9lge3UH2wlcZ1PTO2nHrUz3cDVluBltt4QiMvxnrULoaapwKIVk3RSuDcqcHFLlUtusQLH8AV4egRchjunpDxpPNy5+Wmz6YK/RsB1sIe/c0A4J3WwzQNkLOTG671eY/uePclcifIwvIwbCyblAAG7mPH5ikAxGXgLOWk9hfhmHS8K+iOuWTambAbkDNWO7HqZONMFjsEHsIM4QDrehZ59YPn0k6nmrW/VjLQ91rF8fLgOl1XtkvNl/kr1rdwiktBbuWgQs1aRyp8hnDU6Wt5Ep1PStVD0QewNPxbs34oYEUF3vY5S8DzCedw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(4326008)(498600001)(6512007)(7416002)(6666004)(9686003)(69590400011)(66476007)(86362001)(6486002)(8676002)(83380400001)(8936002)(2906002)(66556008)(956004)(2616005)(66946007)(52116002)(5660300002)(6506007)(26005)(186003)(36756003)(16526019); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: xHUI7ptyfO3WVRvtCBjwC4Jpr3hdJ1HlgAUJrKdvq8RlIzUhuwsxWTIejFtpp4kq+OIsWw8WY9GqHpkaUzKWx2bwuvpWELOu32+wNSxhJ0ciZhr9xtFNKuYRv/Fl1UK2kZpxeI4Vsu8+Iv8b4gWOR519N/eCDkgmJmFtzdED2Zah3zy7+mxn9wb+MmrebDOL3fTOqs3mlaW4mZc4RuOfA9JcDuQfqyljAqLdegPWqIv8JLZRkujBenSGc6a37/4reQVxjHWNpfAX+KW1Q6WYnZ/5NM5+YLoysGuTHiNYvFKo7NdiaAfjzCi5zwQQHQYRAd/BqRM0Ql+9IWykKrdb9SrAO628oMMNxjheIq2vC0Xx25pM5TL736rt+USY9T6GEDn5l9o7Y8zcQwmo9vpzjFThx6kLCmUu7GoeTKVYYdUAXORDGbeQZiAcqxpH75iqsawidTompHovPa++NC+y896EOJPuVuvzUbXR0QesviG5YvY6fBwJMMplNYKrZ56rW7YO2Vpzyma/PBb/HjcPP64peLEAcI9tMZWa4Z6uEX0OClJHl8DwlF7EWezWlWJBmOOTsnOt0Ds/TbwdxNcKCyLaBuXdA/ZnjFZNd9dg+Eg7AGuzc+Okneg/VWVMkEo5YNTW3vRP2/Ov1Oiask8t0CKzFzevj8/9U5z/C9RJzhhEeuLGzJtMn6IxZFGCtuCUop0lV49TGBYCIwOtR1YVgUcRmbz5jP/zYVLc62YRq+N+HN+fLCIYozfxudt3oY5isElTV8eNFqXKdKFvjFnDY2BuYeQxfPDO465d4kgnRdnvpKDbM4KwOxBTl1EqY3fxe1p5vUdky3RWMw/F6pz08KHGJVUn+lTLiFD7FmA7d3G9QN5nP996tTs5KF/2Dh9X+B6jBT7LbJPbRvsoQIzDDVQhwOj3S9SCx3ru2rFgpcfzOPnLLeR1Xn2arb3nbZYdkj+hS+fK1vtIJpEKfryLoSrutSH2i/fGPWgZ8K8cvLOQJKGph+XFSuC28mCmbTW1 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2021 09:49:51.8035 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-Network-Message-Id: 554e8347-1ee2-4f19-0a13-08d8b6df686f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HNkJgwfaDSwKxnkYHYatgn2dNktTJw/vc7fFyf4NABFZoZaljaos0mRllwOEcaATE4xQyZqIgLKY4QH81rjg+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB6025 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210112_044957_595899_73CAEAD6 X-CRM114-Status: GOOD ( 13.61 ) 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 Tue Jan 12 09:39:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 12013001 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=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0369AC433E0 for ; Tue, 12 Jan 2021 09:53: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 9AD56230FF for ; Tue, 12 Jan 2021 09:53:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9AD56230FF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xLc1lTP8gTEBqfsPTAtg0prpGI/cJcLbJlfQSERBqKQ=; b=s8sU5XNukzJ3uc4W5nJDCgQD+ Kh7uTQNH665jtMNijhEZYW+KEeYj0LbUfbsBoq6BtdM0nFu6UID7UeFn8Af1bZJlNWbK947zZbIYq TU4CMaH1nqHLgOenUq78VmpJ2LzIZv87Qqnq/Of2A/a2lL6ineXzXAZ2n7V+WEfWzTIj/hWh65ixU BM06ay6o/xbJhayIIlaT4bjV+gVldazd7vNqxdG/1JUju2zmGUAxLaDTL0lE+qJuglBGuEePWQM49 6e8Z1D2lTQ9cQyzP5zVUC9QNMsaTf6IuVD/NwSPyeXDoEMhG4Eg2KTade0lX11xZJJDSNbKWY7hC6 FoARxRi0Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGKo-0006NV-SF; Tue, 12 Jan 2021 09:51:30 +0000 Received: from mail-am6eur05on2055.outbound.protection.outlook.com ([40.107.22.55] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGJP-0005dd-R4 for linux-arm-kernel@lists.infradead.org; Tue, 12 Jan 2021 09:50:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R166lXol5CtUvDwPkK2N59NWayZut4D0+uMDDF8oQsr8OXB6m3RWZqXP7i5RQXQrKzzaf1fSkTXzD5MmzQq7yO8SwZfl/O7oIv1Cz4T0DOQWE2+rpXsRT+96YLs1NwbWyLIpuj1WWxWJLGXGNb7HeN03yEechNyFHY/ImdchFqQc0tV09h5sT/i0DUMJJK9bMSK93S6r4ufoIjOYSgb3A9PdMcqXR/MR+L6xdu5w+pAvPMOvrWnHsD7vtP897epZpmgIZxXbjrGH5pcFxY4+cNHHfTRftUGq+p/D6NbV53PF9kqlB3Q3XQlsmWD5+rq12a88cVgKDt4HMARyfe3w9Q== 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=LG9BDPRqMs/013Xi9CMEXxbg2o8zx/tTgq02hZ2QeiE=; b=B/qa7f6unv/MVDKDIH5T71U3TMpR5Di42lUCEGSz1CX/3f7BB1t/ygF3KtxVjb0eNi/8uTBY2Xy326lKNOAfwWODFQqvoj716O9OqiO0li5zDIWhF5ZzfJL233yiB6fkHx53FYlnaOWeGNILN840wAhZj19hK28GKkhCw34M6wRz/13RAoz+uO5QKy+yvNPTtcd86oxBdN4s4GHTS6D8JiqgSM7IXqE+R+4+Di2KaIq9IR8M/RztSYq3wc7AClgNfm6Hm1QYCec0a0qj1OqlH79CNyd5L5C459D9bxhLpavH9LNfhVgzp9p9ut9Z8bcljq77g7/+YdWjlsVF6MKiTQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LG9BDPRqMs/013Xi9CMEXxbg2o8zx/tTgq02hZ2QeiE=; b=gPsjFf6a750qxAVA8qdIahQblegbjjTiA97M91urmGEOg1VTfYppcoAyUSdh4B1X191/36LxBdbHVb6wQkyJCGhSSilIruYI1g+OFwyeD1nLP+TnLHy1El2rIl9vT0KHBEAeiCBfntKJYJxeeJ49Y1S5S88MNdlZO5F/J+XVGWs= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB3PR0402MB3658.eurprd04.prod.outlook.com (2603:10a6:8:2::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.12; Tue, 12 Jan 2021 09:49:57 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3742.012; Tue, 12 Jan 2021 09:49:57 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org Subject: [PATCH V6 07/10] remoteproc: imx_rproc: add i.MX specific parse fw hook Date: Tue, 12 Jan 2021 17:39:16 +0800 Message-Id: <1610444359-1857-8-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610444359-1857-1-git-send-email-peng.fan@nxp.com> References: <1610444359-1857-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) 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 SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3742.6 via Frontend Transport; Tue, 12 Jan 2021 09:49:52 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: dcc5a1ae-b278-4bc5-1e21-08d8b6df6b93 X-MS-TrafficTypeDiagnostic: DB3PR0402MB3658: 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: I9Xpp+fYqOEKeq4+PAjTJanXmmavG12j7Xvjc7ixvEu537cPmnS5aNNmUVDWSgLvs5a6FSdVlkxJY6/IsGczbjp5qh0FMD4srCNPJp93fZaxeYL8Zg2zlgBJnrCV9bBD6KV9WTLvfKoqhyHO6iknZs2F9NbIZZgSqPA8NyuOEWjvTKf6rfqKF5PhcHpfL8+yvVyAMAvYrqehSK6YRtWb/bvGVv/na5DjHTz/MOca52xR+0hT3Oh3BLa7rBXo2Pz/zwZFoCOYbAMteIyDDpD6R8r1AQGbEJqBWhRP9ZSZI3FIcnnhJ/iPHVjclU727bkiDOXFLS8QTTc94wZgtgipVXKI2f0vTgu1pkvn9+KQl/KeAerrpIkmzfQOeHZnui8s5TfWO9Q5Creglznjc0nRec26MPJsOWhhQeH8FBM6osGCQFxyaNocYwqaIdC1yR1sd32Aha8hg2nmtrtVRwMzlQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(956004)(26005)(2616005)(6486002)(36756003)(66946007)(66556008)(6512007)(52116002)(16526019)(66476007)(86362001)(7416002)(9686003)(6506007)(186003)(8936002)(498600001)(83380400001)(5660300002)(2906002)(8676002)(69590400011)(6666004)(4326008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: C+gu+02x4hoBVEMox+nhgWk4GmFyy7unwCejdZ/PxK0auGWB+M+L1oDN4d94diDRuDg30mmJmVKyduNpDaCN8rn5245TGw0Dc7ip0GNlgTB18k5M7ewb90tMxc8/FndfNlroVRzJi021V72SayUi7Po4KC8OZrWVlAaXC6R/AFIedoAL89sbwVPl1A1bAKEN9Ja5groajHeuje1rIVIC7aU1rN73FE6mErEpdRozZzrimb6Hpw/Llqh8Q886lJwjriz5208x44nC+MpDkQdlM20Nzyg/0IC/rayYQ5/0kZm+nI1nufRX3zaUSKlFD5MxspNeo7sInAe3tFje1YTProygiqqsFu67cgxmHDaawNShg/DLW75H9BQVqvk+xD0Gm0tQP5wkqLjFfGHuc1Sxmd9rvy9FbNw121pvXI4MuK6+DYyWyA8ldL+nKgFKC7drBHmHrns2P0GvdS0UiAQYtlvm6P716WoGpUXF11rzBupZN6erdKzJNZ1K8Imm7xtKXNMnQX8wU/PRh/8ILTJwcNvXD4pPIieH7PeOzchtsNClIV9PUo6Mru+t1byoCC5yslhNPET3bmafjuqeBZSpUZi3cLUQxZhzM4k+vL7u86fvRGkpB20dGC0O7c2CruzDPefmruMSp5zJ3UYUrIDioDsdL1twPZ+TTALsvCiF/FZwB6N7I4WXb3ND1drlofySs/wNU6TgzdTpIz93S8RgygYNbPNlJstT/TmxphRT/LAcMtqmliiw9NMnD6qs6MKkjzYLT+pFOFhI+hNV2XIpFghwj5TeLJkjH44HYC6wOntC9zXsMeKiKkk46aCPzorCFGxTR/VenHh9EGYUx4/FTF5fsgWCzBrgEbTbGqkhQiQLIVzIZhN74cXhhvtmQQ7gEjm+8fWC/fbIkrudvy9AF5xzqKMmcsr0pxgTOdE3gVIPZiXITfqGjKBGCezm7RebuVwmc5YVAli2gWeoKQloJ9RNMWsHNloN5MafyCiIA5ssyuJgoHPLYN5Kh0ch35Gx X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2021 09:49:57.0911 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-Network-Message-Id: dcc5a1ae-b278-4bc5-1e21-08d8b6df6b93 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iYB72ZzE8ts0Wew5wmtJVQgAHJa5PI2ad61g0b04w6VispUjzJAybiOCxhpGOBmyODFlmTiOkRvaZlAhqqO7UQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0402MB3658 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210112_045005_735173_D68DC569 X-CRM114-Status: GOOD ( 19.33 ) 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. Signed-off-by: Peng Fan Reviewed-by: Richard Zhu Reviewed-by: Mathieu Poirier --- 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..3c0075dc1787 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, "vdevbuffer")) + 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 Tue Jan 12 09:39:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 12013005 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=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9634AC433DB for ; Tue, 12 Jan 2021 09:54:15 +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 45849230FD for ; Tue, 12 Jan 2021 09:54:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 45849230FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+BHP14AesvLBydfyEl8nOwxgOoa6NKEOAeheWaEHR50=; b=rSxPhSMHFUiDKx9Cr2ftYwB0y ytYabOIH5c+33U1tzFa5RQWoAu0cS2JXR+USQFJpwjFXlTgZ7Wt4JWxrbZTrrpa1paAtpS9lY3dso 0vtGuGx+JJ0EAs9gAI7VjJagodBXg4Ust1yss7Vvf5HYr4IJjNRb4zu8tpZivDfI+YsEyNFCQiWpz +J+dnshcqmxM8KoZczOjWlFpATwmaLIrHXTmoi/1WvaQRC11bslIShZqUKkf6yIB0gk7Juq7ac9M0 i3QslSCt9F7EmpijKeF9RCmmwsY3rSSmy8ZMSDGU89lV1/xckFf4yk7X0GZGr6kzSlvCZ7VjauIrX 98yYFcVZg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGL8-0006Xn-SO; Tue, 12 Jan 2021 09:51:50 +0000 Received: from mail-am6eur05on2055.outbound.protection.outlook.com ([40.107.22.55] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGJT-0005dd-Or for linux-arm-kernel@lists.infradead.org; Tue, 12 Jan 2021 09:50:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N33muntF4qWv2W1gk98jbDESZ4EHW+WcCQC/RH5L1hrbOBeYBMyHcXmmjYNAY9+WR9bxlW45fPQlGt79ETmOIO+kM6Tq+a4DKih2kBEWR1OGz03ktxYsMhvavNrGgURPSTu1bY3iQ6sVWCTEdIhTxYrqIGacuXyQIPqj412EO7R5CgUKGuISvj0E80pmbM8k1WZg5V0S7iSk2r6AZEzx0mAyzCKk0USZBPxTZY5GKc6c2LXW+rOexCrGnvdBulqtiwN94F+KvZVSaDGHxmqf21QMj8c//Mvf6ltW5KzS6Zb431Cdo2kSUqx4vUQA4Zb2WeahmD3iL3SBHiYg165GXQ== 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=WtFEE6M51mDGF/Hl2oXngxif0aENCtRhvK9AUN8h4Ik=; b=ZpBBhoc7xHaNOOdVCYwTZdpVeTTycdKhzuATO6W0ffX//dRL3RNoFqFTo5w4PitqmAgJf+Nm3Vb7D2SfGxdoOhuJioWdK+iXFdDO8Sgn5pRPzeyLEHs4MywveRBHjC4N1mDK1Fr55Oul+hp79utnJdOiwKc7cEQE9htoXB91AGCld/1qivL+UGNbXtFg819FXbft7BJ7+DqA2p0JFJBQoY8hYj2AF58ZEGETYcsqJMa60Y+A6uRVng0s/tf0mV2Ll+vzDKAkg/oPQRX+m/i6AjaqqUo4Nzhxabig4JDaNezik0ecJlDVMgd+UIBxvBxKCI2tgxxWfQsoklkv/cOfcQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WtFEE6M51mDGF/Hl2oXngxif0aENCtRhvK9AUN8h4Ik=; b=V9lop9qo4Dw51N3qLiqSz59qLi30/dwsPKKFfU1xX+YgnttgPAjUDCh7cI8yd4Q5dG21hS42qwEW45s/OTmtJ7xNHyjDIEWPnUutm5YtFiV82Owz9MV6NIRpj4Ypa51edOj3sKWnq7Yd0+/93Jg0+pNxRSsJy8qcjWpq2EL27+U= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB3PR0402MB3658.eurprd04.prod.outlook.com (2603:10a6:8:2::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.12; Tue, 12 Jan 2021 09:50:02 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3742.012; Tue, 12 Jan 2021 09:50:02 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org Subject: [PATCH V6 08/10] remoteproc: imx_rproc: support i.MX8MQ/M Date: Tue, 12 Jan 2021 17:39:17 +0800 Message-Id: <1610444359-1857-9-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610444359-1857-1-git-send-email-peng.fan@nxp.com> References: <1610444359-1857-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) 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 SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3742.6 via Frontend Transport; Tue, 12 Jan 2021 09:49:57 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 3be91094-a225-4b00-bcb3-08d8b6df6ebf X-MS-TrafficTypeDiagnostic: DB3PR0402MB3658: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:61; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2wvgeI9M6N/DxrjgJZTk6wIKIfSaZscUMWGx3raYoPHU05kbfx8W8XzPtpAdYyZIy5ljDiVB6EpHetbhL5wue6aNS+3hkOv8Tob7UbaKlFjs2qGwTSZHJSaM4547Euvp58Xm+h3/GDTngXCvfSZpZYiaCqJoce/s1QV64SCDfhpWg+dlyfthM6A4TOI8lGvYnSgMb/6dndVHYUan/xuM9konLGFRJkcVo/gWYAeBHgFIacOvQWDlap1J1bCMKVBI0SFXEAxRlnAEPd+u88EeMvknxBGq2nCvBeFXZfmBvIkY6r26ZHgk0ooP3rs0QSAqasFTMroEI+/URsWpKyq40xfbjxi668DqW64r5A4POdyGo+pifQdyDdpBd3sMwJi0qmjIeJMkY5aKR6M8LT/mtnxp1D6qetqNVsyoYngOIpO4MipCgHNkGaGIkJ2wLvXP0fDdIBom9Dumgcjd6KAcsA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(956004)(26005)(2616005)(6486002)(36756003)(66946007)(66556008)(6512007)(52116002)(16526019)(66476007)(86362001)(7416002)(9686003)(6506007)(186003)(8936002)(498600001)(5660300002)(2906002)(8676002)(69590400011)(6666004)(4326008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: YSRTTKT/Hhl7vJLrycUc7PW6rVVt0S6PZsgoHs1Y5PNk9p13QVsyrQwmuuO3YQdAM1XckhUkpMNNbTvKJP+pCDJAuWW79GGSOpxJvpW5mhulc1eP+zQGRB77agqU1KaoihV1KV51tNe+ZlxMe0fFU0rxiwjFYUm9/OuUal9zFEEyXS3TRZcsGuZJhZAAhW1fRLWpn2W9kyVKnS3l815OJwHVxaK00pVGXmbLkxBQahiUg/wZWbS7ftnUoL0Jz8zRp6AuJpUyyw8g3EYmtuI6duW/7w4haHevQS3YASHzp24AAFuPZk1xDNtW+gk6A3wEUwhOSakKc/IIEV0rkvjy4H3sT/8icu6MMc1Jq6C61hHStpJCCl9o99MhQ4Z/SXU0CWT2XguqNmmLX1fYWghTqFxLeWo6XPU9wPHmb8z8kNeOe8OGxeuK9/f3kRAJ3SWZ29nU4sHRLi8zHDxoqLesoMDVZ2SWklINu32N/kTh2DR87ylDG0vJ5gVDoGsaVDXGTvhSwer9uxaU99gLZ0m5B6ukSO6zGhHdHwnUny1pIezwk69KAMKefWpis/fabiXJqzWmfNj/kx/Ef17c98GocIdY0rklqbBLYl0hURKnD6nbpYIfKrlHqYWGq0KFGjd6HLvtBP6s6ewiIJlWtYxeePjNn62nWpWzw/wRO7R43ZOuguLHT7spCcLq/EMgw6x1FLJ+AK/HCVbkMgMQenvOIVKsQjYRBjqEIWJELd8i79+sXchgXUeK88ZkpW1Q2rzJH5jOUcdmcsZwqeXAXVDKkcZcxFlIpnaMz8eJqiu2/8kXrAlSNlAAZJFSa5S2O3C/g8rTw83aeVENgDiDrnQa946+1fNsb3SFzkGmcWbcuyW1uv/Qy/iKmc2LWQ66hgdTExL2D2QDu8e9I1+gUqPtgHBYfXQ3DB4rHjQw5iGoUJTs3x/OPa8uLOD9syW1tUCGQ1Rim1eye6C241AZ8XX2Q2TDmLPbpbgCdYKOdzcuwNyEPKhJKHfAyDCZBJ+8cCsn X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2021 09:50:02.3867 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-Network-Message-Id: 3be91094-a225-4b00-bcb3-08d8b6df6ebf X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ENvB+FhQGs/fQFpCDdRPq+CQnNyAibdwJcME9r6Xvl6zCMzkfz3+VHkHOKTbUN2MbzI5nOcyJPj1cXq2y/KXiQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0402MB3658 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210112_045009_616622_C28E71AB X-CRM114-Status: GOOD ( 13.78 ) 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 Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier --- drivers/remoteproc/imx_rproc.c | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 3c0075dc1787..f80428afb8a7 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); From patchwork Tue Jan 12 09:39:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 12013007 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=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2979BC433DB for ; Tue, 12 Jan 2021 09:55:15 +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 B86D623103 for ; Tue, 12 Jan 2021 09:55:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B86D623103 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=jC86mearY8gND9L9qIfNWW200CRFg+QYPyhOK8MrF58=; b=3YPplOqVyqYmu2TNqacD7upKW 1X4rKOAqVZV3IOZUGQ5LYHkbmymvvIb6PFla+DgJ9ivVZn9kTG3M/M/2u0ZYvddLNHlaEXrLbMxoY askoXHjpW+ozjLXOaJIbY+HqWj3MXlP/zjJXPrF9xxtpRqLxgsyGdQG6C55Gxcw0olsWG4pMU9OBC QQxoVrpfqL8W4zY7JVbZ0xn5HOIUvycO8vKVoEYQ9PhhlojNjEsrrUAvIekxcjaQ9dMVZfNNvTZ5I fJBzJ0z0vaFYPLJgNRoz2+d9FqKZkvGK/2TYPbDWI/yQrk9czS9AhBcTZZaH/+wmm8BH5pdAj1D+a +PPKq0Z1g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGLl-0006oz-UZ; Tue, 12 Jan 2021 09:52:30 +0000 Received: from mail-am6eur05on2055.outbound.protection.outlook.com ([40.107.22.55] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGJX-0005dd-N4 for linux-arm-kernel@lists.infradead.org; Tue, 12 Jan 2021 09:50:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fc6aQlJqPpqFYtdf67KtE0yY2b9xBk0PNpiP+r6fd4O7Xg2jkXsxweAv5U8Wvb+QE9B1ULiAYl4hnMviRcb6hT9LFcVIosF/6hltCHidSXFB3q5lySRY1py/a4WjdP0y5t2NMn2netGcRlGXORCoIbm8KsRlESuBWODDPtQF9ez98DVxS2D26qqF7xk/9UyhmHc5OPdOCC4PoV476pb4whd5S3Vb6xcLZRZN8JHpS55WhPBaEpuXKhWVc/LSYZKrPshLJLXfvzCtEXfQOZA9jKiQYQGT1fg5UvAsUK3WLZAJjK56kMTP6WdLl1SlNkXQ70Tk0gzO7r1Zy/zavkJF9w== 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=pAYqIU35UPpL90YeZ0RIqNWEqoHhxw7xzRqpkA7vL1Y=; b=c5TqpZPBzwqyA1T+n8R1jbNYHmDEQtR4YpcIfGEH9R7OoYZA/Puy8ZZFKRz1uNwxaWbZAL09hhB3eC426jSnlOmwOzoOIExFkIUrGWRNyBmfXOwHwN7guo61YdidVRpWJUc9jxHieko2S0q7c+XoMdnjiRYdKkLUIXT0XjiCnaLeL6LBXpfwbv7xcencLCIUHpPEFJND0mG9tp5MYxEPNeSnkSaOCMlR4JJNWQ59E3j0BdvGQmJYi0+CtGF86Zc9VjwAoLVlGlPQp57zyIEtgVMLThM5o6FQywKch6yRv4LXHea6rBvVh/xKmhTMGe3I8fHJvsojTmLIBBb3WQUNdA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pAYqIU35UPpL90YeZ0RIqNWEqoHhxw7xzRqpkA7vL1Y=; b=jh1apPLSA7uJ+eATiO9tzul6aQSLZkHYLjIfCNe8gdbQdWowKKLO4C7rCu5qmD66OentkoDs8iS9tmz13FrqNBxejV59t6S56Evf+FVIDJ1mIEYmscIbx9zCFlNUKlNkxuhye24N1vrOznJ6t/XbQgwbYh9PeJhGgLBMSJAcgEs= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB3PR0402MB3658.eurprd04.prod.outlook.com (2603:10a6:8:2::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.12; Tue, 12 Jan 2021 09:50:08 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3742.012; Tue, 12 Jan 2021 09:50:08 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org Subject: [PATCH V6 09/10] remoteproc: imx_rproc: ignore mapping vdev regions Date: Tue, 12 Jan 2021 17:39:18 +0800 Message-Id: <1610444359-1857-10-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610444359-1857-1-git-send-email-peng.fan@nxp.com> References: <1610444359-1857-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) 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 SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3742.6 via Frontend Transport; Tue, 12 Jan 2021 09:50:02 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 93b9f83a-54b1-4461-372a-08d8b6df720e X-MS-TrafficTypeDiagnostic: DB3PR0402MB3658: 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: vqWAeh//YQorbhcxjwTFwcm+61h8mB1sM0juYpMSScLtqKsmQxsAxD5gf5CrbMAmY9zIVQOt1kadw+Z78Q8ny0mJbY3cyASUg1bDx79vJsgHoJisL4ExTMYcBWy0M3zGUYBGXh5Suq6geiMfDoHhImuvTgWq+AzofihSiSxjgw0kkcExRJLMUHKQSv4YBL24R0qNtuUI2vjbW2i6cNrQ+uvDp8gzvZqFZ6Q0KvFfZewjpLPireTZOvigCLGhAOKCGctEU+LqDCKZs55RP0sXMETCU8Hdwwtr0V0OjDXAYzQxvitl8YaPaP/MdxwBCWqOJDmlL5eYz1TSiAW7iCkBkZNNcsPziGDgJM7+rBIo4rFi6fnOWJyXMsxaDXH7M70hB8s+v3BCe0K/b1fy+c1LTyLvx2++nhwGh6rre1Y4NC70uvErxjmZqWzIv4UlsY65L301ijrBId8RdWP7bCmWWg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(956004)(26005)(2616005)(6486002)(36756003)(66946007)(66556008)(6512007)(52116002)(16526019)(66476007)(86362001)(7416002)(9686003)(6506007)(186003)(8936002)(498600001)(4744005)(5660300002)(2906002)(8676002)(69590400011)(6666004)(4326008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: YGv5kX7ooN066MaUNyMr9wKgF+azcYhrH4obzNuTwOHlpMBpkr6nZbp/+ij6ue/GwsyAG32VyXCDsJXdie7cLaafufs9SxbqkeaLS89GWSrEiw+n2hPrz40WoxaF04DsLaRSRsJgPWzh8rchGjSJaNKDROKMRU0vRW74A0cExLIDqWJMGi2om1X05W5dbA+CipgAFwvQxCq9MRYG4uivGH2G/EQXzhg3DswNwlK8exK7HtecBXCDamKGptEojVK2RwBh8i/GGurT1s5laNIhF2c9HnW8+57BfLkRXD6ZYfvZUGrzaIkMPf+757h7THsnHjHUWBPFMJRi0l+b4Q2lRD7WebqVjG6selID/Lg363vfpetDM8RWO7gfmySeTLYyBeMnxtQaYwL/iXLSClxEPxIO9TZSEMirDDgg6IWgjAExU5QQGifPi5u13M9gjHAgX8xplONWyp3xz5nYX8UhBrJ3e6r7SBmSshO/ghU0VSaIg2dkxc1+/Hk6ff9PMtu8uhka1eB3nhtD0Hpf/AYQv3tkYxkGpCscL5Cg3j67mfY1+kidUIep8QJL3dt3PeaIaAVO9vdmm+7DXuUonEFiTAqqHNzpmNkNjHlDFI8fN1UwGghCuuiv7Al5YSigfkwxXCt9qqnwmbK9r27OVP/jjO73v1XH+sON0FvgCQLUFG+1qhWQbJoD2CVbneECx3Kgn40ckGlhiPu3tV2QBwy7+ibsWlqE/XEWcmjf/2Q/X+uNx3wlNvmD8eJSm5+n6vZXfA9q/lnjWRzm3rU0DiRveIm4JYE5Sgv5Fqq4PY4GqNTebdNwxrokPQ/R5IZRbz3V+yshqPagyDN6xR5S645+OZYE3xrhKWWnSpSU8KZY55JImAe1E5BgkmbXG813StczgsvWsu02OEhTdcKEh3lCvE8N8bIcDpkrZZfCw4YzqD7yZIbIVpsd5YSL129lMCOkX8Azyvp80SY9mziS/ABhYRTe8WEAzT7u2z27BgGUP43McPNTHQjL1n3BAZcGmpOR X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2021 09:50:07.9781 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-Network-Message-Id: 93b9f83a-54b1-4461-372a-08d8b6df720e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8bd4ErekyLJqVWmPBhRTS9ZvDRMi+HbPQXfl5vKd4RIn6zC4YkEKBAaJ4vlSYTPqofMsBzcQ4IXYJvWnRg8avA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0402MB3658 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210112_045011_866274_D20949F6 X-CRM114-Status: GOOD ( 12.96 ) 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 f80428afb8a7..e62a53ee128e 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 Tue Jan 12 09:39:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 12013009 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=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11A99C433E6 for ; Tue, 12 Jan 2021 09:55:30 +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 A725E23103 for ; Tue, 12 Jan 2021 09:55:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A725E23103 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=n7f51DwliVQwOZnSUOaoKO4DDQvZuKwTDKGJqhv8wyo=; b=r9ohXCi4AlBCDmxv1k7YOL/9A VxKRCrFyOWa22Yl9hGn0mO33E4S+6H0YiQ9X01zX49EsTxW8BNnk4VOYgCELsYSS53W6F3RKvVFIg OXqF5v2u7ytVvyc2/WezsY3OO7XZI0obTHdrzkC18srFkbymSjQPfrpKN0LQYxHczn14xI5Ydmrtq DPj3Ynaa+mlUzCG7aUEwk6BU6ZCzVtxc/uAdyusW9aYr11kb98PbxbNCP6G43XTVOf2jKMkcwZVi7 Se6+cCGtKk5T5Mu+XVmFnHxuoobxNIIbiLi4QtQ9/elx6aDG8VoP8gxNNF1NE26GKCNglycg5iPV6 KF65rhbyw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGMJ-00076a-SJ; Tue, 12 Jan 2021 09:53:04 +0000 Received: from mail-am6eur05on2079.outbound.protection.outlook.com ([40.107.22.79] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzGJe-0005jY-DR for linux-arm-kernel@lists.infradead.org; Tue, 12 Jan 2021 09:50:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B3XLvwaGejjfW1u3fvOXcN3CobJqyYrWb/KU1oaIwfqfLNxhLnzaNI3Lc9JuWwgB/aCQmsiF51/KiyRHjcQZZfIVC+vDm7f8YFK/56THoJY3+PflHiVUDSIYDPAWjUgwjYsgo+fofSTw0meuEYQH4EKLXB0up4Moi1nxBSfuHFhiH+rpJknZGMhb3ZQGW7tteGYVyNfkpn7DGq8y0ze+CM5RR1psuVTTAviV/J7lRadmX1cOlYBAwShN06lWRF3lM+txhsHFvkccq2LkMtA6CnMvyuffvCFnzshjEj4eAWMGb2DptjsCnVEneIoovhlfy2XH92Pl4VoqVnCBteAUjw== 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=QLf6LPmqRrNcbdmySKxv/oX4Zp0M0bOHPxdt19tYu3A=; b=K2NYccCkB2mPlpr212WpMUaXiPFzZ2HhswWdw5Ybj5y/oaDcCfREVZ/CHOaFK7VRbCzlDKLuxg3ThFNlAH1G9Gw3YK+mm7rRInayrxUpqMfovz4l1g/s4qO4t7EiqMTrZfNe1o0YQhpDaZWFZ3nPUuXM4kU/qbJs5idydS2xyQVFgK3KUfPOY142qTD2yMxU8mJCzhmy6+qDGItWHRVTAcOg3yKic4JsK7W+CCaXBotg/EZ+6k6/scA+SaKCTJmofLgtwxsw7qZRFHzwaRg3+0D4/GDYCnkEBYFZMlTM8FA0Vi9TSOv+/Bp/sqZn7NJ1C4/SUU0z3qrOD2OvwgLU3w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QLf6LPmqRrNcbdmySKxv/oX4Zp0M0bOHPxdt19tYu3A=; b=Nd3tONr6p+WwrHvUWg2nDHDaZ4m7gjA7rFFL7tfRs7Fue5eMYaLWyWUommAyd83cOiP7zysua6O5w+mrSF9tBBEfMGAHBNtAFu1CJMu7BEoFp1rx9uwPf8rSfS9P3P4o+HVt2QLjjgSj23GpbHCtfwaREF7wgvi4/ULo02I+EKA= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB3PR0402MB3658.eurprd04.prod.outlook.com (2603:10a6:8:2::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.12; Tue, 12 Jan 2021 09:50:13 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3742.012; Tue, 12 Jan 2021 09:50:13 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org Subject: [PATCH V6 10/10] remoteproc: imx_proc: enable virtio/mailbox Date: Tue, 12 Jan 2021 17:39:19 +0800 Message-Id: <1610444359-1857-11-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610444359-1857-1-git-send-email-peng.fan@nxp.com> References: <1610444359-1857-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) 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 SG2PR06CA0212.apcprd06.prod.outlook.com (2603:1096:4:68::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3742.6 via Frontend Transport; Tue, 12 Jan 2021 09:50:08 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: cc0b68b2-9bf3-4379-9d10-08d8b6df7542 X-MS-TrafficTypeDiagnostic: DB3PR0402MB3658: 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: 48Ejz4TezikpAP54TwpugC9tTTMDqy9mPAEGJqDVHqk6xuLuLoTRovQK6wKe5VJzSldpsxjuTYU4UIOLipMs50TqOmXeqV3le8CuJfE1npJODlVdvBi9/lzkOZ5Ur2UJOyresrSVDFfRZkQiZ1Sv+nN1BlJ/4ZpfQU9gXCP7JW1Jcx5kMEvQArIPoYBDjOHmN2eUWmoXFkVKf6Rr4gKDtzMIbH0VYP1mGRtiEcEpe2MheqZBF3mwhV9Sy4c6Av0jIm73//MiY5gGI9lGODdNqpcxVGueqtJQcA6Nz4E0xnpFRq/4wSLJHmQWBySDi1vLs1bLfu+u4wEmrXbNfDRf6+KqZQyRdeb5WvUA9NxVrek5mJ8IFN4FbBE19Jt1qE/cqaeROqFFtT+Dg88c2jedTxcD1QslFsLGr9uKvUUS9roJdnj624121rHi3oqqlIPleEP3iVNEFNsDZunrpxPWlA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(956004)(26005)(2616005)(6486002)(36756003)(66946007)(66556008)(6512007)(52116002)(16526019)(66476007)(15650500001)(86362001)(7416002)(9686003)(6506007)(186003)(8936002)(498600001)(83380400001)(5660300002)(2906002)(8676002)(69590400011)(6666004)(4326008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: IF/1FfeP461NBD/wuhj607RnEqubyfKpdv43Rjn8Yo/IfRrwIOJkrFYysmrCpy15FLiTxLacQgEN1+QWD4xOLJhAJQZyOjIHHszmL+WeXaFIU5ZsnVPWQb2/veN7e3O0/yxvrpZ1vcMwKFx3eIZAbW5z1AErRDnliZcQTCnk1orPpOafl1i/CzPAVNZQo2rHmSYetGS0ogeIc1QjqcPstfLFoTIgd4gt3DrnwUXE5hzbjScD2P1SezONLThHUvbjzgWVFcb9CvGJYSIiBoZe44jimDw0tqbukUpZ3jIz8F7TzW3dg/SAuO5N0F7AQ4vv6jk005XIO+GBcRz9VVTdK9nogYoFI4bQkEnOuHfIRNEDl4Y3/8QP22RYzCn3EQuOkTX/oKB4prpH7j1Bci2tAlrX/RM2XMfh7S2yFkTKIOf4A+m3vskU0ihU7U4UpLbcFOI4DLDoIwC/xza6QIVcRWUzARcs69Db88YqT/bZc/NKP4XyXasjupxK4kEVJTE8FTccH6TxyXZ5MJMRkXPzW/usWx/qcMqwbaQXo9W2CgBd+5FijCea4wH48rG8Qn64W7D1Jhoqm0ghJeaF1ElYGtho6WRgpKBZqBBQd+DFqeF8PK8o1rX9SaplqD3guz8RiNSGfw16YjfF27f/VY8zgqiUnJOd03ZfBcNum+fI8hCP+Rmw7QaX7wLAiAO7ly34mcQlZkOzPp0N+xhqvgRhN25o2XuQ2fgdZEt4DnUd0q4hKMIU557rSumDYZkp4aijnbziYhODsZlXmRYp6Ma9W+v8QxGWAQMQFIn05C3C1+krKf605QGtzNJNZif1j/bt1WJ4j2mX7B2yZG0tfidmXH2/V6g5Uilpi0MJtX9xfrEOPR7whyZAKQ0NbinNgDG3hvaALj8HnemNESV5tTPh4IP5ny4QYgU5ZmHwV7CzxnTJzOV5+v75Xt8L6Uiwk8taEqsfDAm0iriAoVq9EmRlwLJ5EjjedAN/B+qF1g5cjjxkz3ectwTNY1rfi2rTqSrQ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2021 09:50:13.3217 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-Network-Message-Id: cc0b68b2-9bf3-4379-9d10-08d8b6df7542 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: c3+79NEd+WamPC3RAwRqmpiCsF9s6A64DP+HmK7nQtNfL/Qc1l264QTb+qoJTAK+hUtnlcwHioV0Q1/9jI+YrA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0402MB3658 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210112_045018_537806_4D3A4CC7 X-CRM114-Status: GOOD ( 21.64 ) 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 Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 115 ++++++++++++++++++++++++++++++++- 1 file changed, 112 insertions(+), 3 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index e62a53ee128e..812b077f1282 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,65 @@ 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, PTR_ERR(priv->tx_ch), + "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); + return dev_err_probe(cl->dev, PTR_ERR(priv->rx_ch), + "failed to request mbox tx chan\n"); + } + + 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 +573,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 +604,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 +619,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); @@ -527,6 +635,7 @@ static int imx_rproc_remove(struct platform_device *pdev) struct imx_rproc *priv = rproc->priv; clk_disable_unprepare(priv->clk); + imx_rproc_free_mbox(rproc); rproc_del(rproc); rproc_free(rproc);