From patchwork Tue Jan 19 07:35:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 366131 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp514959jam; Mon, 18 Jan 2021 23:48:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJy8APzcUEY9kBgTtAJpGeMQDyr8zzGkr5pfJIpG6zg9mk78HX3N+cw4LLM/QgHfgMQwUgki X-Received: by 2002:aa7:d1d7:: with SMTP id g23mr2385376edp.6.1611042508122; Mon, 18 Jan 2021 23:48:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611042508; cv=pass; d=google.com; s=arc-20160816; b=huXcB3FGCs27U3OUKxq6Av/2XEZmWTnZ7y7acwEsHU25zw3GE3vPRG3Yj5OELA99Pb uycP+nUp6bI5ILoAKriKrUXrcdUphj37XiJFnchTm+1WngdS5SxI6rngxNXA9zuQ+sBk JSjaC1tu4uRMeIpYY31UI6cPprIKXGf9MhMw96bdjCXiCiFBW9KQxAI9pV4ihTnuKSDI 7UvAsyTgtKOqDeveRvfa6svOw5h43NHNaY3NCwTXEQkXmaoXyxLywNFVocwUFfRfQl2Y B300+Dc1jh8+Bz9hLyeb4H6ptnV6WUJyUT0lbCW7Xgk+C43o1lA5kqyBTtRiBQbFCtdg 3TYQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=gDE+R7Ch/mAEdmQ1FO6tocOoj14gW072NHZg/cEzn5o=; b=kj6IB8fve1UOgmM1yMst3S5oO2c/rqUuKbsavedi9kXSrp7Q9qloODw5mAbIxuY2FT g6vuJbCdw3ywxOSACfOmggD6J2mN/rUdfUNn0iAZb2hBzFnGPw0ySGAaPpFPA+dQzaTr 6xSB+5qN2meYuBKaoAhkWMded9dD2ZBEFfEr6+8bMIkIn3OdyVu2ZESHMtLRtBLSVWLA cLiYfzixtTYBG3TwpnlpN6CYqXb7ar0jwHCVCEUT/ECDiLhsaQqD2iOlDofplPkfZChA nCCxxJr5YL/vemoLheWhGjhuN6XkmzzB/TszouqYHHIHNJ03h8dnBbno44X97rHFym5q IuMg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=CFblgJ8f; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f20si2368490edq.165.2021.01.18.23.48.27; Mon, 18 Jan 2021 23:48:28 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=CFblgJ8f; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728663AbhASHrV (ORCPT + 6 others); Tue, 19 Jan 2021 02:47:21 -0500 Received: from mail-eopbgr40080.outbound.protection.outlook.com ([40.107.4.80]:64958 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731302AbhASHq7 (ORCPT ); Tue, 19 Jan 2021 02:46:59 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=klVJTKU3gSsAprdKZwbeEpY9DrQ/H+bp/w3P3tXY2LwKTWuLmbM6LvdnrXFRuNzNmuFeY6zjHvVsW52nHtsS/IRrDj1pIvJrsmdss9pBGrHe1SgFS88DoIIaowfdo93vzDk0fmoT3JFqwR/JbhSahSw6lyMmlm+hDkJ01DGL5yhieuQJqVg+TtCHZCMbKFosjE9rsQ6W6ACWDEQJ03eFtoFI6RqkQAPNQw8r0YgpSu8so1UsQeqoQZKQYYvKt588+OyPbnQh/oSPKmdQwUl0Z6QvNfz7AyJSbpI/ajDx95dijVXla4FjR8NrfXsJQdT5B9FRTYaSEV8D99e0JZVDrw== 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=iuhEZBtBmvuTKfqKrI2lbfigh/ebd1Rmv8rbI6WtnTTrxQ7amV6Q3HuoLhkhIbs0u01earCoAnRyj8qqtw8Jx3TG62BZWNBSP0+erOkDNIFKKcABJCy9ulbjYkv25mLWytQSHtteVKaoXrJU8MLgaSS79lKp5YeDwa0kdR+xnfhJaE+8MDOUhkz84HQH2TlNP/DSGGdvY+YhaAR3SYD7HlZMYMe9o6qy2yMf6BghyYZcfar1MtbyG0q5/cuBX4JgLKPlII+9fMTwO0FxcKPOR9eZtQgmIVqJ5hgbXWc0JgnIm7pAAovmwFvie3JAe1WIXLTvfqzYs6A8UM5I35GEnA== 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=CFblgJ8fcm/vsb+KwANXjaUeqMRqHKBT/dYrdxFvdqFvgzS5EOF0ibUqRNKjVi+Vw1n0MGqwKt2F7rr9vEHeZFmb8UIXzWBDA4EqMRwf9K4EL7Gbxz1gaLAYpvt40g0ue6Vg8hKZ+YyYSjRaJCki+iyrYM1Yy0cVL5G7JNJ+m74= 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 DB7PR04MB4492.eurprd04.prod.outlook.com (2603:10a6:5:39::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Tue, 19 Jan 2021 07:45:39 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3763.014; Tue, 19 Jan 2021 07:45:39 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, agross@kernel.org, patrice.chotard@st.com, Peng Fan Subject: [PATCH V8 01/10] dt-bindings: remoteproc: convert imx rproc bindings to json-schema Date: Tue, 19 Jan 2021 15:35:02 +0800 Message-Id: <1611041711-15902-2-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> References: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) 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 SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3763.9 via Frontend Transport; Tue, 19 Jan 2021 07:45:33 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d633ed2b-836a-4b6a-4a2d-08d8bc4e371b X-MS-TrafficTypeDiagnostic: DB7PR04MB4492: 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: t20KWysijcCD79d+Ix1fzdnFB7hFShA3GeUCjh2MMnNo1rf/mnIs0851/eXJP3e0ehmbh1X4ica6Zz3GcVjR8PUr0WLGpZdgLs2ZyIeh7z44yx34y4A5o7oh8um+pCoEJKx77xc9wvo0ar2CdaCTebDHXh3BQokjiIjpIE/8SsAp/i2x9scxiKpbBmZYo/9fkkfUEJan5bxP+et7cesdiGkjFqrUxXBUfOMbwWswvTq9PQqdR+IEKmHRq9zpVN0LbJ6/763C5NiLp3pBl/x+RSWEjmZsiu78gnhvPbrQPI6Y0O30RZdF4V77y6qyBqqrMsG8T5dEYGW3qrrTyvjOoiMBxttN24jBMNA1N6Ys+3tZ2B5/QM/XOgdurtcBITrWZmCvT1RU7+/dlLjajwrgjfLJmcLJpF0h5Wz4b46hiaO+w6bc0E9gZ0osTE4K5ASApHXtDaZpe+fWP1IXYRTUlznY8xVpsTpQCmoTulV1uegSUyoVYGfU+aYK4JDRZTaSPlRBYowmauc/M3XR/D1ZiQ== 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)(5660300002)(2906002)(66476007)(26005)(69590400011)(4326008)(6666004)(66946007)(186003)(83380400001)(6486002)(6512007)(2616005)(86362001)(36756003)(52116002)(8676002)(6506007)(498600001)(7416002)(9686003)(16526019)(8936002)(66556008)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: UwZEbzhVi1xzsSAyR1dZa3th97IJfwvyCJz5S2YVrAec5X0GgYBce0iwyxr2hHQO5GKlZXLS7iAqZUwe3Mx1oNicsdQgE/N6mQRh0qckzRzy41dAvMWD36tH0DAuAEfi5Yiy4D2wYKD8tkF9VI0QoNxASdGOEbN3B8P8d8kqU4J+OPIt0rs+MqUEywlQDKTbEdb12cBY+mZMcMQKu+lDa03sIVO/NUz/v0FtGrKF0wGR8Hk5khe2iXoNVPtmskERRghQAOnzB/n+IM2qv4APqmesaGee4uqq6Utb/rNkHQyaVNhYCOqn0tHQX7R5xJLZkTdn5OQcf/qKrO3yLq/NpsBsWr3xy/97WHMa5t+rPdX+/lQSxk3a3KC3yndVKsRfDFNBJyMsZkqehTbQUYo+ezwOcxFPqdGjlQvRJ+T+JYpXsJa93iM2LtQgCTsLQg3zImWrZd4Sw6ntt9CoLWIU6E66NhpRWUbUl+HMs+Tl56FjrKUmdUWqPPgonYvBhCad60hgzLBlWwv2QdVaJSKOGONpNqPOnl02hfe+eIWje+KXWjXYfKv4XW25SNW6SVIsBUwmKRScH7Z+ZmXynrf8ip8Cw6scddUzX+/qeBH2YMvXY100eQO4hbLL7F8bWhIGqL4AeSX9cNngORzWmyDqubZidxLWI3tLzYKsCQJRBtwJnsQkzHJMv0yiaCPmZjt+xNx/XgmvG7i1+1E0CVWqIhXOBQK3lmLM4pVCNz92wUPpg+Pmxekp7RPBi5O70gKVdFZHdmWt+rqmkKtkCkZAYKnqdTUj1w9tNOVdLYVhD29uQXEn2aEwuwFihJBEkRVnWjTIVr4JRDKuFKQr05csDZZig3AS84/LzydKq5joI4rznVb9tfhOlSCwo6iwp0TagcOUrdkLfZJhV/g2oROEuglYlxVBa69/QKylq4rDZFmicaGwGQlwAvA4y9CpMGFPeIaodw01PzOzRz1hrdPQVnEPld51LbpePIAzsTASQGY1ia4v0Z7uuI/AKIeJRqYk X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d633ed2b-836a-4b6a-4a2d-08d8bc4e371b X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2021 07:45:39.3430 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HLz0QnF8qL2+YVHkGGmr3HdFVoyy2t3YmhijOkhNI0DTDblHzUNOSm12SGHcw9sPQnl7//+6GfKAn6zDyxrorg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4492 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan Convert the imx rproc binding to DT schema format using json-schema. Signed-off-by: Peng Fan --- .../bindings/remoteproc/fsl,imx-rproc.yaml | 59 +++++++++++++++++++ .../bindings/remoteproc/imx-rproc.txt | 33 ----------- 2 files changed, 59 insertions(+), 33 deletions(-) create mode 100644 Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml delete mode 100644 Documentation/devicetree/bindings/remoteproc/imx-rproc.txt -- 2.28.0 diff --git a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml new file mode 100644 index 000000000000..bce6ccfe1538 --- /dev/null +++ b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/remoteproc/fsl,imx-rproc.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: NXP iMX6SX/iMX7D Co-Processor Bindings + +description: + This binding provides support for ARM Cortex M4 Co-processor found on some NXP iMX SoCs. + +maintainers: + - Peng Fan + +properties: + compatible: + enum: + - fsl,imx7d-cm4 + - fsl,imx6sx-cm4 + + clocks: + description: + Clock for co-processor (See ../clock/clock-bindings.txt) + + syscon: + description: + Phandle to syscon block which provide access to System Reset Controller + + memory-region: + description: + list of phandels to the reserved memory regions. + (see ../reserved-memory/reserved-memory.txt) + +required: + - compatible + - clocks + - syscon + +additionalProperties: false + +examples: + - | + #include + m4_reserved_sysmem1: cm4@80000000 { + reg = <0x80000000 0x80000>; + }; + + m4_reserved_sysmem2: cm4@81000000 { + reg = <0x81000000 0x80000>; + }; + + imx7d-cm4 { + compatible = "fsl,imx7d-cm4"; + memory-region = <&m4_reserved_sysmem1>, <&m4_reserved_sysmem2>; + syscon = <&src>; + clocks = <&clks IMX7D_ARM_M4_ROOT_CLK>; + }; + +... diff --git a/Documentation/devicetree/bindings/remoteproc/imx-rproc.txt b/Documentation/devicetree/bindings/remoteproc/imx-rproc.txt deleted file mode 100644 index fbcefd965dc4..000000000000 --- a/Documentation/devicetree/bindings/remoteproc/imx-rproc.txt +++ /dev/null @@ -1,33 +0,0 @@ -NXP iMX6SX/iMX7D Co-Processor Bindings ----------------------------------------- - -This binding provides support for ARM Cortex M4 Co-processor found on some -NXP iMX SoCs. - -Required properties: -- compatible Should be one of: - "fsl,imx7d-cm4" - "fsl,imx6sx-cm4" -- clocks Clock for co-processor (See: ../clock/clock-bindings.txt) -- syscon Phandle to syscon block which provide access to - System Reset Controller - -Optional properties: -- memory-region list of phandels to the reserved memory regions. - (See: ../reserved-memory/reserved-memory.txt) - -Example: - m4_reserved_sysmem1: cm4@80000000 { - reg = <0x80000000 0x80000>; - }; - - m4_reserved_sysmem2: cm4@81000000 { - reg = <0x81000000 0x80000>; - }; - - imx7d-cm4 { - compatible = "fsl,imx7d-cm4"; - memory-region = <&m4_reserved_sysmem1>, <&m4_reserved_sysmem2>; - syscon = <&src>; - clocks = <&clks IMX7D_ARM_M4_ROOT_CLK>; - }; From patchwork Tue Jan 19 07:35:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 366132 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp515730jam; Mon, 18 Jan 2021 23:50:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJx9s//4BSsSd/pus0Kf7rP8iSZMJRlRoiLF+a+9q1fFmxCr/JSy8Jct5GIwW13QnpcdamRP X-Received: by 2002:aa7:c7d8:: with SMTP id o24mr2473043eds.328.1611042606961; Mon, 18 Jan 2021 23:50:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611042606; cv=pass; d=google.com; s=arc-20160816; b=M6mSKzLcaNE5C3ov72F4THuBUcOErj+tO7WjASZa/V+iD5vahVBmqeMNJlqNvDl0aQ SEoejadCBXCjjM5SsqdycMnd4ALESKlwWY93lpe2vnRfsSGOTFUTKrmo3WWLL3SSOcJB r1mw7zyAqm8ANbllbU2wnE3wCUTCoPGr+Wdbj7AyQZ36E9OebLGzZnp6vlXRx5vDn0ay UabOv9HBXS4tJTxWINbnv53jnwpvBIIhBHyhCn3pONFQJ5hxHXQKiVd5waYx9Pvk6qIa WcT6Z70HPJqk35wjCKqGLc2YHIK+hbiUFw4vcENqwfiCJd6MkKqT16aAwHbGTObvYit0 JceA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=C2lJ32NApXPQJSBQSQTUo8FalMPB5GyWcrxu9zgUz0U=; b=NLW8/zWvkQJ/Svynh1ZTxZKdMfcdQa8nC3x0hIbIP1Bap9iJmcQTw7W5uhaliZzjix 4tCrnwBg8ZhQw6bq8WaXZGLtYkSacvPDQ64mo4RJ0dj/DDE25hNietequ9AT6Oma8APG yjeWEsKkh/bpo+MA1cqQ0KpYLNd59Kpdb+0QDoURuplfThKnuwsIlWJq84RcU+c1Sojc BBI0XQOJxlw2wEnsYP1fFw0hE9aLmXb5zhk8Wrb9MIVbqiAdRYzcLqjbYSaVta4I78pS WkKvqcVlgVBXu60n3SH0FbV/XzGKRS2LK3moNWRIJTD2t3mRxZ3VKNkkN4NEinUMykPO 90DQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=jghiAg8z; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t7si706017ejr.383.2021.01.18.23.50.06; Mon, 18 Jan 2021 23:50:06 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=jghiAg8z; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731481AbhASHs5 (ORCPT + 6 others); Tue, 19 Jan 2021 02:48:57 -0500 Received: from mail-eopbgr40046.outbound.protection.outlook.com ([40.107.4.46]:22240 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731361AbhASHra (ORCPT ); Tue, 19 Jan 2021 02:47:30 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=af+gTEmYrABdWPizFEbyfqLsMO0/yWD76NcCHBiZR7uW1dFseaYDm/j3QELRO2sMsyRaeWiJVTjw6rtKYFzNIXlmxyg8dqIIjjCLOKGczGVeZZpYKkdLNWNER7HnSDwTXdiiEtNHzVB/Qxo7Vu/zK+cLjDBLwFvUesuh/VyxGQveQV1fc2747YwafyQp9icKYARVSkInDrC0FrnNKBLNE9YZlGq1lAjEukXXanwJjfav1b+GP2F/7BPAXcuNOYfcTmkBrT+iv0fZynBbjqrkzhpa3dmR3jQ0MG68FUwZA0+uUTJIfF/DVQXGVlMvWZijt5OBqkUeYQFLR5iL9DPXGA== 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=C2lJ32NApXPQJSBQSQTUo8FalMPB5GyWcrxu9zgUz0U=; b=HIO2jPtk0Bb/TRqphUOb9dRZU2L4a7oER4par3s2k2LFxOVVQrWEKRUWT4I3GfcDELBKNk6nkUsSdCF78pVLA3XRtysQOMB1T6xDP08XqE/lPhJ1oXRKHmE4141WoXJH4bZoie1VYvXgHFzK8dbTwFXxx72AoosCHO7tNCehvT0Xv2POpOaPKQ3ZBoCHCBqA+y31oAbxJff40HecQLlJGO8eUmDxUcy84xVi8TDaM7HMM2V+fxkUuJ8JA8g2aiL3lOMUuCwVyVcB1qylF+MOBSfZ5VnQq24VUZge207zxTasrWIIgBEMgnrXN27xW+jPQsOfUW+POCwm5VXCnyhK/Q== 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=C2lJ32NApXPQJSBQSQTUo8FalMPB5GyWcrxu9zgUz0U=; b=jghiAg8zFaPKDV0jyENhxVS7cm9WFzpvB/uiYN5VvfqdpYUz4b6AFJjzIXH+gwIJOw79b/IRy+ayGCmyV5ElMdV7zGQ6LO4SLEj2ld74ZXdhNBar7GP5X1FL+8v+X2f4/4eND2l/hEyO7BPggt9TZsKzjoAI8uBbrdJ9JDdq8gs= 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 DB7PR04MB4492.eurprd04.prod.outlook.com (2603:10a6:5:39::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Tue, 19 Jan 2021 07:45:45 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3763.014; Tue, 19 Jan 2021 07:45:45 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, agross@kernel.org, patrice.chotard@st.com, Peng Fan Subject: [PATCH V8 02/10] dt-bindings: remoteproc: imx_rproc: add i.MX8MQ/M support Date: Tue, 19 Jan 2021 15:35:03 +0800 Message-Id: <1611041711-15902-3-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> References: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) 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 SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3763.9 via Frontend Transport; Tue, 19 Jan 2021 07:45:39 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 413ac416-e40d-4620-7ab9-08d8bc4e3ada X-MS-TrafficTypeDiagnostic: DB7PR04MB4492: 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: b7NI8TcAAz14730ocVVaqDdmk9Ub1scEmCHADQj1Ddm2YVvZcp+kQyrlX4lKevDgG+8mmNONYdu6UEagynMZYJmaMin4V8uGI/eeHUVBKUDEwQHPJi6dk/z7cBN9DcbS8QH/VHgjIUbFdyh9pqGMmeG68SifO/Xjt+NMXhMcB3IWrlt5kfAdJ19VJ3XZTFDwYEBMR4DGK5R7R+XAgd9aEHwmzDGAo6SEfOkPNxpezxbVCS+6Bs6n5jXnV2Wl5U3d3y/PUCzbsQq/CaWusMH3B2hL/6z5mf+5NmP+yx/Cm1Wo33JBt8hfEKt0X0bhyt1VScrw7OVLmMSIN2uqHzJciqS8iHht/SoHACrD7xaDw/bOBumi3CY5EwIVNtZNTM23jOf8leAKkAP0B9h4X6Gd/7sPlqDm+wSb1j9ywdZpz8IMAki1V7zIDDe3Q6208+hYYIKmp0eDJSp8Cq0HYK3c9w== 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)(5660300002)(2906002)(66476007)(26005)(69590400011)(4326008)(6666004)(66946007)(186003)(83380400001)(6486002)(6512007)(2616005)(86362001)(36756003)(52116002)(8676002)(6506007)(498600001)(7416002)(9686003)(16526019)(8936002)(66556008)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: HA3XfdKLaaLEUu4ycHB1BhHsQG6qJRsT4JgnV6C7u62n8lhSbkg0b7UGqaY5pZZ7rVNYC8DJNM0nthf4OU7HHawdvjbGLJrn9+AlIWCzLH1oM4E8eYtiXkPjmf9q8bT9Wk3EXoDaOp8Mci6rtRD9taYX9nuykaMewV9AY1VPTDRPLBF9dbTmmKfhblyJFD7Ev+leUudKsEA2pjZfzMApgSu69YHVvkQp5PuHJ6pziAj+PkNURvD/Y+5VH42sUV9jaW33hVes9HOrP2YD05ATKdBPzW3MtmRhn/sprZ+9lbB7tfTd3VdUPfgCJBk35+xX0zLPmP0E1Fvnalz6EJUUIbP8xvni5PRRA8e92VUb7Di5uvYT62JVzCkppSJu/bDVWU4Ggq4hIEmGEKtT2JsiFM04fp2w0RPi0R0jVtBUgPeLcj2AlKqpUstACG7+EeNSu4tDxodjFLf8KnvdkDAvBvjSakqve5gTcaofoAeD2ysp5AmoX9/zb6t/eVDOK0m+oXGyL9VlWiwWAq+eipApeSW1iFHMaZ0syKq19TyZeE9PYhJictML3Lcjr+RU6odhUhD29UCWwymaPI1Y1+gXZoPaF2fYm1n9RMaEalUi7GFDt4aytrC/0hLuMQUmbTY7/o1jedBpWTOZ4CwKu21MUzDGEFY2eaMQQMqc9UfgBHHC5za3IaSbDlZFczMJRwXI9+C/xX7/inr0j6liT9HbV20gTaOEP/MgoBGyiafsysbE5OmCcvg1sRpgtEF9HOjw/beCeFS4TIPuL5egO5sHjSiT7y0p8vA46PZl7XqSVvES6jDUQbN3OSKRqh3A0YoGveDxGQ0oCb7SUnjCIcwf+/5ycMLmQXzCyGzZxZ87jChABJ3cx+AaVfsr7Bf95Bd7QD5d4oAl+vHa13xN9ojo6VcZNCnA/rYp5Zht8atXUYUTPkEfq3ifO1bjSu1UCClml3ColzGTXts90WsZbx3uODH6PMHpq4SGl7kdVK6bVwWnaEqMubhLuXHVkNfq2o6G X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 413ac416-e40d-4620-7ab9-08d8bc4e3ada X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2021 07:45:45.6001 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SPn8fjM2xnoJHFYyDIyKLrS4/OtTQpx3G//o7VQOH6+aBx6o5uFPsIj1ekAb+Zu50K6EnrWZCQ8mgRl8Hy5o9Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4492 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan Add i.MX8MQ/M support, also include mailbox for rpmsg/virtio usage. Signed-off-by: Peng Fan --- .../bindings/remoteproc/fsl,imx-rproc.yaml | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml index bce6ccfe1538..b0d600baa161 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; + }; + + vdev0buffer: vdev0buffer@55400000 { + compatible = "shared-dma-pool"; + reg = <0x55400000 0x100000>; + no-map; + }; + + imx8mm-cm4 { + compatible = "fsl,imx8mm-cm4"; + clocks = <&clk IMX8MM_CLK_M4_DIV>; + mbox-names = "tx", "rx", "rxdb"; + mboxes = <&mu 0 1 + &mu 1 1 + &mu 3 1>; + memory-region = <&vdev0buffer>, <&vdev0vring0>, <&vdev0vring1>, <&rsc_table>; + syscon = <&src>; + }; ... From patchwork Tue Jan 19 07:35:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 366140 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp519353jam; Mon, 18 Jan 2021 23:56:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmrFj80BEWNkf6Ty1IXy/kmdAM+4/kncr8MHU3gJUj3LrFjhxhEbo/jgCibfXgY0DwRz51 X-Received: by 2002:a05:6402:1041:: with SMTP id e1mr2569462edu.54.1611043014516; Mon, 18 Jan 2021 23:56:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611043014; cv=pass; d=google.com; s=arc-20160816; b=bpNfQxqzRkhlLUsoTSZEjVeM2oi1yOC/X8REOubPrqoLE0eY2XQCgpdE5rOKo9NHbv TPsOyiwiuKGSFtQNKWg1TSaOtjiXklIUH3mhIzZIZQUTQ2+wQK1SKwiAW3u9Cx9qjvoK PTN400Xd2HATS/zVYx1cBQ1yuWGYB+uDhSyU2mwf7avzXStuCCR0XPkvR01ioANolnLG phod3YAUoIFahUgBlU/aLBGqR5ncuE8Bf2I+yMvn1Xrd9h/pBYhUJqn/MKAD5tOatmdN bOVRp9p902DZ3q2BxZ/g41pzPcmkMsfIMB5w5xk7HgY9nYWh2nT0H+S1mcx7BGy8ho5f BHhA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=yOyXY+Wu7yjAZykW6d3WzVozTOhNuNfY+00aYS59St4=; b=Sdkyq/oSvG4GMmeKaBybNsUT21eXK9OT5v0BUS52XVL5ceCZ4h8r1BRmdHco1KOvMC mombPortyD1trcI0s1pY8MVaPHfW6fMmORWrlrmdd2cWDjtDyLYIHUNMUCJbDwoS3w5D ah/Fm71sakQRMJURIAxXAnwCP5NwD456DiYwbltqToOQh+9pN1B6OxR8hGnrEb1cQSVx P84XqDIwuTvP3NW9xM5YMf9fZAWx59c8KKGqLOuL519abcyyqchmR+x420SIZq61MZj6 GVxWw2aw+aAs09ReZXK5tpw8G4/1BvZNa8F6t831v3m4pbGhO4+FcOmQjBQQLY/FhWj0 BTyg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=UGPY58lO; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b13si3127079eds.375.2021.01.18.23.56.54; Mon, 18 Jan 2021 23:56:54 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=UGPY58lO; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730611AbhASHy6 (ORCPT + 6 others); Tue, 19 Jan 2021 02:54:58 -0500 Received: from mail-eopbgr40048.outbound.protection.outlook.com ([40.107.4.48]:30438 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729993AbhASHrY (ORCPT ); Tue, 19 Jan 2021 02:47:24 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PaC6vI3hsDnbrAxTgm1JjMrRptUMbrs95PBuIp5B4La6PZDgc4mtUo0O+9BKFfHMO/DvL/8ZsLzAPsQNvYkumSfqWIi4PELv7C8gFS6HKg+pHXImAMfW4DKhEVcTibxoRAqF42oYra1o6VpPPt/OXXrNiLek1KhDV3iTeS+zmH+sOkXxyqHD9ews0++OiZZS3GblfUJmWCAmlg03WfacXLQaAYibxmeRSn1H+Xcl5gqSGOvb5ImyLldnxUtM1Dc3qRtzzkiLozEz87B7FhoV8zKmRL2+2cXHU+xN16wCctFxNwhZKGRcnxk7iQpm9qZfe5YaFpLs+E1Qn90A3DdIXQ== 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=CHtNs5usDgA6VijRtgGTPwqwffDqdEeXxO0K5xCmFy9B1wFj4LE4EYBt0J4UnZgjUlhMCIjpnej6WrnYVI41OZ8MK8N3uX3be2u6mIqixSgUPBQqJ8VHFb/UQ+PizELB60P0uRUbRXOtyeWsgELcf3oi11657ee7PFD9vUiTIwuYbw7jZTBw6VTDjOqyqaYQ0+sEMoXzyDNyYT3DqM0uv3AwXIERIjIbsiMY0AfwnamnMv5sGYyqkkCsbEgHrX8pGrSYWFisVgARdyXPT9l/+deNVC4Nn7efwFysCAOTtl8QPgDZA3LSWprLd/YXGE3twnd8D8a1+8T+xnV6J3wHeA== 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=UGPY58lONgM4T4r4BSsFVMgCmyLkPJ0Lt+H5YrpAUrkIe10GrDUdhKKzf00rMf54yNhgBF/17rCNHgdPjpF98gjYOxDvYxps+bl4d1jAK06BabhT68HnBp2UmqLVlj/S+R/61/00/glByWTbomP0x/UUn8xXYnupQnMwddT5sC4= 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 DB7PR04MB4492.eurprd04.prod.outlook.com (2603:10a6:5:39::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Tue, 19 Jan 2021 07:45:52 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3763.014; Tue, 19 Jan 2021 07:45:52 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, agross@kernel.org, patrice.chotard@st.com, Peng Fan Subject: [PATCH V8 03/10] remoteproc: introduce is_iomem to rproc_mem_entry Date: Tue, 19 Jan 2021 15:35:04 +0800 Message-Id: <1611041711-15902-4-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> References: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) 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 SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3763.9 via Frontend Transport; Tue, 19 Jan 2021 07:45:46 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 21214fa6-f2d0-4df2-7b65-08d8bc4e3e9d X-MS-TrafficTypeDiagnostic: DB7PR04MB4492: 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: tdju8JC4NWyYpQbBcCj7PxI+i057rRDjAMEAf/0xo3Sz1VWUxJ3PMzVwU9JHccnqBE9wGfgy7DSzZq114zbT4vNSl1Weog2m63p4DO7i4vF0DRBV/GhHwXADM0Mev+N0zL49HqRTSoYhl6AAIsNOrF2romMYqEDDhrhmQHBYNrmdex+1uwC3PXOk0UdfW1QCeW+g9src4QBmliHJxLW8TqcXeB8klCL2iciP/INd6rd3s+UAWV/sb411kmDqCYt3RUzlzzXQFHJVI8Ke3ptKOy/7VFym72znkF0oaKD9lXSIahPZv6BmQOJt85qx1mvmd/6M9MswJlJ5um1CeZhWqfzvUX//5k/GMLKH/tBoHKvTsItrpteFjiEQJIg+Tq8TvG7qS7mrA3tde6N13Nf1lkIiPPgX4204Uu4LTfM3xTgaKHvyDEptZvjdsEPzZydE/CRg3x9Yot+YbuqnbgvmVA== 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)(4744005)(5660300002)(2906002)(66476007)(26005)(69590400011)(4326008)(6666004)(66946007)(186003)(6486002)(6512007)(2616005)(86362001)(36756003)(52116002)(8676002)(6506007)(498600001)(7416002)(9686003)(16526019)(8936002)(66556008)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Fo1ZOjo9i06GzTxN2V7PTfdZ0+y+yrx0UZn+zEHir45JPH6t+Qs3FqyKAUmt83xz+iHtN4P3A5+VKO8K2+XQk5mMooGZsqP6f0mW9FH7vTSC5lgeFCVIaZy+seutgAUs9p75Y7tqwLFVPkQaNHC11Wr5U7+lZzkZ7xNaBO4RsNMuoIKtfl06CHqc4of9HoS20Hg2WZEwxyxVqZOGeYfbO9kxq9aea+pOGfJ4oy7DiLv3Xiv0gIIlguaUzzQKN12mCYT1YCDrJP8z0NAYisjgLusfMOj8cForjCUoBkSEJuNJNQ1xUK7NGDUMHNRUIacPQsLWex4dj8eMXSj5rQ+Py9GizxVfdQpE1DQ1IO/l+xSodHmYX5j1tuH4H8YsY8JxomQgT1iQ/2sWetD8NYqsC9Mhush96rhknxnWI2nw0mURFnZ26vejaDzV6Q+DJ8AEplo18mX/FZfFAXiJF+Puc2oSAfdd63Hh35Cek2BUu7Fk5MVebXwSpMEbaJk3HHyWZvdIrX1ziy9KWu3CpRtMhPfLUwbBWfYKLhY0kFgVT38ZrgvNItt/7AAMBtfZcLuqUyd5TIX5uzS0DezvrD8HVteUF0CW8AJ9y4JsIpQsAYyNFnnfcwBeBaO9Lrz5u7071i5d04TLNZ73a9ZRJBY0Y7yw8F3x8bJ54wYuVpsYWmh8yNNoFNnbZKETRRQ2v3uHhnOYaUsmRQmQrp6sOIUnkErPbcwOVFpqDNt7OKIIaShFHOhjmim8FG257zDnREVdLDGKi/iNDOJAUvD+MbSZeVByt0NLUFMUDWAqXt5ioORfB4ApyMp6fLAqFyuSa/8+FnODh+hXfU560hKgRlDudClo9AaasFHSRREThYDh0T34mAx5auQ3ZKhZUcaHHILg0Zzh3lJuGfjfLh5DjESNegjG0T7BAuNv3S6Fk7dA7zWfsnFWsPxsCu7mfez0vGu8oNwfy/AeZFyiSkajRt3bQcVh1Wy8tXP4aYz6UoxlHKmudKUpKkMLH3eA/lgw1ezW X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 21214fa6-f2d0-4df2-7b65-08d8bc4e3e9d X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2021 07:45:52.0072 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: L9CFu3Zl1WDEmS3kZlh7ja0Qb1obo0JiDTuh/oLTLgZejqf6G6a5+fr1KTneqM9t0v43gJent5kGNWOBDO8Klg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4492 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan Introduce is_iomem to indicate this piece memory is iomem or not. Reviewed-by: Bjorn Andersson Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier --- include/linux/remoteproc.h | 2 ++ 1 file changed, 2 insertions(+) -- 2.28.0 diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index f28ee75d1005..a5f6d2d9cde2 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -315,6 +315,7 @@ struct rproc; /** * struct rproc_mem_entry - memory entry descriptor * @va: virtual address + * @is_iomem: io memory * @dma: dma address * @len: length, in bytes * @da: device address @@ -329,6 +330,7 @@ struct rproc; */ struct rproc_mem_entry { void *va; + bool is_iomem; dma_addr_t dma; size_t len; u32 da; From patchwork Tue Jan 19 07:35:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 366133 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp515723jam; Mon, 18 Jan 2021 23:50:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJxY4roYKX6+z2gt9HOwvwZlRt9Sf17jOePL9V2VAM3k+e2a65HVdXMIKJqiSbMYkhvxW9SW X-Received: by 2002:a50:fc18:: with SMTP id i24mr2529210edr.308.1611042606607; Mon, 18 Jan 2021 23:50:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611042606; cv=pass; d=google.com; s=arc-20160816; b=tdK5DUcP4eCoQU7U3jnQwbLyRrH7KKICqCQVKVFNPTW25lvcJBXh/VMocTwFerybG5 2uyWYyFc3jpX5ysieMS+n/HdQ4RIzLTFEujQuYy67MCRu7ghFcLq2SGgYklCxtTqPzlr 3di+KZMLU5zeu85NkJfFQ/OW43YSEVB7Y5NUwu6Ou3F5DOpBUHg+94oP178p8+hMwoT3 IJGmqf+JLKLJ6E/QvEBqRcBDJXiubFw/y8/6wmM2XyqASjmMtOQH7D4i3lZ/E20bXXsg URtHuUCIa0ZG3yvkHqj3dNIMLv1Wa/V01ekEZ1dwxwkE6KnXqaB94h5ewf7Cuh6TCOWi AUiQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=fa48VS7cmiROA2onEOhrclcughxuxdqJL9kijwG9m3A=; b=vBcQs7HE+SnTvXNTYImGXPDE73LndaLGkvUTagyvwiHGEiYB0u9SMn7N877A8wKiHz vAESZyi+qltYD14ym1ETNhU7h1ZUAdcJNccT66LJQeWRNjomsYoWMF4K419UUPy9xXll niid0aaxVhRgdg21O+D/Pr2CxoEYzII5NC2NgxSoApbCL9CDVrFOjQtVSveTUgcdrAKv baqHSHZMvLIUPGsLZGmqcCJbko6g0XWywZz3sr6ZBE0KZ9aAEXRG0YbLdf3hFX7t9Dg0 IQu0HcHsm0t0HWQsWC2mSHZjueq8toOXPZXL1MPAPqapvysIEdPdegv8lmeRuGr135j0 kXGw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=Qqd26gPk; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t7si706017ejr.383.2021.01.18.23.50.06; Mon, 18 Jan 2021 23:50:06 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=Qqd26gPk; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726841AbhASHsx (ORCPT + 6 others); Tue, 19 Jan 2021 02:48:53 -0500 Received: from mail-eopbgr40080.outbound.protection.outlook.com ([40.107.4.80]:64958 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731380AbhASHrd (ORCPT ); Tue, 19 Jan 2021 02:47:33 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NtvNSqCcjOhpkI2qWhuRiEq8EJ1CcxSNg+PjvPpWFTerHPh1VNJE96X14YuwwAC3q9t0tbDGq0BHEbV7VKnTgJXh4GaGHEr0bbN2EphEyG2cYYzFZFvMMkGpJJq9UNhE6NCwKS3Rg+JkbnYMp8kuWkAJyxiWQ4SJz4TWWhLVTM+ovu3m96mfWMxvgFt222bHbPwR7bNA639ZlsfbjWSTx/DdNfFDoFUmjLIn7nnJ/bAnelpxuDLTlAeslojkjs1okby8E961/6w4BOMC5Hs+fCOvM5o3HY93pJeuWXRChSSx9Nw4/xGIOwnttDnAWndN3KL+yUBj34GrsQpGon7RXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fa48VS7cmiROA2onEOhrclcughxuxdqJL9kijwG9m3A=; b=MQMMM3VZJDYE8krFpcoaCbtt3U6lVsazCzxUICwtlgu4kFMn1XABAGI2de7hNH4Kh1/UbhomnDzS1pkEG3KvrA2LeBqotOWvCgA431wieV91hkpaefKyYMJNHW8mcykBGSwQIyVO7cqNPYfk8b+ZTGl68UkS4ssJbxlBtbblMDr5isJyoj/m9VMQ4G3T4qGH8h1wouk1W82e5jzavp7yttupytZ97ZO5exId7G0zlTlmB74w6VjBX/mwUpg9xlxc57Doswe8umM6DMxG45Yujk46Fq+wiqalYwg2ZHkfg6LJuF+EX/10228k7SP+sV0ph9WaRUJcUBhGnfk5JrDhnw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fa48VS7cmiROA2onEOhrclcughxuxdqJL9kijwG9m3A=; b=Qqd26gPkd5hiR8tNVerh2nXJeO4w1VuMzgOJNYR4qgr2vMf0AerROGehQXCyiSsBOXYPs06j5O0btVy4exAHA5pV8ONvoOxygImoRi8Rzkxk6C8zhw4A1/JJtSj+oanzDYVIIZjzgl4v38fbuoXLFu75vVU70MkbwdzdGxIx8iw= 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 DB7PR04MB4492.eurprd04.prod.outlook.com (2603:10a6:5:39::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Tue, 19 Jan 2021 07:45:58 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3763.014; Tue, 19 Jan 2021 07:45:58 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, agross@kernel.org, patrice.chotard@st.com, Peng Fan Subject: [PATCH V8 04/10] remoteproc: add is_iomem to da_to_va Date: Tue, 19 Jan 2021 15:35:05 +0800 Message-Id: <1611041711-15902-5-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> References: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) 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 SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3763.9 via Frontend Transport; Tue, 19 Jan 2021 07:45:52 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 79e5d094-f551-429a-d241-08d8bc4e426e X-MS-TrafficTypeDiagnostic: DB7PR04MB4492: 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: WpoxA2KPXtrnUGZQThWUK0PGJjPdcmtPy7x+LBFlNBL8nS9o6Lk8QeSek7QGwKDveE4F3vXohx8hPPHRt1Fnf1f32ZBXzaH1Kb16Ws9ctoIio8ORciHKPAKFMjI32KfIGPaeyrbYQpyOvuYncZOpbdx5+wOb5zDQ2Wf/MIDUCKpidLhLG7dtgShdju7AId/EKfGL7dZ8i8z3yLBhuW/jxjooOSGP7PUhkqBQqF38P0q/GTzP5LEd80P5/BqY0wRyy2OzoB6d0MpPh1UHSDzbluaDBhd5oh1W2wxar7HLiOYL818XWGhks98wEkQheDWbHm1ckUzzCR0QLRKj76Yf1anq+Hxi0b4jj5uJ032vLzK2oyzPjsmHfjES+cYnC5QAsBTkcO6msFzl4rrNd7g2DAIEQZCI+EDoof9sa2qPVmIy7pj0nXYH3NTu82JshAofaK1wLjtMDHXwt0PXSFnlDg== 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)(30864003)(5660300002)(2906002)(66476007)(26005)(69590400011)(4326008)(6666004)(66946007)(186003)(83380400001)(6486002)(6512007)(2616005)(86362001)(36756003)(52116002)(8676002)(6506007)(498600001)(7416002)(9686003)(16526019)(8936002)(66556008)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: EqdQ7K8a4z13bYl4a6pwR2zO6hrjZdhwzYNOVvN/FFpJPTLZm4MWOGcBVtaN2dym/dkCMmm6J9y6Rx5unGWnvw0TsffXVKye8wYnWWtlBwJ9f6uOXDT8RCbOanStAe+1z8O4ST5hYUeMn5N3hX4bUjPSE2fWoD7LMRlwt9JKKrYV4IbajM9gnUW0UlaIOM5NBYColiaW5ZhQE2Lm3Vj7dTjsAmjwQ6kdgkvrH4dVbfa+9xbmmzcg2cJ6DicEhyAKKY2doSjJWWZ2m1MvdX2un0vfjZsDyv1aCTHs5T97NB1E3A1EdUXubxyqgOCdIfoS4RwoBRnz1bHdGl5B38855PVkJl/4Wp04+PogSwt/IJ1N3IYsEkuITh5eDowAxGaufXZgW8CuR9X8Mquug5q6VMd/U84MxvFFGAOd76NueT1HAj0kxdBeQmlFWo1pqWtaLp89WMXmoW7y/S3ToRJm9qNgXfSCkLzl4S3/jXQ7U1US22CuA01ok2RGHWGHYdoJE9sR2rcn3/+eOZqwOO0hqVJR2sHUY6+BqDS5juliKQ+M22ANFRO8A2LQg465KJJufl3EkBDV5VvuLhy/bBQDEOk2ZD8SiRRSTwT/pJT7/pRcOX9hw3nItebrITdjtggFwxGvxTVIU/xr5nb52eMy884IYXe2RXzIpUoWL1jd6zjISpFHGMpavdMsdf9k0qIWaPGsfeaUmbERWbp8TrQUCENyNjDIfAmPoXY+CjZC/0AyrSCVj0vAGIE1BrPT9XwEf+/ucu6syVY5cvtq0u2eAuRQjWU09jaKCwJhTz8a8SlEbj8OfDZz3Ye8mg5O5WtQTsoH7TplHKX3FeHo084ob/MWduSEYTCaLCR5V/TWNrKXkJshHYYh6XQVeIXwFvBg1xINaMs8ruHkmw+DwjVePURWilJ3NHkWL3yeD9AvYUXUy4SFpWH7YPDetJscHSBxahxgiDDLqcyzZEX7oJ4CjL2f4tZIArLIjH9BoW5cun4F1OtdyRy3gqalMQGXKomL X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 79e5d094-f551-429a-d241-08d8bc4e426e X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2021 07:45:58.6792 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5+wEP6X8QtYNZOa9kXr53U9Zomp9PB++rObGWUHl00doXJ7KM0yN9ojVv2mzyYZJdqoWgch7InMlRWb4DhXjBg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4492 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan Introduce an extra parameter is_iomem to da_to_va, then the caller could take the memory as normal memory or io mapped memory. Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Reported-by: kernel test robot Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 2 +- drivers/remoteproc/ingenic_rproc.c | 2 +- drivers/remoteproc/keystone_remoteproc.c | 2 +- drivers/remoteproc/mtk_scp.c | 6 +++--- drivers/remoteproc/omap_remoteproc.c | 2 +- drivers/remoteproc/pru_rproc.c | 2 +- drivers/remoteproc/qcom_q6v5_adsp.c | 2 +- drivers/remoteproc/qcom_q6v5_pas.c | 2 +- drivers/remoteproc/qcom_q6v5_wcss.c | 2 +- drivers/remoteproc/qcom_wcnss.c | 2 +- drivers/remoteproc/remoteproc_core.c | 7 +++++-- drivers/remoteproc/remoteproc_coredump.c | 8 ++++++-- drivers/remoteproc/remoteproc_debugfs.c | 2 +- drivers/remoteproc/remoteproc_elf_loader.c | 21 +++++++++++++++------ drivers/remoteproc/remoteproc_internal.h | 2 +- drivers/remoteproc/st_slim_rproc.c | 2 +- drivers/remoteproc/ti_k3_dsp_remoteproc.c | 2 +- drivers/remoteproc/ti_k3_r5_remoteproc.c | 2 +- drivers/remoteproc/wkup_m3_rproc.c | 2 +- include/linux/remoteproc.h | 2 +- 20 files changed, 45 insertions(+), 29 deletions(-) -- 2.28.0 diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 8957ed271d20..6603e00bb6f4 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -208,7 +208,7 @@ static int imx_rproc_da_to_sys(struct imx_rproc *priv, u64 da, return -ENOENT; } -static void *imx_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *imx_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct imx_rproc *priv = rproc->priv; void *va = NULL; diff --git a/drivers/remoteproc/ingenic_rproc.c b/drivers/remoteproc/ingenic_rproc.c index 26e19e6143b7..bb5049295576 100644 --- a/drivers/remoteproc/ingenic_rproc.c +++ b/drivers/remoteproc/ingenic_rproc.c @@ -116,7 +116,7 @@ static void ingenic_rproc_kick(struct rproc *rproc, int vqid) writel(vqid, vpu->aux_base + REG_CORE_MSG); } -static void *ingenic_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *ingenic_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct vpu *vpu = rproc->priv; void __iomem *va = NULL; diff --git a/drivers/remoteproc/keystone_remoteproc.c b/drivers/remoteproc/keystone_remoteproc.c index cd266163a65f..54781f553f4e 100644 --- a/drivers/remoteproc/keystone_remoteproc.c +++ b/drivers/remoteproc/keystone_remoteproc.c @@ -246,7 +246,7 @@ static void keystone_rproc_kick(struct rproc *rproc, int vqid) * can be used either by the remoteproc core for loading (when using kernel * remoteproc loader), or by any rpmsg bus drivers. */ -static void *keystone_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *keystone_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct keystone_rproc *ksproc = rproc->priv; void __iomem *va = NULL; diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c index e0c235690361..535175f013e4 100644 --- a/drivers/remoteproc/mtk_scp.c +++ b/drivers/remoteproc/mtk_scp.c @@ -270,7 +270,7 @@ static int scp_elf_load_segments(struct rproc *rproc, const struct firmware *fw) } /* grab the kernel address for this device address */ - ptr = (void __iomem *)rproc_da_to_va(rproc, da, memsz); + ptr = (void __iomem *)rproc_da_to_va(rproc, da, memsz, NULL); if (!ptr) { dev_err(dev, "bad phdr da 0x%x mem 0x%x\n", da, memsz); ret = -EINVAL; @@ -458,7 +458,7 @@ static int scp_start(struct rproc *rproc) return ret; } -static void *scp_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *scp_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct mtk_scp *scp = (struct mtk_scp *)rproc->priv; int offset; @@ -587,7 +587,7 @@ void *scp_mapping_dm_addr(struct mtk_scp *scp, u32 mem_addr) { void *ptr; - ptr = scp_da_to_va(scp->rproc, mem_addr, 0); + ptr = scp_da_to_va(scp->rproc, mem_addr, 0, NULL); if (!ptr) return ERR_PTR(-EINVAL); diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c index d94b7391bf9d..43531caa1959 100644 --- a/drivers/remoteproc/omap_remoteproc.c +++ b/drivers/remoteproc/omap_remoteproc.c @@ -728,7 +728,7 @@ static int omap_rproc_stop(struct rproc *rproc) * Return: translated virtual address in kernel memory space on success, * or NULL on failure. */ -static void *omap_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *omap_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct omap_rproc *oproc = rproc->priv; int i; diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c index 5fad787ba012..8df99318f18a 100644 --- a/drivers/remoteproc/pru_rproc.c +++ b/drivers/remoteproc/pru_rproc.c @@ -483,7 +483,7 @@ static void *pru_i_da_to_va(struct pru_rproc *pru, u32 da, size_t len) * core for any PRU client drivers. The PRU Instruction RAM access is restricted * only to the PRU loader code. */ -static void *pru_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *pru_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct pru_rproc *pru = rproc->priv; diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c index e02450225e4a..8b0d8bbacd2e 100644 --- a/drivers/remoteproc/qcom_q6v5_adsp.c +++ b/drivers/remoteproc/qcom_q6v5_adsp.c @@ -281,7 +281,7 @@ static int adsp_stop(struct rproc *rproc) return ret; } -static void *adsp_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *adsp_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv; int offset; diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index ee586226e438..333a1e389fcd 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -242,7 +242,7 @@ static int adsp_stop(struct rproc *rproc) return ret; } -static void *adsp_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *adsp_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv; int offset; diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c b/drivers/remoteproc/qcom_q6v5_wcss.c index 78ebe1168b33..704cd63c9af4 100644 --- a/drivers/remoteproc/qcom_q6v5_wcss.c +++ b/drivers/remoteproc/qcom_q6v5_wcss.c @@ -410,7 +410,7 @@ static int q6v5_wcss_stop(struct rproc *rproc) return 0; } -static void *q6v5_wcss_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *q6v5_wcss_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct q6v5_wcss *wcss = rproc->priv; int offset; diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c index f95854255c70..1bf60dc84f69 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -320,7 +320,7 @@ static int wcnss_stop(struct rproc *rproc) return ret; } -static void *wcnss_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *wcnss_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct qcom_wcnss *wcnss = (struct qcom_wcnss *)rproc->priv; int offset; diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 2394eef383e3..9bec422ccce3 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -189,13 +189,13 @@ EXPORT_SYMBOL(rproc_va_to_pa); * here the output of the DMA API for the carveouts, which should be more * correct. */ -void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct rproc_mem_entry *carveout; void *ptr = NULL; if (rproc->ops->da_to_va) { - ptr = rproc->ops->da_to_va(rproc, da, len); + ptr = rproc->ops->da_to_va(rproc, da, len, is_iomem); if (ptr) goto out; } @@ -217,6 +217,9 @@ void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) ptr = carveout->va + offset; + if (is_iomem) + *is_iomem = carveout->is_iomem; + break; } diff --git a/drivers/remoteproc/remoteproc_coredump.c b/drivers/remoteproc/remoteproc_coredump.c index 81ec154a6a5e..aee657cc08c6 100644 --- a/drivers/remoteproc/remoteproc_coredump.c +++ b/drivers/remoteproc/remoteproc_coredump.c @@ -153,18 +153,22 @@ static void rproc_copy_segment(struct rproc *rproc, void *dest, size_t offset, size_t size) { void *ptr; + bool is_iomem; if (segment->dump) { segment->dump(rproc, segment, dest, offset, size); } else { - ptr = rproc_da_to_va(rproc, segment->da + offset, size); + ptr = rproc_da_to_va(rproc, segment->da + offset, size, &is_iomem); if (!ptr) { dev_err(&rproc->dev, "invalid copy request for segment %pad with offset %zu and size %zu)\n", &segment->da, offset, size); memset(dest, 0xff, size); } else { - memcpy(dest, ptr, size); + if (is_iomem) + memcpy_fromio(dest, ptr, size); + else + memcpy(dest, ptr, size); } } } diff --git a/drivers/remoteproc/remoteproc_debugfs.c b/drivers/remoteproc/remoteproc_debugfs.c index 7e5845376e9f..b5a1e3b697d9 100644 --- a/drivers/remoteproc/remoteproc_debugfs.c +++ b/drivers/remoteproc/remoteproc_debugfs.c @@ -132,7 +132,7 @@ static ssize_t rproc_trace_read(struct file *filp, char __user *userbuf, char buf[100]; int len; - va = rproc_da_to_va(data->rproc, trace->da, trace->len); + va = rproc_da_to_va(data->rproc, trace->da, trace->len, NULL); if (!va) { len = scnprintf(buf, sizeof(buf), "Trace %s not available\n", diff --git a/drivers/remoteproc/remoteproc_elf_loader.c b/drivers/remoteproc/remoteproc_elf_loader.c index df68d87752e4..11423588965a 100644 --- a/drivers/remoteproc/remoteproc_elf_loader.c +++ b/drivers/remoteproc/remoteproc_elf_loader.c @@ -175,6 +175,7 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) u64 offset = elf_phdr_get_p_offset(class, phdr); u32 type = elf_phdr_get_p_type(class, phdr); void *ptr; + bool is_iomem; if (type != PT_LOAD) continue; @@ -204,7 +205,7 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) } /* grab the kernel address for this device address */ - ptr = rproc_da_to_va(rproc, da, memsz); + ptr = rproc_da_to_va(rproc, da, memsz, &is_iomem); if (!ptr) { dev_err(dev, "bad phdr da 0x%llx mem 0x%llx\n", da, memsz); @@ -213,8 +214,12 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) } /* put the segment where the remote processor expects it */ - if (filesz) - memcpy(ptr, elf_data + offset, filesz); + if (filesz) { + if (is_iomem) + memcpy_fromio(ptr, (void __iomem *)(elf_data + offset), filesz); + else + memcpy(ptr, elf_data + offset, filesz); + } /* * Zero out remaining memory for this segment. @@ -223,8 +228,12 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) * did this for us. albeit harmless, we may consider removing * this. */ - if (memsz > filesz) - memset(ptr + filesz, 0, memsz - filesz); + if (memsz > filesz) { + if (is_iomem) + memset_io((void __iomem *)(ptr + filesz), 0, memsz - filesz); + else + memset(ptr + filesz, 0, memsz - filesz); + } } return ret; @@ -377,6 +386,6 @@ struct resource_table *rproc_elf_find_loaded_rsc_table(struct rproc *rproc, return NULL; } - return rproc_da_to_va(rproc, sh_addr, sh_size); + return rproc_da_to_va(rproc, sh_addr, sh_size, NULL); } EXPORT_SYMBOL(rproc_elf_find_loaded_rsc_table); diff --git a/drivers/remoteproc/remoteproc_internal.h b/drivers/remoteproc/remoteproc_internal.h index c34002888d2c..9ea37aa687d2 100644 --- a/drivers/remoteproc/remoteproc_internal.h +++ b/drivers/remoteproc/remoteproc_internal.h @@ -84,7 +84,7 @@ static inline void rproc_char_device_remove(struct rproc *rproc) void rproc_free_vring(struct rproc_vring *rvring); int rproc_alloc_vring(struct rproc_vdev *rvdev, int i); -void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len); +void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem); phys_addr_t rproc_va_to_pa(void *cpu_addr); int rproc_trigger_recovery(struct rproc *rproc); diff --git a/drivers/remoteproc/st_slim_rproc.c b/drivers/remoteproc/st_slim_rproc.c index 09bcb4d8b9e0..22096adc1ad3 100644 --- a/drivers/remoteproc/st_slim_rproc.c +++ b/drivers/remoteproc/st_slim_rproc.c @@ -174,7 +174,7 @@ static int slim_rproc_stop(struct rproc *rproc) return 0; } -static void *slim_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *slim_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct st_slim_rproc *slim_rproc = rproc->priv; void *va = NULL; diff --git a/drivers/remoteproc/ti_k3_dsp_remoteproc.c b/drivers/remoteproc/ti_k3_dsp_remoteproc.c index 863c0214e0a8..fd4eb67a6681 100644 --- a/drivers/remoteproc/ti_k3_dsp_remoteproc.c +++ b/drivers/remoteproc/ti_k3_dsp_remoteproc.c @@ -354,7 +354,7 @@ static int k3_dsp_rproc_stop(struct rproc *rproc) * can be used either by the remoteproc core for loading (when using kernel * remoteproc loader), or by any rpmsg bus drivers. */ -static void *k3_dsp_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *k3_dsp_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct k3_dsp_rproc *kproc = rproc->priv; void __iomem *va = NULL; diff --git a/drivers/remoteproc/ti_k3_r5_remoteproc.c b/drivers/remoteproc/ti_k3_r5_remoteproc.c index 62b5a4c29456..5cf8d030a1f0 100644 --- a/drivers/remoteproc/ti_k3_r5_remoteproc.c +++ b/drivers/remoteproc/ti_k3_r5_remoteproc.c @@ -590,7 +590,7 @@ static int k3_r5_rproc_stop(struct rproc *rproc) * present in a DSP or IPU device). The translated addresses can be used * either by the remoteproc core for loading, or by any rpmsg bus drivers. */ -static void *k3_r5_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *k3_r5_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct k3_r5_rproc *kproc = rproc->priv; struct k3_r5_core *core = kproc->core; diff --git a/drivers/remoteproc/wkup_m3_rproc.c b/drivers/remoteproc/wkup_m3_rproc.c index 92d387dfc03b..484f7605823e 100644 --- a/drivers/remoteproc/wkup_m3_rproc.c +++ b/drivers/remoteproc/wkup_m3_rproc.c @@ -89,7 +89,7 @@ static int wkup_m3_rproc_stop(struct rproc *rproc) return error; } -static void *wkup_m3_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *wkup_m3_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct wkup_m3_rproc *wkupm3 = rproc->priv; void *va = NULL; diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index a5f6d2d9cde2..1b7d56c7a453 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -386,7 +386,7 @@ struct rproc_ops { int (*stop)(struct rproc *rproc); int (*attach)(struct rproc *rproc); void (*kick)(struct rproc *rproc, int vqid); - void * (*da_to_va)(struct rproc *rproc, u64 da, size_t len); + void * (*da_to_va)(struct rproc *rproc, u64 da, size_t len, bool *is_iomem); int (*parse_fw)(struct rproc *rproc, const struct firmware *fw); int (*handle_rsc)(struct rproc *rproc, u32 rsc_type, void *rsc, int offset, int avail); From patchwork Tue Jan 19 07:35:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 366134 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp515758jam; Mon, 18 Jan 2021 23:50:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJxVoBd29+FKffTdYkA5F+mSQmBiVhz/SwpmO1A4E3Y20sH/SVu2RPy7MvcWCvV2cNAXygNQ X-Received: by 2002:a17:906:ae42:: with SMTP id lf2mr2051637ejb.487.1611042609642; Mon, 18 Jan 2021 23:50:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611042609; cv=pass; d=google.com; s=arc-20160816; b=QwkUtI+KmUbnTX4bipyj+ECDt0UwYtcsw8Vlras25nW/4RZRipqHyBdnYBgGS9Tq8k bW3EynnOpwp6FSlx9unvWX4+FGQuy4aqbrjmn6xuyV9DT3fAQkJjTF94bQoVv3wG3n5V ZqF3N0ETsxHxlqfW6Pd/jv2RghO8CWKJy94rOSkQTmhXF/TNVkrYVSqCjhc6SuI5sIeI pcVFdB5H9gs23sRGUZuYu8bbdFth628FjIeLVbO2QKjdUF4lSe0r+c/Se7+HjXi+voO5 vy5nuV4qB5JgLlOyafabVcaWXzx6jfZNaPqLLlW37OZ7RnFPfJ6oaxdiTaCt1zjcNN+w 10gg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=XJxrdlT8+OTygEs/swp/bhTTRjULeT1DvjELEua7HdU=; b=MEfRfBF3Jxtv//5ivWRvAiEygoP/F0FRUEaz4XKj7X3d2Xl/umhPi+/4zL6vlEm0cS euSyLYBGY4V9bpXIKY0sA4kpsAE8Z2LWYOuYhq7t40iyNvNIttK4qq+gm0/E9C4vyrfI G4qrQnBUpx+51anEs3O9//CSC7dgN0psf/aeYl0k7D8zJbJR9LogNMcL8tIcJDLdPGrn HZH6qGIV+BbckcUiNc4AfjtBum+T+F/MuUDF0Z6EX04kVtW+KQepqExZNMS9ykNh4LSC 2SL8cpr37dqzJKcgzdv/5eE8+s5V4y7CXp71/um5iSqMt7+lo3cDXXgsgtXUxhAAKTYO 0LbQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b="UfOex8/4"; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t7si706017ejr.383.2021.01.18.23.50.09; Mon, 18 Jan 2021 23:50:09 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b="UfOex8/4"; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729440AbhASHty (ORCPT + 6 others); Tue, 19 Jan 2021 02:49:54 -0500 Received: from mail-eopbgr40080.outbound.protection.outlook.com ([40.107.4.80]:37961 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730703AbhASHs3 (ORCPT ); Tue, 19 Jan 2021 02:48:29 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=loAr89xrVGdeobDGsqqPGTj8gB3jScuGF40b2scN+JA+HNx3qG9ejEY3yumpG+7blr49sRJl09syUSgmzwkBcWg9vec+gndnq5DdUSVbWf0jwBGnmuLHrza17I0b5ZHmabDRImiSmyBbYzzEZkwj3HGbzcLIlBEfGkcb0GOM088wGBN486CBM8Hh52hDmZ4A1L9DOAfmpMtEAa4LLBOvtTFamDSXAfAU+LVeliiNHlDltpt6eZLJ5Yp1TJw2Vra12ZYvzNdwBvZfOS+0m9w71zZtUcGK65x5iwNLVGggPtyRwcB+Wy4QGG+GXm31jM/qWc8ZmcKqP3ymzSUeLCDoKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XJxrdlT8+OTygEs/swp/bhTTRjULeT1DvjELEua7HdU=; b=Mv/OU+ryN27I1fmvL/nAf4HdgWsNG0WJs+mrYanKFwuzXnf+E2vpGvgnhfSHt+04YJyWDHajMsIDRj3tcdFhsPQqHOgWLmt9BavlAm+zxuNOfTDvSiofnf/wK2NjtnOze99PV0IiYYlUdzNjqNB3baPMTZw51902j9xUBhHz96DVFOz1btlAVNTy4qcV+shpAJTpe3M+6PhmzNf/Tgm4ngfoXgguORjazCt11HaFcdaqekt2P9Y3s82M5LLjYkB/Ge7CLRmXiOAqxGllj95tm1T2qjRTVU+kxrE7e64vypTw+Qn+MW9wp0t2839ExTubwnLqnYIxmMugm2Dm6EYs7A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XJxrdlT8+OTygEs/swp/bhTTRjULeT1DvjELEua7HdU=; b=UfOex8/4VGhqi4bjSN3xmNcMGENB6d1yDOA5p10pYhbg5X/A4JPkWsN1zL2HIhxIzLTD+J5+/yuU+7anmVSWpu7qEvTm2mcItoVXYfe31pTmeGh78dtctYfyokxB8GYpT3w7QY7xdUaPDeLv7yklGuLY0LLUoLyxgUZVSYUMjdc= 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 DB7PR04MB4492.eurprd04.prod.outlook.com (2603:10a6:5:39::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Tue, 19 Jan 2021 07:46:04 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3763.014; Tue, 19 Jan 2021 07:46:04 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, agross@kernel.org, patrice.chotard@st.com, Peng Fan Subject: [PATCH V8 05/10] remoteproc: imx_rproc: correct err message Date: Tue, 19 Jan 2021 15:35:06 +0800 Message-Id: <1611041711-15902-6-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> References: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) 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 SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3763.9 via Frontend Transport; Tue, 19 Jan 2021 07:45:59 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: af49b0d0-fd32-47da-f646-08d8bc4e4621 X-MS-TrafficTypeDiagnostic: DB7PR04MB4492: 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: aVyddXkt2wi2qjxrPG3O8Acn7Lq6KCUWB/9sAvEZJlItZb0hgHOf2Bb8y3HlY24FvfLY1KtXueTRjju7QZzZR1JfhovpkJh4OcLMTDM8qAzOUVXABe1fbXWXM86qxjf3aGRE3bNuk8I+0pOHiJ/xrh/SCtdUKvWBTUnOD0DQtL5NrdLWSflutfVFukPoDfjHrRufs482cj190vTMzMDz4VddtVlC3jzke2s35p8E4w7D3txeaG5EjV+pM8uB1fyBCWNLdeJHt/vZRp67lcE7rvt4Vw811TOZBDFErYKw4nEFzv2Q0OO9BgYXRK5h03h6/kP0K2cTaSarA5w5sykAIdgpzztFVbLOpKqTOFutvIj1ER0kM3+os00Ay56v8ZvXc525/24aDgjBOdkQDDwsAU2FRkrnRIOdekFGCdrWWrkd3EYsXrjXnlLHQ6azA2Y/Mxo/QXctbwt+AenDFJtL5w== 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)(5660300002)(2906002)(66476007)(26005)(69590400011)(4326008)(15650500001)(6666004)(66946007)(186003)(83380400001)(6486002)(6512007)(2616005)(86362001)(36756003)(52116002)(8676002)(6506007)(498600001)(7416002)(9686003)(16526019)(8936002)(66556008)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: OArc/0CIHLsBEFJZDSzNRRgueviS/BCBsn4esCAObp2cyhRcpKcQfsS01MLPPqXjpQDnhjwq+qkWaxMBzcWq3jqS2rbEoWn4MtIY2MBHrruWHr6n+7VDGiUgDRQQi9tVcX2kG3KPxbwaDnWf09B34MYb0JsAjjk4mACaNW80LBslOzypDAH1GUs3qVyqRWnLfwhIytiOHXemzA6hHtFSbI1kfwyzJ/RyyaStJYXDBCZGCr8UrgCoouaRaMrXnjNsL3EoqoqNr01Rnh0Hn7W0CZteDRIjLvioD/cBsTRon9IIa0JSsNafRBljdw5FD9MhW0Rlaouaoslw1lVXO83yAAclKSd+Y3N75Xpm8+rM2xGq5Ju1cKsvYHVcI0n+rg6JZFPZiib+sL7/osEVhSEUQr1nUBFfJ7Q7KzrYXAYBEjf6GPCtLZv41bXu1u7/6Pnn/LfojkECnn66V5Ganrp2gLKFBZOXeqenPiTrEFCBmwNCtC6jGGmJXkhQnIzMi84g/j20suYmPmnW2AtLtY4sLVt309hmNmoAgcLJFdrep7TnwpebnqwiL1kP86bT/Vmy7Wnvff52SxPaIhoneKRGiuzNcDk4Q+VnmKWigm88fj8N7M78vr2cpwOUG5aSM5c1ipOoeIV+J5HiKebkedVtUDHissctRByESs73pG4hMzg0bAMh+hJXiBULLC0cdhA/62HM3v6KJQEgMV/euFFZonkzNXa5ij2cxJSHe0f5alphPVaWDbNlDf8iXaShGIQxTa9lBO9Z2FC1Y1EQFvd9bvWJ6XmeaJUT2wI1AWdsXgs1ZdXdZivb6YKnao174JOE2sebwz+jiVG6t0FRo+a+JSHygkbsMrhHyC3BAFE3p413XnG0enT0qZNhNXUXYQiRjYSRJHOO2AEg01POCmub/LtDdw4qMdEN/jnBZVDKAXMqF8MPHBVnWLoftfyR4+rYQw2FNU007jsqahS1GSdEkCpN1W5S+ieFnST56w7+wDpGRINxHm0QyzOCMNnothP0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: af49b0d0-fd32-47da-f646-08d8bc4e4621 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2021 07:46:04.6055 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: uok1tZiEN26MK0+uuKuV1Mmw2DZ1I8Y1BDQWLbaCrFPkZkKkCv3iUlI4Y6QcptSqcoBkY2HRFu4aQb7/Ba8tqg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4492 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan It is using devm_ioremap, so not devm_ioremap_resource. Correct the error message and print out sa/size. Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.28.0 diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 6603e00bb6f4..2a093cea4997 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -268,7 +268,7 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, priv->mem[b].cpu_addr = devm_ioremap(&pdev->dev, att->sa, att->size); if (!priv->mem[b].cpu_addr) { - dev_err(dev, "devm_ioremap_resource failed\n"); + dev_err(dev, "failed to remap %#x bytes from %#x\n", att->size, att->sa); return -ENOMEM; } priv->mem[b].sys_addr = att->sa; @@ -298,7 +298,7 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, priv->mem[b].cpu_addr = devm_ioremap_resource(&pdev->dev, &res); if (IS_ERR(priv->mem[b].cpu_addr)) { - dev_err(dev, "devm_ioremap_resource failed\n"); + dev_err(dev, "failed to remap %pr\n", &res); err = PTR_ERR(priv->mem[b].cpu_addr); return err; } From patchwork Tue Jan 19 07:35:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 366139 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp517416jam; Mon, 18 Jan 2021 23:53:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5ZXptdGJtP/EjzmVEhNMVl2GJXV4RMICR+A5T+0Di4o/U0SuAYwFQ9gBx1IP3Xw8uQmLp X-Received: by 2002:a50:fd19:: with SMTP id i25mr2210043eds.386.1611042818021; Mon, 18 Jan 2021 23:53:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611042818; cv=pass; d=google.com; s=arc-20160816; b=BEH5/Vemsj6oYpBvQCQKb2zVavNBHJoa7Mo/6Z2hNbHI2FWmGt/U3fzOw/iXCVG/R+ ETizCeD50UR09NPl1brhE3py1KJNJyEBubKaDbACp9j4xOUhdfmOABRI2qzlkWqNpiwp G6qKHn0/vi8VE9vZoGzDRnjMsLgZBpSZCIXVWT9Qa33fldwAMOwth2ys5g83BGXfR+cO OnigFr6pQARkU1ckPWtYuPIXhU7AwDsq57u82F9Jj+RqbBcJOM82Ti8j7f0T2oYi+5O3 8B8Xhe8AyMQxXbjaPdRySnpdndXPIf91B0EpbEMlfvcYvUXU17pAPbTxdeNpp/VnFC2I qudw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=NrM/10lxX+u8ygpoSj3Cn75qK7g8pM1NhQgG/rAaoNk=; b=DX3bIumvlP8w50WFWrdJ5JNRE2VuVth/v0rMXw3E8+ZBGWxk1ZQpmM38FovmWSUQVT xEJ1YtSX7MTlZSrL+6FkhrBgBRKUnb3t6yy9ivQyVkw2fsgUAusUUIjpzJJideKfkcVf aivg+6kf9i82easlDUOXoRySd1RtPRgxgtm1SmTx4VtLOFGTX+bz9+IKiTxXuUrRQg/t 4/aZvldV9PDe4vigZ2Ien4t1PPCRyAZk3+VP5WmEWydjUW+ATRoxSQPitAima0uIlvIg 8qAx6nGa0iVnXFna9Yvgk5H+VX3PVEKxMG1/9lcs+LgNs770fayyWHkCVQ3DswCrgaPk FaQQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b="M1+Z/7Tk"; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v1si3167966ejj.430.2021.01.18.23.53.37; Mon, 18 Jan 2021 23:53:38 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b="M1+Z/7Tk"; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731347AbhASHxc (ORCPT + 6 others); Tue, 19 Jan 2021 02:53:32 -0500 Received: from mail-eopbgr40048.outbound.protection.outlook.com ([40.107.4.48]:30438 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731464AbhASHsa (ORCPT ); Tue, 19 Jan 2021 02:48:30 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jEUC/Al0Q+OmeGLRmclRmnMWrHA5r/GdudB5pRuipgg70QeYVXrEguQ1URLlAkjX8/o8W1YK0oBu2ajIRIKwlHiQZExe9Sv/seWclKo96Kbu34gPbRPByZfvAwJQ54HfGOk54CYCddzLMlVQoNKm90ZIXspkReZu8glVg6gTQPdPZTPQdCswyvGrHeV8tO5XoyZ1Q8ogc1VzpU2LevWPLMT49ZS+djpoMp4PgHJyFzVFJKmb3GcFQD78N5/5ZweZt1PEOBWMkE+s42WmxvY0/flDVRpRT6B4zwF3tMSEVcY/KrDukbZH4ONcZXrIFO2pF8scKXf2NFkCawe8777GyA== 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=J0zU+CeOeKWicFwLolgf/Sb8VzCP+jaHgmv08smTNpF2cDF4ImW1tM2OmX++4K0LNCaY5rLBZnGED6K4I7RLwjYq6L3/GBUWIw2ZBcntNXaJLGgJkPi7NSbyVvVqqgnLYQElIYfAwHZvDJvJHpRy4OSkXhveRrnb1iVV+tI0etIY2kqYaRGnJJu6y6vYv9l8lDhbz5O4OrybpQ3D985tlGWgsqRtuc2YftWRCS8f8iYGRiG71lvcw7dJnXPJ8VvsbS6so0iDJ4rQf8txRhRxZzS9OVLtmEhDwOfoUEXrsNMhtyHcnxgpd91w//JQDbDyj7LVTa6nnItEK7avdfcsng== 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=M1+Z/7TkCPHHDeP/NethO1zvrwizl3Y3UaaYMw0wPsOAMgFtr0MId7Y9EsxA2xNi/zpplTVIG0RFEfxz+DrgqnBlzeXNKPPFAKZDaAfcw+k3Ac5tzHScT0cwAW1j80HDFuCaEZleUoqH+lgZSXL2ooahE1NJGcT5m9qlyKya+tw= 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 DB7PR04MB4492.eurprd04.prod.outlook.com (2603:10a6:5:39::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Tue, 19 Jan 2021 07:46:10 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3763.014; Tue, 19 Jan 2021 07:46:10 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, agross@kernel.org, patrice.chotard@st.com, Peng Fan Subject: [PATCH V8 06/10] remoteproc: imx_rproc: use devm_ioremap Date: Tue, 19 Jan 2021 15:35:07 +0800 Message-Id: <1611041711-15902-7-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> References: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) 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 SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3763.9 via Frontend Transport; Tue, 19 Jan 2021 07:46:05 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 6b201de0-e5be-416d-0ed1-08d8bc4e49ae X-MS-TrafficTypeDiagnostic: DB7PR04MB4492: 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: zGa5jenCbuzX028KGIWZFsGlk8mEQOPtv+rM5mbgHL6UxvQlkS57OrZiRxaH5DtoQGxiEeso/QhPadR/EU/Iy5JYzzYjQNOcuH0YAV7DBpD+wBdGoJcTKvL1/vLMaOeMc7CM5DyirjLSjb+Kfhz/PBhzYu517AEwavGpgdLkUj9BoOGf8ceTml3pePEK3Ln7p/AQvDLJKyXbFy4TYgBsTGIsJoug3tkt5jSvH8KBN/xGMH+QQDsqd93ozIrDhzAqA3Qb6OyaGuDI8FExIPA35B2tlkRi4bGxxcqHmSZfHcI6+UxPHvZEKYdYjjFW/1StIhEq8SyiatwKmAe1Xd1x0bZPPUndBM6JyV5XrW44XQ1MexhizNoXrWargJdxjMizfbILGFSe8TFjd6JtYbXFK7tNvpvxh3A+oLDsO+aofvQ/vsGW4ELkhImMHEedT9QBsPSrwwFP8fu/kA/QqW1Cww== 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)(5660300002)(2906002)(66476007)(26005)(69590400011)(4326008)(66946007)(186003)(83380400001)(6486002)(6512007)(2616005)(86362001)(36756003)(52116002)(8676002)(6506007)(498600001)(7416002)(9686003)(16526019)(8936002)(66556008)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: pnOy5WynSXsZ0MchRDwwg0msYQSw8/TYQu27Pd8NbiE287+kbxuVaJIUd09DGUJIisDCcxcFgMx1AQITgb7ZicnZ2Qhl1HXKbZ0HmXyUvE3db5tQF7wS+3n7yDv1PrHJ0vWiZe4Mr6TpugwZkZKLXQYg8ITuVxw2R4oU/mHJcRTrERUJYd3ivszYHRdDR7pOylmgiWgDCChXQAWXJQVkKCZSDVdBPho5ZJV8t4e2dPxGvIl0MBy/zevq0QZTXGiQimgGOk/lLvMPieL9IRLMWiBnvSzvySpNXw96s3+SvMSX9+KNcOBMkubeO7I6K+Mn8fZHTFurrzjygDqwCJyyQy6L61tiUPJEEdlN9OtTKV32EiANAc6GX7pqGTjQCgQ/HyMO+ugEFh1PsXfvARi2dW0qXpTFJM4pGpAzXbB8G6r+qSEA+toJloZNDGh4YNfsV+kD5IVntuQ7sRbrw1xx/pmPqkHV1DAlb8X1b9wYFl0dfw3u8IcPBvLbmrQIHGem5eilM0i5c1P8bZrBHYXAj2DMMkKY2aIV2rBek89YoTKEpYr7siBVgOSkvXiHRoxSm+m0M8lkNnPUaYe63TnMPyLZqiNOerkl5aTvrh88TWyaEnZJv7K+oeDhLnKYuCChYp3lOl60yfKsFq7+tAXKw57KJlqnNr6E9KQ1w1pHzp1l/AoqvzBUprJyiY3a56ytwF2QbVMZwdcdvokoMXu/2GJhWcP/tVf+bRlAzmgWJuaCySJ+Rz93dXgekZTXNEaAdeyZAvIz8z6mTmkPazstBOY/FppdXfg6nScTAQFWrCVkXb0a/ADEjIk+H3QSP0zuctXfnIFTW4l6/3CBsFMIzpcyQm8THCzCh7GjusYKNKEqgoP0YQmBXbSu6ph9ONLqtrHtcxJSE95jsbb8NpUzUieQcPSZ7NL4drcrZw30c/M216nw/aygp8O2gjH+fTEiDb4+s24SsQ8VcvbWn6Pp83N+w3wUYMSR/GzRcMsV42vabIZDrvqjus/VoNlfk0sJ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6b201de0-e5be-416d-0ed1-08d8bc4e49ae X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2021 07:46:10.5938 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: X/HEb232l+Ze/pqxplC2zP6psdpj2qJPOGx1D+w6kNvlz2h33SMLH11XnTh83IU3HuuNLcE7mKAaRHm9sFjbQQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4492 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan We might need to map an region multiple times, becaue the region might be shared between remote processors, such i.MX8QM with dual M4 cores. So use devm_ioremap, not devm_ioremap_resource. Reviewed-by: Oleksij Rempel Reviewed-by: Richard Zhu Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier --- drivers/remoteproc/imx_rproc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.28.0 diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 2a093cea4997..47fc1d06be6a 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -296,7 +296,8 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, if (b >= IMX7D_RPROC_MEM_MAX) break; - priv->mem[b].cpu_addr = devm_ioremap_resource(&pdev->dev, &res); + /* Not use resource version, because we might share region */ + priv->mem[b].cpu_addr = devm_ioremap(&pdev->dev, res.start, resource_size(&res)); if (IS_ERR(priv->mem[b].cpu_addr)) { dev_err(dev, "failed to remap %pr\n", &res); err = PTR_ERR(priv->mem[b].cpu_addr); From patchwork Tue Jan 19 07:35:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 366138 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp517403jam; Mon, 18 Jan 2021 23:53:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxYNrvfZe/BuwT+n+8DrYjVq/ynPcL6GbaTq1Ja+bkMvKo1Ak1yR8U8yVDnDF2CLR/PCfY1 X-Received: by 2002:a17:906:414e:: with SMTP id l14mr809789ejk.476.1611042815249; Mon, 18 Jan 2021 23:53:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611042815; cv=pass; d=google.com; s=arc-20160816; b=yMLN00kgI6+FrbbQyZL6ZgTQ7GR5NY45J5fSuF3aU54UR5AnHDLoHoiiUNmWIgrZsM l6nkb/niLjMdIpSb/O17OGw+h2jWvWT2dvkyBkuJvXuskVW/Ax5eIL2MFKnF75rjxq+S LnyZFXauRAcQvitE5t4/R+PFRgqmiw41ev9a22wp72OH7fl4NrQYO77PqirEmaHIjjtP gRjDC3HX8PLS2+kDwuzgzpaSsGH34NcywyedepqkLsYehic/8g90BefTQOLLJWnXP9nP Xv+IT/R3ertcJy1vIRbsXNzpRnKg/WiNz+MYr/dhqcZ6/6pbZY4ckOj/7y7Lj7WiHaRc 4lKw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=sPFDy9u0V0n4kcoaeuDH3f4yuir3vLJ07Nxch5aSlRA=; b=chWXjhROx8BW/83OByLGrK6l/yFYFdnLkgAtEoyJP8jWx5doZW97GNUWKbLn2At5iA afthuKdwjNTGuhQhtzyp2iMnN2MAJjdg8ZNiTtOsNPKUnPfBXOl+LZ81848ocJNZ1+YR JXEDPn9/9mUNa0y/33yjUK5LtXmwG2cBQzQNggILXbsEXYQ36+3GLwSBC1SoP5hbBuh4 WnIjRQjNPNpg8x4+UPI16phMYcIhOyF/FL06RK3W43wxSeUtzlZDB1rRLh8I0pTK2dSG jkrmwiwogv1wVSq6xtMRPBFJtFd+wpneG5D+vSZ3N4QUz3TXlcHSCKQkw4b/Sd0ZQUhe FUIQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=eZslOlrZ; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v1si3167966ejj.430.2021.01.18.23.53.35; Mon, 18 Jan 2021 23:53:35 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=eZslOlrZ; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731266AbhASHx3 (ORCPT + 6 others); Tue, 19 Jan 2021 02:53:29 -0500 Received: from mail-eopbgr40046.outbound.protection.outlook.com ([40.107.4.46]:22240 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730749AbhASHsp (ORCPT ); Tue, 19 Jan 2021 02:48:45 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FCdr3HNzoilZaWLwane4A02G2FerTape4He3C01habW0066/175d9iLDNYT3iFjjEMl5VH4Nn+iKaP2Y9gTv8Zu08j23sWmKDfFo2Md+RApDdCEB03EteRA+BjrjV21phuGHHltjE9zObiUVZfBDyZPr/PuQmNbINxsHWHh6z7uEZXUdnzT/6u62YD4LVbJ/lyBytEPyVKt3GvYkSDWfDzYTgWt+gaD+rHcQplGVe6WwIoPlZr5GMmrIoM6JYm8GxLVvzzdhArfmwa6pzDY79pdLJpUz893Jr9PVCzOxdEZkx3DMpYGbMRozjp4+S6ZydCTwh3KlfcLqmneEwsfPEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sPFDy9u0V0n4kcoaeuDH3f4yuir3vLJ07Nxch5aSlRA=; b=I/4zXpMFUIdiwNUqCf3b3rTQM1xzH3S0dS+fbzXEPtDQE1kS9/YChG6E44oA/USAc0Ff323bHrSfRQ5LAC0LQxHHkRGIC9z4vybqoS88KpcdDfxmzFemHQsemL9x8noDC+UfZfk4YwE+ro2/z7CPpOjqVgVgwLP9nXi0xtc4ep00ztC6p6WNkSIZ8dhSA7Gh8oA94XKOjcyzGWY+XR+7rKbsseqzbLA/s6fXI5a62dyaUZ6/mONVAHIwmMTKJ4wvI+xHwhP4oT20UJEZkoJOpnw+KRYcay2ZFWY8hXHqCIHgZqi1wdX2CSty7gZzfANDd56RUCTS8pdaarUH2XsG6w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sPFDy9u0V0n4kcoaeuDH3f4yuir3vLJ07Nxch5aSlRA=; b=eZslOlrZVnjwUOrVg4vRM7ZZZW2izG7NrNheZi0oy58MX2p9P87XHa7GC1jIp3C3ae1a2h45Vag88pDydklbV9rlISVGR7t05z4Gxpcz5e5xatQX0H1WCZ/UEtSWHCzXqhxcDA+OZeLaPzx9SdU6/iHtTmWjssysJqnPP5hLUb0= 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 DB7PR04MB4492.eurprd04.prod.outlook.com (2603:10a6:5:39::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Tue, 19 Jan 2021 07:46:16 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3763.014; Tue, 19 Jan 2021 07:46:16 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, agross@kernel.org, patrice.chotard@st.com, Peng Fan Subject: [PATCH V8 07/10] remoteproc: imx_rproc: add i.MX specific parse fw hook Date: Tue, 19 Jan 2021 15:35:08 +0800 Message-Id: <1611041711-15902-8-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> References: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) 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 SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3763.9 via Frontend Transport; Tue, 19 Jan 2021 07:46:10 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c60b7638-442b-452d-eef7-08d8bc4e4d38 X-MS-TrafficTypeDiagnostic: DB7PR04MB4492: 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: ILBtxdOMEtsQf106kcSZ6XWUGeh2ox5ScN7RZ3lRvy8cNpsABISWk/nR33aqiXVGorgizlxaG+79xbK6Th56cxwplSnggPW4k5rrTK8S9HmRTP0JrT6z/ZpAd8LiWcMvLiLPFsk1JzbW8mSaNxYq/AXDRT/ddZRJs9idTds1P90cQq0pUi5yeS5ya9gJ5NNlmolb/CqHlNOjyYbEVeMw8/KVxSh+fOCDqD9rbgYM8vE+p3c55ybg8F7N+e0sZutXVrBBW09z7QRYjMbU10SKRjoFAVL3psboLuxPxR9GdeZ7i04pVZ/cE76vtsooNVKRCGWJ+iom+8wP+3rU+2GZ3mWyDp4z8Efno5evSvWcOjzWykY3BuuXq1b/7KnWCoXIgZmpyoZclO8GKksjt6q+OMWkrsw3s5/TklCpPFytgEt4OmBrLXLS0YfRHhw/X0D+jvnxwMsTE2asw5VbkITVEw== 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)(5660300002)(2906002)(66476007)(26005)(69590400011)(4326008)(66946007)(186003)(83380400001)(6486002)(6512007)(2616005)(86362001)(36756003)(52116002)(8676002)(6506007)(498600001)(7416002)(9686003)(16526019)(8936002)(66556008)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 6ElLOM1AjJ9VIA7rIMViRfsMZKk3i8zIRoVmGdtla5XvK98xoGZhncHrhi/8EKs5vUADHvqi/r4UER+x1ftHZh1Ig+M62+46KuBtzJXidgETnMZ4xHcEgHyMOEn6Co5iJ8kOU+FheJFiL2e/11E4dZ7rlW9ir2MYNrdlqrJwozpDLegw8mnK/9omJjJ+a9SO9qJLire7R0pScR9DrHggPaQFtpDT/kjCn21o6mJiySaXQ7+jtqaNyRYpkAISqih68u7bTFSD8zWK5vJn+oGEU98wzoxs5k8koFbgXwyA0UtbcE89n8HIh6a/DMfhrosuovlZegWI9VpMogFC0R7CdRJ38eCfgoyGqo96zkUIIUj5OK/Dcn5kyJ35btFsjfSThwCLJ1p34OiXUMUTQNO1gxauPUc69ifGpbwmWLm0zvoY3IUWqB4S+aiWBgKE7pf+C3fLh7bCJln/S0bCYVx0qOgt/jL0oHEZacCYFeham+L+wJpV7tEpj+A8zUC9UK+s0K38sqP5Xl5b/mPAPhBfz+tr02zy8O/Xfpz9A6FORm5XOVdYkwxLiA5NhOxzc59JXDjSpSQHx/U0rY5jJbdaoLnG/10oO1K87g3OcdnY6Ls1nxbAbUE8TCiboWdeveJWT5VKeNYsJl7vbQDOXMHN/xW0IIMWicY4URZBQ+dzFHQeu9UmpBAuR9H2rEnGLsLaFoSihsdNYAaD8JUa9gTbPVAtUZX28T0SILlRkpSRsA8PxtNN+Y09YOd1fgpRRfVL31AI0yMKULJQgwqbbbPbeNyKp5H3MOmkymFrv0V8nBckz5UmcmA9ZBn8+sR1Yy4kYFh7C86bwKJuag/m0oIILjJ4ADf88TXWtIaGGx1ybVkV3pOp67qYOrZUSssOXyMWCFUnuG1iGqClW8vDpFq9ZSz9+m5pyUmL92qcW7t83ljdaG+IfeSAZ8i12WB7uMFTyAqiCVodhOPoyLIwqxjMrTg91kA6VhPGmFHWfZEb00HcL4FDUXkAkNUuDs7njhU1 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c60b7638-442b-452d-eef7-08d8bc4e4d38 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2021 07:46:16.4411 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /WjyT8Bu3muiOXA81fUlxMMJEUmYQpJoVbDXkONyoiF+ZoWRnpYCrkxRmOerIAzUqLQST+doXYEau4U+lnIYcg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4492 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan The hook is used to parse memory-regions and load resource table from the address the remote processor published. Reviewed-by: Richard Zhu Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 93 ++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) -- 2.28.0 diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 47fc1d06be6a..5ae1f5209548 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -241,10 +242,102 @@ static void *imx_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *i return va; } +static int imx_rproc_mem_alloc(struct rproc *rproc, + struct rproc_mem_entry *mem) +{ + struct device *dev = rproc->dev.parent; + void *va; + + dev_dbg(dev, "map memory: %p+%zx\n", &mem->dma, mem->len); + va = ioremap_wc(mem->dma, mem->len); + if (IS_ERR_OR_NULL(va)) { + dev_err(dev, "Unable to map memory region: %p+%zx\n", + &mem->dma, mem->len); + return -ENOMEM; + } + + /* Update memory entry va */ + mem->va = va; + + return 0; +} + +static int imx_rproc_mem_release(struct rproc *rproc, + struct rproc_mem_entry *mem) +{ + dev_dbg(rproc->dev.parent, "unmap memory: %pa\n", &mem->dma); + iounmap(mem->va); + + return 0; +} + +static int imx_rproc_parse_memory_regions(struct rproc *rproc) +{ + struct imx_rproc *priv = rproc->priv; + struct device_node *np = priv->dev->of_node; + struct of_phandle_iterator it; + struct rproc_mem_entry *mem; + struct reserved_mem *rmem; + u32 da; + + /* Register associated reserved memory regions */ + of_phandle_iterator_init(&it, np, "memory-region", NULL, 0); + while (of_phandle_iterator_next(&it) == 0) { + /* + * Ignore the first memory region which will be used vdev buffer. + * No need to do extra handlings, rproc_add_virtio_dev will handle it. + */ + if (!strcmp(it.node->name, "vdev0buffer")) + continue; + + rmem = of_reserved_mem_lookup(it.node); + if (!rmem) { + dev_err(priv->dev, "unable to acquire memory-region\n"); + return -EINVAL; + } + + /* No need to translate pa to da, i.MX use same map */ + da = rmem->base; + + /* Register memory region */ + mem = rproc_mem_entry_init(priv->dev, NULL, (dma_addr_t)rmem->base, rmem->size, da, + imx_rproc_mem_alloc, imx_rproc_mem_release, + it.node->name); + + if (mem) + rproc_coredump_add_segment(rproc, da, rmem->size); + else + return -ENOMEM; + + rproc_add_carveout(rproc, mem); + } + + return 0; +} + +static int imx_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw) +{ + int ret = imx_rproc_parse_memory_regions(rproc); + + if (ret) + return ret; + + ret = rproc_elf_load_rsc_table(rproc, fw); + if (ret) + dev_info(&rproc->dev, "No resource table in elf\n"); + + return 0; +} + static const struct rproc_ops imx_rproc_ops = { .start = imx_rproc_start, .stop = imx_rproc_stop, .da_to_va = imx_rproc_da_to_va, + .load = rproc_elf_load_segments, + .parse_fw = imx_rproc_parse_fw, + .find_loaded_rsc_table = rproc_elf_find_loaded_rsc_table, + .sanity_check = rproc_elf_sanity_check, + .get_boot_addr = rproc_elf_get_boot_addr, }; static int imx_rproc_addr_init(struct imx_rproc *priv, From patchwork Tue Jan 19 07:35:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 366137 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp517397jam; Mon, 18 Jan 2021 23:53:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwFqC5uAUZnfGkshxeAlP3kozmsxs5gqm29r+WUV1ykC4d2zYW9lzPxDA1sNUsPQ783rLT9 X-Received: by 2002:a50:e3c4:: with SMTP id c4mr2381432edm.77.1611042814839; Mon, 18 Jan 2021 23:53:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611042814; cv=pass; d=google.com; s=arc-20160816; b=v1UkJYozBIXIR9DFz+GUyJQaEEKbS+9yGTDW4ASxihelA+pZmZyjad/VC8vqmDBkfX bgcmAg7qzR/H0/8PSiXVrl5susohVCxSnV69WyopLqfXQn3JEHFZNNe6xxEvc3pDYRqG GHAk9OMo54xaZXdGosi1xQpI7Wr+1Ay/rKy1rnMSW8uD+5eo4+Cn7/cDJbYBWlmdv+GN jR7BFfQUuUA1CRy6u52pF6MlaAZb/e9mWq9aJTFTUa+YQEcshX2BbhKslD0e6fahS9yP c4MQFB0LITZkmlPsZYPqnXhheglF0L0AP7Ix5j/rkhOTYG3+lPibUucwOcyxC4J1cgnU j8/A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=W3tuhvC/l1aREUPXQgoj+YPRRpgkRpSwXiVrTNIubUs=; b=S0wsR7WUTk668qBSTwHJU4Sre0jPpPl3jFEQnkJhro7sxNcHqfBz9i8pkp7yrTuKWK g8uyuxhKYrJZqPY1maN54Zw78KYba1WJQ0d4ya9Kq7ZfMGgoNInCOMd82dh4u6ClaTbv tMVB8XuAbiB6ykhdP96Llbh/RZJwjNGJ1djEEfdkXNCDJsVqkNKst4Ni8KudN0f2to8q ixGflf1YjurvF2IzSWgDcGjIuz+MDbv3CFETRpudIolfq2FIF3SOt8byirGcrWZ4eCkP zn1qcvRxoYbnOg3tnxTKMdeNZocVPgTuHQFJ/iyYJCrXfH8F+BijW1vRUgGD7tfmPnHH Njvg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=XnCGgzs9; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v1si3167966ejj.430.2021.01.18.23.53.34; Mon, 18 Jan 2021 23:53:34 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=XnCGgzs9; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731155AbhASHx1 (ORCPT + 6 others); Tue, 19 Jan 2021 02:53:27 -0500 Received: from mail-eopbgr40080.outbound.protection.outlook.com ([40.107.4.80]:64958 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731235AbhASHsw (ORCPT ); Tue, 19 Jan 2021 02:48:52 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bi8U1JLXDqr15Pd+jjIy3u/FYekyxh5LTIduO0+n2qrH1Gt2oEpLsx8mtfB2ZPck86OgLFibgT+GMHvd6o6vXG8jI1pj4GYbui5aUAtMtrMPFmSlMdiR6gaG2crRdcUC2rQp5+oWC6DAaG9tzPcaLa389f9by1igRfs6nPXLwZOiW/i35V0dMSyEVFm0BQm3ZEbdjiJYAmYHT5cpvzdEX/3k12ERH/k30XfrrernwErNp1UlUSq26VVq56uFyheGvwrYiNNULe716st6zu1Cw8TMAAaYtWjyc6tWIl7c/kxsuRZKc3TQM8Qj/Ftms4sAG7BUNQSIMmkcO8x6AQ3pXA== 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=W3tuhvC/l1aREUPXQgoj+YPRRpgkRpSwXiVrTNIubUs=; b=WTtBxGXZpd66dHvqOrzcePeemLofFf6U9blzV9tjyhwq23qmY/kRvNa4GNbl9epnJO9KMb76PiRB/T82wOmB34SLWwmbuqL2pAke5LOdztnZMNuflir9JakxSLv4omZH7JnTwgJbQwi5LbYQ/IZreo5xO1AFBCGVMQn08nCvPvYbfoMGRrSlt5sYc6gqN4ss5UGk7JYrtXNmKtpc+QHtpS3Doeu0KdoG55fhxapLGYIC7gpSlBuyAmktFHWFtonZCV/1fB5J5SxCJrVJ0cIWjty/wKhhWoKKoBP3mhVKuhyOxirmVXFN2ZfbgDPSwRiB07JbBoEou+UOOKO8NbFYnw== 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=W3tuhvC/l1aREUPXQgoj+YPRRpgkRpSwXiVrTNIubUs=; b=XnCGgzs9YF0od4g+cffOCZc/NyFtMOwwiI2AkdJnlxkNhsRUeTAxQRj291IFm8+F8mSeveuT9Pfb8VL2jSI+hNveaXNrmEps/VKglTiOi2T2pil8rjHtk462wftxa8Lu0spufN5evQ8KETP3GCtucl0RJO/VZn9nlwXWJMBJl+A= 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 DB7PR04MB4492.eurprd04.prod.outlook.com (2603:10a6:5:39::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Tue, 19 Jan 2021 07:46:22 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3763.014; Tue, 19 Jan 2021 07:46:22 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, agross@kernel.org, patrice.chotard@st.com, Peng Fan Subject: [PATCH V8 08/10] remoteproc: imx_rproc: support i.MX8MQ/M Date: Tue, 19 Jan 2021 15:35:09 +0800 Message-Id: <1611041711-15902-9-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> References: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) 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 SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3763.9 via Frontend Transport; Tue, 19 Jan 2021 07:46:16 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: aaf0da8f-8980-4608-7778-08d8bc4e50d9 X-MS-TrafficTypeDiagnostic: DB7PR04MB4492: 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: D0AK0rM1wJon6rbfRA4cjwnFozCNaQZKqIImvrDAhWxQkzxztvHBOzM17fLdl55s0IRIIHpOJ5KPnHwgUt8xrtWK1sSKGa55vytdOnBnT+pah0ULdjcPom9/kFWbKMQGgOLlIUWD4M3h3JbmmJuRSY38v9MdLYpjUUTw4VSunJID6mAD+8sCENYvF+YhgKU3nYNAsvE5xMwIs20LkqD2+1mxuI4i7Ivf//TZ9PlrKNp6qAqAJI8I2WhMMheVm9wnQ65Gx9kj7gqsZKs2eK5ifUPESqNAzWfdFdjgY3kL7qFA1onguvzkkArDF+O5vcCMV8pPUZs3lgdeJXmgPh/gehxceQDk2PO09YfPWyCphMgJ2FunjIax0SqkV5KIIx6iT+uHrTA+7xCA/J0SEm1rQYUVg4G9HnP2mDhglBJRfYBPSpR72lY2iS1hqq68l3yM 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)(5660300002)(2906002)(66476007)(26005)(69590400011)(4326008)(6666004)(66946007)(186003)(6486002)(6512007)(2616005)(86362001)(36756003)(52116002)(8676002)(6506007)(498600001)(7416002)(9686003)(16526019)(8936002)(66556008)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: qLqD2somTiNDDWc6DfjQGtrmIs1iJlekrrXEUpUDB0hNe1SyKBA25G9FRdUs50t8HTtYxEkRXk9Cc3BneyjYWDlrjQG9o7Gs/jBJiLczIINmlDCTR8Q/DYDhuy4d1fAaupwjXubSXfJuUmD/YaWK9+gsOPDjWE01zlPZGUrHGxs0jP/KhOW6zXa6o30PT06uor1CbiEiLmTwgmkC+TVn+xnf1qAKa/ZzhHNNTUEXPzN5PxzzKob8h4eQqccrzIdeielsczD7dUOSUAKJFydpyVkDU0sXmvvs3Vm1jOnj/GiOPvhFEimDqC0mWXOko2axmhKZJ1gilTta4sJnzXdVV1EwpfUqBqPQu4/UXzGLpqooTH9hIgpyJi7XYTs1vUeFQAaDH+TcCOfpd2K0pv6UmyDiIn1GFrw9L7ulJ4e03s+7ZXH+rngRDKMCMebgRhtmUCfVPcQri1NLNeLBLKYlAcYpl8Rk8oPKKqEUvsIgFa9Rzle5uFv4nktk5YmjBcvBtMbGt2YVpbJWaT/CVixPGtg2Bgooqc7o3tOVQnJVz9csBYZDt0TJYvW7IlgogtxwpqF4gsMjq3NnIVfQZoyqFhpYQUMJyGJRRT/xKGTbeSe63yHZyuqcoOqnfiuw0GqB1G/Uw9QrrF2bYFmlLJY1/B/7VLMva+1eDtfV/tzC6AXcGcksPCQiJPw9NZNDzQim39vnzbln6Dncz5qTfSq7bJGCaV/hL3hijY/nsVIV3/W8ZLWt0wgAV6b+xe/yPkvSnO6pwEXUiwDcdYcsxR3NFuwCj62S2O7TTNg5BQAAgxyrMavF0YkH/GcWgMScaonY6OU2KE10aPtUBW2KrIgOgqz58OAkyaQF7ip0/yDsuFdOgEDlmHpKYYFh5MOMdO4xQz25CK+zPvNZXLjSMGZ7sUcO+YPT+4bn9ofHuxSF6IAzu4GR9mydkYxPmNCXsXB6lx2f4DGrCarfHnjXLmd+0b83uPd4L9v2lE1xmDc0+lfZi+fgVe0/SEqD1WNNsTzx X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: aaf0da8f-8980-4608-7778-08d8bc4e50d9 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2021 07:46:22.4924 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: s7UykOXFeu5kweVdanrX5hw5d7yUqJALtapOQFKJMvVvopqJOYLenIfg3tEB1+Poi61JulhJkzTAxT6Bcn533g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4492 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan Add i.MX8MQ dev/sys addr map and configuration data structure i.MX8MM share i.MX8MQ settings. Reviewed-by: Richard Zhu Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier --- drivers/remoteproc/imx_rproc.c | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) -- 2.28.0 diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 5ae1f5209548..fa01e64cc791 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 19 07:35: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: 366136 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp516743jam; Mon, 18 Jan 2021 23:52:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJwfojwRkdEULgvgKiLiKsifSa6EYvHH6LE/rEcjj3bloTjd+uXzJDlfi61vcGjKN+Vnf+f+ X-Received: by 2002:a17:906:6b91:: with SMTP id l17mr2066316ejr.171.1611042728158; Mon, 18 Jan 2021 23:52:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611042728; cv=pass; d=google.com; s=arc-20160816; b=h3QgXqNkDbJros+2IS5fAvJP8UG9QLipX//tzn+nUPSeenxJKzwRu44nIvEHXUyq4L bPgR2M7OuSuVhEbANtwx/gxuZK6x6lW2zo3K3H4dUB77iUYdcVHbrDZPvVj2rxH4Icoq 0+mAV7oV2JrUFnv5G9fUBUzsoszWUt0/NPxKPp+CCWK8EcqTWrCR07hTmodCeWQRTGC0 gqrAAcXpbzHc3y9p3vOgcYhaLDZ4L97/if3ynFv2PgrkaD7aAoPHhF3+HrWYBYhQ9C4q iB7zqYQ8Zp5dEo9Kkt18LZMr8vRKgQSnFJ6wy5pqIrl6Ypss6mV3QcUxLDcBE8f93VtO 3Evg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=115xpTjMhzr/pXT7tXiTDwfmJxE7ztAJUZp9k7KqSxc=; b=Sun9vcGo3mmQoND2BwIKq/GpnjaWoRv+bWulO+1GFPAr1NhXMBqm3Q1t8luwOHutPv HXkTRmtPIQyzVpfRAIUnBPvwgGVS/jaKtXMd3/aGkiNkgGBCH2WTGc0Dyq9LsQDBmYdL 5iOQDWOLpfJA+sxGiVMu6oPk4VhIThu7fKXrMYew4+so0zsuHQiBUlAxRCUzMSuTRIsD 1qIKS+UwJkSFxZfBPPGpuu/5cooR8IQGL6OIGTSyfEsa2uLW56ps4NzZCzMRuRJzLQgO 8iGuVBonqpv4VANNs5ueOdAaIHH743N0CvUANKO72tPljkel+cwHqrjCdiyPWfxuP5g2 qjwA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=RSayW8HS; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w17si8123572ejb.66.2021.01.18.23.52.08; Mon, 18 Jan 2021 23:52:08 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=RSayW8HS; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730822AbhASHvW (ORCPT + 6 others); Tue, 19 Jan 2021 02:51:22 -0500 Received: from mail-eopbgr40046.outbound.protection.outlook.com ([40.107.4.46]:23219 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726155AbhASHto (ORCPT ); Tue, 19 Jan 2021 02:49:44 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RSlUAycSbw4VwLV5O1FlUKFkhBjL/UheswEQexKvnqNj/D8+uCrvwQI9NStzFsnQYdaRNYYM2nfFTEk//0nFdcPAkkb67LJFvrRag443RwkCjUxcqudyapka4ZbPbemoSm3sz2/yU308EGdHMBG6yfJCuRKLkR5VclOVhVoA6+GZACNiIhVMb7TXVi/4eFUAPmjnlg9OqGGlFb29xjp3A2R1FnXVnR11cdbakTb5g74Ze2kRFNGqtgVM71Si0CHdP3XjGQZiocD8K8tNYs+P/3wv7Jedl5SierTCQFQlCFcSm+bGftPcCqXLcHIZlpFzrh6Q41KUSZJ36dbX0zfDtQ== 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=115xpTjMhzr/pXT7tXiTDwfmJxE7ztAJUZp9k7KqSxc=; b=CHfp5GmgicwOM9qu4q8pgH/4nSWlUo535ivBhCCEzh0t59bmr8+Zve5PlYt9XX0J/G0dElN+vg8nd8kpqkjvq4OQumEJcuCc6ObNnFytQ0PEEg3a4TYHLkbnKdkdgqjmOz59U85C/7SBG/R0z5V4Rffniad98YI+Vt9l50sXLImemAYXS/N08AjPqUh9GWQ4x54Hlq/E54lSjRI24jHggGChdOq7Kto5+BBkr0veqV5aN0E2FpUyllg1/YXsn6SaMlWSE62EZ0jClWm3toXKCP8NiYH8lzXuA0PiJK+1mR94FF3c995NQeFB+Qnx24d9skkTsxlIogTXLEQRVUPqwQ== 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=115xpTjMhzr/pXT7tXiTDwfmJxE7ztAJUZp9k7KqSxc=; b=RSayW8HScpocRb00uxeRF6SYI+S7YntOzOjSMRu5M4z28PEGPcNNYwsNeFaWtYI11WOroWPzkqJRDmfmYETIG+3o4mSwhORuGsrBWV5DAOZPTO0lIYGu9vx5DL6MExC0PTztWKOlubGozfwUSURQCHATycEMstA7RN6T9FWvJtg= 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 DB7PR04MB4492.eurprd04.prod.outlook.com (2603:10a6:5:39::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Tue, 19 Jan 2021 07:46:28 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3763.014; Tue, 19 Jan 2021 07:46:28 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, agross@kernel.org, patrice.chotard@st.com, Peng Fan Subject: [PATCH V8 09/10] remoteproc: imx_rproc: ignore mapping vdev regions Date: Tue, 19 Jan 2021 15:35:10 +0800 Message-Id: <1611041711-15902-10-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> References: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) 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 SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3763.9 via Frontend Transport; Tue, 19 Jan 2021 07:46:22 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 468938e9-453d-417c-4b1a-08d8bc4e5458 X-MS-TrafficTypeDiagnostic: DB7PR04MB4492: 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: wvlzfERfPvDqY1wrpF+Rd/KrAfFMHhUi2pe9IZwiSciHdYO+jcfnem8Tr4X7xBkDyyiORst07WYkSOuJvUZ/wtUaJP8gMxm1U04DhyrIMCAgwRERKNJ23suYU0icE8KBRR2fHVAao7pTRqoNnpOVxb/LfTX05QSPCJlBSmrSoHfNFPF2jMC57kXuKt53RD1fkJ/MQBNIvcFdPi1ipWcfWzEGejSnhUk6AFZ1z01IT2tHb2LhoSP5F8mTjjWEHZzbiVHuXRui1RBw++rgLmmT/spu0CDaJ2DIUBzSXpSJGIxwVY55BgVqqdy/3NEc5BbvyGwck0P0zx+Pe11+BwGj7bcTzRJNuE99522N/jbTWJlXtFdBAqI3jKtzeMbXwXUYdtT6MRNaCj0s5Fcl7KxCXDlFv5fBl4C/7SH6UP/o8IpcUdx4jpm0e+dGAOTQlTW6 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)(4744005)(5660300002)(2906002)(66476007)(26005)(69590400011)(4326008)(6666004)(66946007)(186003)(6486002)(6512007)(2616005)(86362001)(36756003)(52116002)(8676002)(6506007)(498600001)(7416002)(9686003)(16526019)(8936002)(66556008)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: jbPAusOaVUiD9fVHA3TvQnBsN03Kdg+oa/CD3LRcGVdeH2vi19bpR4ycKsDlNWXPxc0aI6uvnnUe3XbIY6Zn807CNfkwqJ4oHJXTbrWSo+/4E0+RRk0VWXxalMjh8d3Yjh2apccc/RfxZlTm3vk0NKQB3/lS05NeIuz940FlaJCv9KqQTdxYWYOVkSAZfzajIxD7JoI7p7+lxpbzrfsdmcrDkUnueIhF2TCMzQ5ZnoUeM8kmoVd+xGTQCgzhR65SqSKCRYcClKydigr+wIJiHv8kDb1P3ZNfPm42tBw+lGwRMxx3O4fE3+roN4njffa0yjtQWiB4UmFfHD62uRAbUVfNtGriRgKEqe8UKMiouSRzlL3YfRsvQt+YhVwA5yPRbt5fWYNr0VnIC64u7XS/yM009KBLbjspB4HbRGQR+TeXbhdZLoYh5TU+c1qpm1A2ZEBIGS6K14WncDc8ewUUBvH8Y1pdUbPQB2MTkyE7UK/lIcqMKg+aDJQf5ofc0uH2UGvLOkXKAxkIbz+TTzRTALmQ7u44xR/0uuZY7KmOGeciLog1OVBsPH6FKMQxZWlM5UxF2DRqoT+T1IxNjYYi0kxmhVAo5o+HHqU5ght2HVbs7Zb2BH5+v2MwpQlfRexJAIVxtTXt4cFMC8u4bZ9Yls++WRDxnUw53/uknDTb82zk9qTQfLlEj5dRWKzwT8uAGgztHrJAInHz1bitxav4BAnRwiKci7MC5dTjnrXVkL7Q/vnzPUmoJJnLUGUDznx84P/p27+12mEtaVRcsPaDAZtFdRga7xOuNYSmST9CAojY+HBoadUBzNnOF/ETTBGoSW6vlOeSRlWsgYsykr/0oKUKoVv8dQPJmJnNa0HL0zWI5AdQvRjKy8dLIpQ3o8JgSfqulrRcI6Wgr+zxqBivSz+yylzxJu0rXZ0SCvwM6se8R/61PeJDMgWABocJnIKGnGC7z2YzZOQOTtYyASlzzXiG3jUyABLgw0UFpitYFzZyxS2kICOdZWZl1Am4P/6w X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 468938e9-453d-417c-4b1a-08d8bc4e5458 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2021 07:46:28.4737 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: WmdTF7zii5AlI8U3t4Mbm3oZA55cteG5naw50xKinKWxeNqvhhWCWxXdI5WQ07uT4lMPQZ02D4eLC4tnC83X9A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4492 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan vdev regions are vdev0vring0, vdev0vring1, vdevbuffer and similar. They are handled by remoteproc common code, no need to map in imx rproc driver. Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier --- drivers/remoteproc/imx_rproc.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.28.0 diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index fa01e64cc791..54ac143ba033 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 19 07:35: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: 366135 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp516713jam; Mon, 18 Jan 2021 23:52:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJySImiiCxkkCLwTdG5dzcle7kqldqg1W7gGqdbDHQB0QCvEQwvoCXRLDFQ77fmpHa48jn+n X-Received: by 2002:a17:906:bc8f:: with SMTP id lv15mr2162620ejb.180.1611042724871; Mon, 18 Jan 2021 23:52:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611042724; cv=pass; d=google.com; s=arc-20160816; b=DjwIQwo13fzBA/AodKR91BpP8UrZ8ujVINlgoZujhzyIxQpvB9NszYYv5I6Wb4ldIR WCp4a0ATDKOeXchZ6de83K0qyTf1NDsxYl/ojX2S/4/P3p6Bc3xLi09+YjVmBAStseER /k0BuH2aiMGotWWF43NEG2C59Z0+Tpo2FsDVz2b8WZw4KYUDhJW/bNuuja1iARXwz68O 4Mm0DIeafhuWtXA8Rux6EQMb6uEEql3fkGgzMjVZiMRBkLh4CfOjKerZLnXMvm09Jlcu nUrGhEU+JMd/s3mbAN0h3Ep1UqWB9hv0QA/mrD0kxrWW8A17C2XjBjT34YyN6trHACrG pnnw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=6xh8siq6zsX5K/BAtOJDXJAS7RQs5VeiSiq32qYrA5I=; b=cYApN/jk/8NbkOOleFWzJCLf4hHTvYDqvL1YRnNJnNOt9EFb4oGxFScDsQ7+eYmaOt GG+fPQaEM0UQVDNRZeVmWk6GYd++5VJnVGNA58SFPmLpxCB3Z5yD1gu5neGoh+lI8n5Y JjfUCOixF3h8iXR+1MvCLuHRy+DCw1gcuRivcTcTgtY2GLGP6hSSbXoFco0kaSgniDRg lCd044A7C4ZUFA4fOOSTt0eHrY/FywI2HmzUKJsitEQDBtD+8pSe71MbVfS9JhalGqnr NfGu3xXCNsOjokvBUfSDPbK1kGqmMJlZNZNvo5Q+7qjE9csrhpV57TaPC5hdmQ0uvuGw MXSg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=mG181YPl; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w17si8123572ejb.66.2021.01.18.23.52.04; Mon, 18 Jan 2021 23:52:04 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=mG181YPl; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729939AbhASHvV (ORCPT + 6 others); Tue, 19 Jan 2021 02:51:21 -0500 Received: from mail-eopbgr40078.outbound.protection.outlook.com ([40.107.4.78]:56549 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730808AbhASHuQ (ORCPT ); Tue, 19 Jan 2021 02:50:16 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b5iQh6ylBzW7Bfy74hGM5BA2t/IyKyX886q4VXCMb7tHPZL0TtlyFwFhOkFOhx9pflgkClvrx+bXXJ6Hn8ATOYMsTM5fWxfhJF4PnrpBkx9wm6dgYQ/POwqQSrQOyWbILd7l6i/C5mzQbtn0hltSwHf2Eq/S9jBBd6+Br3Q/IRNFxhD7FxL5mfr3RP26KjupjP2xZTpUxuS0QGm5ZiIJ7e04Di4zxPDvEkbXioRui0y3ulHjyPO+OuSzTn5upcBASfzAflslaj29NsIFj8/6BpNRURJGmrYFzakmRX1cmN2QUFoCmL6dexNPGMteu4AK86RZlm6Ha+IY4fGnoA73XA== 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=6xh8siq6zsX5K/BAtOJDXJAS7RQs5VeiSiq32qYrA5I=; b=YHb5jxgsP1s0jYZsnJ5nOWatmENr7VTuLWLHeUv4IZbRqj5yCBSEv7NTnu3vCtpdqQ/stjgI3SyyobHie1Fgr+LDEdjYpeoz5peK8E1NgDcuS3x+3tQSlwKZW52ghU6OQRFwIiYAWUQGymEvfl3MVUhZavOkq8OVYwS5MD5cm5fCMblo7nXjmCUhiMjobjjqnmunPWCqr0isuF8s7MPYLAPCe3jm/ySlGUDEKw5vuIPIlUTYnDe6C7Nlg8pH3C0mrTxVvQvM565hyPI3HVMpKCiERQtHSCqmwfNtaoqCB8oGl47aFYK5XkbTH3qTiKtqQl5IGB9Fy7fxkvbcYCF7JA== 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=6xh8siq6zsX5K/BAtOJDXJAS7RQs5VeiSiq32qYrA5I=; b=mG181YPlQEdn4krDUlgCsuNsSgjaRmq+inQpFxmoeYxQx+KjVcT+nfQIWZHvg2781VmuZtcgj1zldyAXg2DTEVnNS3SMznP8ZopmgDgdT9VAVmf9oTzV3rNq9sWLVzjc4l3A0c/4uE8jBx6XnKUMV3ZgIdx/YFKcNHyzd34jgi0= 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 DB7PR04MB4492.eurprd04.prod.outlook.com (2603:10a6:5:39::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Tue, 19 Jan 2021 07:46:34 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3763.014; Tue, 19 Jan 2021 07:46:34 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, paul@crapouillou.net, matthias.bgg@gmail.com, agross@kernel.org, patrice.chotard@st.com, Peng Fan Subject: [PATCH V8 10/10] remoteproc: imx_proc: enable virtio/mailbox Date: Tue, 19 Jan 2021 15:35:11 +0800 Message-Id: <1611041711-15902-11-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> References: <1611041711-15902-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) 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 SG2PR04CA0161.apcprd04.prod.outlook.com (2603:1096:4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3763.9 via Frontend Transport; Tue, 19 Jan 2021 07:46:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 0b5c61ec-94f4-479b-f755-08d8bc4e57df X-MS-TrafficTypeDiagnostic: DB7PR04MB4492: 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: a1c2xceQ5SKZAJllSgTARUaK5XJvbswg9b6c8TbmYR8SxU8W2xekb5nuzgMW0WuE9nmVUmP/PCKNN/tEfDfl1Ymx8bnis43v6VVwycbYvLpWBv6cteCmLdKgI6buKQ+qI1rGew7sKSHZtfCq5py3gwDfYxNc6q5yxm1j22z5hS4/7GNjrXRhLu+5224/N8FrMB5tINmj1O52bZGxJQGj6pnnAqZx97VBSp+rQSg7MVNHYpnQUXIKWWOTPy4UFSuoKfzxm2HyXkaqVb0VZxHByvSBso94/SnIQI+K9ELbn+PRDt5jSz093c78eG3DTTFgTvlU2k7Bo1O1959T7GUWuoZrWiLTswOqmHnHE1mPUm2pwh9+eU5MZv6qZxvhj8COYtW2RKvAgXXMw1Exr6LnDy3Er01u337A/htw7/It0SOZhG1fdTMQQryYTYk0qo83/tjJeAypZKFB60vhfmJ5ZQ== 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)(5660300002)(2906002)(66476007)(26005)(69590400011)(4326008)(15650500001)(6666004)(66946007)(186003)(83380400001)(6486002)(6512007)(2616005)(86362001)(36756003)(52116002)(8676002)(6506007)(498600001)(7416002)(9686003)(16526019)(8936002)(66556008)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: U65IPxjzI+nVmc1vXvrAa5y6hLFVOxirO/hCRkHIJ9vR5wozekg7g1NAHxF7GEC53pswMP06qTBgMO9pD89jcsx/g0cctzdtke8QrJR8ScdbiLHoXEkjiD969y24tQ502fGOAm/f3RJlPPWMZaYcFPuLrGi2PLaJoiIdoq9Ri+gjfTjjV3udH/peBVM00aSnSZx26PqDejeTuO5pHsoA7ZbDwvxdpIs+1YIs5VD5ywn4FngFBug8JcgT1Uo/j9Wt5gSsGBLBDb4xMajUH5ZET6e1BZ5xjWzpR1hxDwWhJDQ8I/nSJmOzFKUHoKdoQNkwNDVudyx+N8wwiMM5rCgCwBlAleYjkaJzlpPmxTxdMlv2gbgtudY9VeETbUNvPVmJsJd9qZ28RCLVJzzUvz7a8J0nZWD1aULumXWfhm5jJ2340LyIddRty++DR+SKdqPJLU6bsu0EfH9voofbpXUmUsuhtsM1Inp8xohTST3EeFW8oh8xrdgJBxPyMxP6XD/hYStRI55TIiV8LnxXbYr5fkpLNALP+Sjcf5Pk7eSj8HqcBXPZvTN6A9gXb68fDGmNxrTj1skjZnlOG0YCsVMDWjJaGRcW5MzIYSYGOxr+WKmSC7JPb4I/tSLIc2lP3ft8GP50bLVs+Hwjrgtaqb0pNWnlnmWmTCWhk8GssHmcZ+tN8PpOCgGC2sor2vV7XSL41Eoue8NWzoWG1HzurQCeprDcsRN/hZkv/qepPZCD2A5X4y9cBCVQ9aEoooWB59cdd0P0i2HVWWy4ci3pZ2NwNvmNWXBgVSM67Dkrw0mz2aIzlcNCuUK1mMpADJ4eh5gzpJmO/PPuookoo/mjquyLZasEJ6Je/j3r7vqRtVb3xIzpE5VEiOjRfljCqrbE7g8Gy6palrnquta5DIaIyayRv+zAjRft8+sjiyGWgoNS5iSJ1LE4bUG5KxmFtWmHTZzIajqY2eqgZ8Y5r1SM6Jch6zROJD0Flce776apqmXdD2A0BRlbKwY1jjF5MY1V7wDX X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0b5c61ec-94f4-479b-f755-08d8bc4e57df X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2021 07:46:34.2820 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Nv4Ij5FZT7NIHAx4qq3N7IQyXt+0/88O+0urfLcnQJqiMG3bEwByrfsIpGN5LdwodDa+P3EWXYFvWnLLrBp9wQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4492 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan Use virtio/mailbox to build connection between Remote Proccessors and Linux. Add work queue to handle incoming messages. Reviewed-by: Richard Zhu Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 116 ++++++++++++++++++++++++++++++++- 1 file changed, 113 insertions(+), 3 deletions(-) -- 2.28.0 Reviewed-by: Mathieu Poirier diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 54ac143ba033..c16a91f8e410 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -15,6 +16,9 @@ #include #include #include +#include + +#include "remoteproc_internal.h" #define IMX7D_SRC_SCR 0x0C #define IMX7D_ENABLE_M4 BIT(3) @@ -86,6 +90,11 @@ struct imx_rproc { const struct imx_rproc_dcfg *dcfg; struct imx_rproc_mem mem[IMX7D_RPROC_MEM_MAX]; struct clk *clk; + struct mbox_client cl; + struct mbox_chan *tx_ch; + struct mbox_chan *rx_ch; + struct work_struct rproc_work; + struct workqueue_struct *workqueue; }; static const struct imx_rproc_att imx_rproc_att_imx8mq[] = { @@ -366,9 +375,33 @@ static int imx_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw) return 0; } +static void imx_rproc_kick(struct rproc *rproc, int vqid) +{ + struct imx_rproc *priv = rproc->priv; + int err; + __u32 mmsg; + + if (!priv->tx_ch) { + dev_err(priv->dev, "No initialized mbox tx channel\n"); + return; + } + + /* + * Send the index of the triggered virtqueue as the mu payload. + * Let remote processor know which virtqueue is used. + */ + mmsg = vqid << 16; + + err = mbox_send_message(priv->tx_ch, (void *)&mmsg); + if (err < 0) + dev_err(priv->dev, "%s: failed (%d, err:%d)\n", + __func__, vqid, err); +} + static const struct rproc_ops imx_rproc_ops = { .start = imx_rproc_start, .stop = imx_rproc_stop, + .kick = imx_rproc_kick, .da_to_va = imx_rproc_da_to_va, .load = rproc_elf_load_segments, .parse_fw = imx_rproc_parse_fw, @@ -444,6 +477,66 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, return 0; } +static void imx_rproc_vq_work(struct work_struct *work) +{ + struct imx_rproc *priv = container_of(work, struct imx_rproc, + rproc_work); + + rproc_vq_interrupt(priv->rproc, 0); + rproc_vq_interrupt(priv->rproc, 1); +} + +static void imx_rproc_rx_callback(struct mbox_client *cl, void *msg) +{ + struct rproc *rproc = dev_get_drvdata(cl->dev); + struct imx_rproc *priv = rproc->priv; + + queue_work(priv->workqueue, &priv->rproc_work); +} + +static int imx_rproc_xtr_mbox_init(struct rproc *rproc) +{ + struct imx_rproc *priv = rproc->priv; + struct device *dev = priv->dev; + struct mbox_client *cl; + int ret; + + if (!of_get_property(dev->of_node, "mbox-names", NULL)) + return 0; + + cl = &priv->cl; + cl->dev = dev; + cl->tx_block = true; + cl->tx_tout = 100; + cl->knows_txdone = false; + cl->rx_callback = imx_rproc_rx_callback; + + priv->tx_ch = mbox_request_channel_byname(cl, "tx"); + if (IS_ERR(priv->tx_ch)) { + ret = PTR_ERR(priv->tx_ch); + return dev_err_probe(cl->dev, ret, + "failed to request tx mailbox channel: %d\n", ret); + } + + priv->rx_ch = mbox_request_channel_byname(cl, "rx"); + if (IS_ERR(priv->rx_ch)) { + mbox_free_channel(priv->tx_ch); + ret = PTR_ERR(priv->rx_ch); + return dev_err_probe(cl->dev, ret, + "failed to request rx mailbox channel: %d\n", ret); + } + + return 0; +} + +static void imx_rproc_free_mbox(struct rproc *rproc) +{ + struct imx_rproc *priv = rproc->priv; + + mbox_free_channel(priv->tx_ch); + mbox_free_channel(priv->rx_ch); +} + static int imx_rproc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -481,18 +574,28 @@ static int imx_rproc_probe(struct platform_device *pdev) priv->dev = dev; dev_set_drvdata(dev, rproc); + priv->workqueue = create_workqueue(dev_name(dev)); + if (!priv->workqueue) { + dev_err(dev, "cannot create workqueue\n"); + ret = -ENOMEM; + goto err_put_rproc; + } + + ret = imx_rproc_xtr_mbox_init(rproc); + if (ret) + goto err_put_wkq; ret = imx_rproc_addr_init(priv, pdev); if (ret) { dev_err(dev, "failed on imx_rproc_addr_init\n"); - goto err_put_rproc; + goto err_put_mbox; } priv->clk = devm_clk_get(dev, NULL); if (IS_ERR(priv->clk)) { dev_err(dev, "Failed to get clock\n"); ret = PTR_ERR(priv->clk); - goto err_put_rproc; + goto err_put_mbox; } /* @@ -502,9 +605,11 @@ static int imx_rproc_probe(struct platform_device *pdev) ret = clk_prepare_enable(priv->clk); if (ret) { dev_err(&rproc->dev, "Failed to enable clock\n"); - goto err_put_rproc; + goto err_put_mbox; } + INIT_WORK(&(priv->rproc_work), imx_rproc_vq_work); + ret = rproc_add(rproc); if (ret) { dev_err(dev, "rproc_add failed\n"); @@ -515,6 +620,10 @@ static int imx_rproc_probe(struct platform_device *pdev) err_put_clk: clk_disable_unprepare(priv->clk); +err_put_mbox: + imx_rproc_free_mbox(rproc); +err_put_wkq: + destroy_workqueue(priv->workqueue); err_put_rproc: rproc_free(rproc); @@ -528,6 +637,7 @@ static int imx_rproc_remove(struct platform_device *pdev) clk_disable_unprepare(priv->clk); rproc_del(rproc); + imx_rproc_free_mbox(rproc); rproc_free(rproc); return 0;