From patchwork Mon Jan 18 12:19:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 365526 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp2219978jap; Mon, 18 Jan 2021 04:33:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVai6u7pnv091O0yCHXAZKo8hjU9T9AyoYWPcy2ZT3uYQ6Mlleq1mKqK+eybnS8x1xG1vK X-Received: by 2002:a05:6402:45:: with SMTP id f5mr19092050edu.273.1610973209077; Mon, 18 Jan 2021 04:33:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1610973209; cv=pass; d=google.com; s=arc-20160816; b=N7pFCRgVv8TCm2yyjASA6p03Lx0tleuuPtpjRgCxYkJdWQnj2gX53sBeELpLG4YGns T/vIkPlainNqu7AjiWwosX6GY6qHbQ0rTSHAqeH9vbth02KBYISu2FtYOkF/0SElWoBa vqGfNWOqQIPc283cjboRZAC5f150AF4G5fat5YMxL517vjpYOMS10tEYHjBfjmo8XP3j hNmxBFgE/rEbyVVy3ST20c49usbDXdaOUaTAJtZAONXPH86nqydm2eBF7kiH+oceTxpS whLqNCBXyHENUUklRSwU7j43OK3E7vAw/vTFL14b1GOF65CNq8giOB+du4VXsuLWeLr7 Bn0A== 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=x/iL69KJyZnKa2PV90SniTiSw9lDJ6kayDxqnvrAfTBi42CzncsNeEFim95sPl88gf srhCXV6cyvohzfAgiGfB3IDZkIaoGj3U7OVPuWNGw645mXLRhWAnDLNv/8O3nk+tz52D 10q9Bdj3KJnsHvmtiHdGyjKY8L1uNM01dZYdeyJrpheYMEa18EPpz499v51dwaGP0NDi qO48O1RnqbN7xnGOQVJqlAMJhBFmQdYs6shzQdg4RudFLDx4J4EnfqBqX2oj+rRCNapU XyC0E9lC35Okgr302UYVhPZNDoFBjKzpSYFv72Vr86eai96u8NUr75+0W3MIljJbkFId JpAA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=rAA4dOER; 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 pk16si5154570ejb.114.2021.01.18.04.33.28; Mon, 18 Jan 2021 04:33:29 -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=rAA4dOER; 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 S2391556AbhARMcH (ORCPT + 6 others); Mon, 18 Jan 2021 07:32:07 -0500 Received: from mail-vi1eur05on2049.outbound.protection.outlook.com ([40.107.21.49]:57665 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2391442AbhARMbY (ORCPT ); Mon, 18 Jan 2021 07:31:24 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F86rSQxuIquM3Zw7895XyJHRO7Jbxx7Ze/SyOdwGC4dju2DSPY3bJUzWXdbhSGTqtK10wIJwcNpVoNrAeA41MdknFylTq9yhUcTxASLtxBbqUdMi5jKyPgoF/0k2GMhbG4J3pCCIifWiuJjTPIFOh8xi7dgcTgra5I8SQYAMseQzs7WrlxWaEyqhTbZE5YkEqFcJZqnCAkXf+eKpVN4XU4ve8Knk+yShlF6fVE4SDu7xU0q3VYnzJLjYBTbemLEUH0nTqHRzpue2OZkT+bKOv0k6cYP7h12K3ja1jFCF4QH9sEM+AdiOKq/XAZA2anF8Wgy1ImD5+l2oBHGb4K7uRQ== 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=D5AJGAcXV4MHr/a4NWjQgLlHkD4TfOw/gJDbdPzVpHFXprJ5fzOIxYtdWardtjm1BPYOtdD2uXEaFWR1KHYdmbDlMCQptKUOllC+MKwwHAhiZItisLnSKLs6f7I4lVK3ykkSElUFxHXpNNHLK7sUOq45iB4AUTe1jDnSuhbplD+SwcgRSRRD9dLjfkKCxzJc1JNEyoBIrEK2by6Ke3y3tTRr0F+HnSo8CDHdJhA+2UDndfuru3DoNh7hQMgcpP11ELqCerSZ57og5Sgqz65933BVf8MnjcPzSfOuD5246VIlx9DO8pS1hhHZXY9Va21+0kZz8hTXI1sjm3wf0Z9CRw== 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=rAA4dOERxGMj7m7VXMYVhvk2won8FBK23249/hFUifqowBvFoCHuNFYgt0JPWEIPLXodjGiIZ9QxageNwNxoqtm/sSVee/9DnHZATRSPeMKtYNICbMGF6Wmgo44OlFBooU6WzaCdP2UMZeH795Wylj4DE01/oQ4TeKVYEEXjQX4= 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 DB7PR04MB5243.eurprd04.prod.outlook.com (2603:10a6:10:17::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.11; Mon, 18 Jan 2021 12:30:33 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3763.014; Mon, 18 Jan 2021 12:30:33 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org 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 V7 01/10] dt-bindings: remoteproc: convert imx rproc bindings to json-schema Date: Mon, 18 Jan 2021 20:19:50 +0800 Message-Id: <1610972399-28286-2-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610972399-28286-1-git-send-email-peng.fan@nxp.com> References: <1610972399-28286-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR03CA0113.apcprd03.prod.outlook.com (2603:1096:4:91::17) 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 SG2PR03CA0113.apcprd03.prod.outlook.com (2603:1096:4:91::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3784.6 via Frontend Transport; Mon, 18 Jan 2021 12:30:27 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: dd6ac1cf-9344-4b44-1f7c-08d8bbacd964 X-MS-TrafficTypeDiagnostic: DB7PR04MB5243: 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: q5R2/ueOfny1UhGx/4h8f63NV0LbtEU3zzoTXhX6YtZibhyaN9E6AVmzfPPE4Lgr6shZuh87LxakxIgK+A8LUd3IBcNDO7TSEcz/RHFUifGqWssMoVxUoXvfYmXSymbvPWjX9xp3QHjgUowRQ3uHc79IDFcccrB6SrNNpzZy65sY5yFKROlN8rNdcHTojoc+2lp3N6gQdpaptnEI0CsynlMadHBCTuZsgJJmbosk5E5oRC7+nnYD4RnBrAudMglUiaTXcZXjl67zaZmzIiga4EcODY4R/fZvOUX32DmboWrNJeTH/6fynJZwhcbQqJvmK5I0IL3PcNL7xM3ugIriCs8j9eAwlTufN5VU6dyzhTjDsZZ0qclyordkhX+Ko7sLcmPIo8xdXZ4YhLmv4TXyA2rPY/rQQG/IvCegH0oYWQvCHLEGVbtzMDeurYbjvTciPW/VU3ZoDjR1L8qTc1dpGnh4c4bslqEuZqB96Cfz29rNYaHqkRAueK3BSRz1bcYyrDFT22VZ7bWLZUXPEb2oOw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(346002)(396003)(39860400002)(376002)(478600001)(6506007)(316002)(6512007)(9686003)(36756003)(6486002)(66946007)(66476007)(2906002)(2616005)(956004)(26005)(83380400001)(7416002)(186003)(52116002)(16526019)(86362001)(5660300002)(8936002)(4326008)(8676002)(69590400011)(66556008)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: jg2yNM48xNQk6XrOukv0HfUtEVMqHSoR8D+dzkvI2jLAqEWa7mj2u/xHA2JKQG1+4NAIahhxNGUiNYqp5H/XEaUO1BYtkXDtWLp5p+5rrJve1sOrnNjcM5yDT0Rau4rwnsnh3wKOI2RMbPhOn7i8TvcoZ13LRsNNyBW0Ra9EusQa9K1/39LnYBhSzjh1xSLffEwvEVJcowW3T32KjZEANvfd1QehKJX9M5tGdAQhjgO9OZH76n/ne3Xy+TTqfvJVdOVBhwtESdnYS/UDrUmS6wbwcLJcbH9LZlee7cTNWV7erihanJttljxW/P5WsF3to2dXRIE8kL8PNa5YEey+nXN6oOy2yytwC5V2jm/T4uUKD2/rjEJ5uLbimZz2vBtLXlD2e9+WlmhzfFUFYtZZGBnNlXHqnWDNRBMDvXx+Lj9eSZad1XTd4wRJrYnT5nUPGKWwDJQsmdIYUN7yq1NZ6+QzJ9AaUUSTvsyQMJ7Rwvso5hziS0YhK5TDLNHR+GVDfarXPOebVHq423YJC/qUFmJ+VTIf32pIdZUPHT5l48RZ66QUkYmYAeHpm2qV4KtoSt5jIaqlMu7ZQugnkqPQgwcnhLKK+zISY0M/iODryLWSXTgmIokjXVojimyhxlOBh2p9DAK+3XmLzkKtzf4YDFpaqW0+q+kdKV7ISt2Sn2CmfRXBZyIbPqfQccQO+9Nbz+DeTNLIUMG405f3bunJsrm8mGqXWSdEghK00iHRVbycf8Iz1Qx7GtCTg96lypQy+4eEG5txDn08nZzBGXh/CdoV3foHaTzTpd3zDSKYma2hw6VOubIevrPAOm2QYxOdCZWKniHddXZyBkPihZgeotYtl11TKmYqoQVPxZ5rWormXUwuAbbTPRpBIAq9RZT+CEF+jt3CA2NLuKH1Qk2HeLKq3q6kzDKh1brjaqOWxIyuJ42swoMWr1x6/5uuvpiQpU8vxjD7ayvNhkqEZqj5co2VCr4IJ9dVhhcljHR4DA9p/grFfw/+L0iaTvAWqvER X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dd6ac1cf-9344-4b44-1f7c-08d8bbacd964 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2021 12:30:33.2809 (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: JD5Hx674NgxoJR+DQN91VdUORBAQsd+3Rj/9fkBKzTUulw+0QESSFGiyJ5QQG3Eb3/+yD5KEVQi7p6gIq/PMjQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5243 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 Mon Jan 18 12:19:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 365525 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp2219034jap; Mon, 18 Jan 2021 04:32:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJwzJl1bKXSlgvlxLW5sDm2XslbP5K7UOZD/MB8ovs90v41IA9K1F7Oh/jl+9byw71rLcoYJ X-Received: by 2002:a17:906:5618:: with SMTP id f24mr17433192ejq.517.1610973123539; Mon, 18 Jan 2021 04:32:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1610973123; cv=pass; d=google.com; s=arc-20160816; b=FlX0f7zFYxsD6RNTUfNA62OgtaBnGhIDd5y3z9i0sjfFmiUrZmEkOWWPt99dDbH8qQ h4tf9J6Mq6avglntrhO6PVPW9z2YpBcGb0f1AYfGkGD3mifDsMzdbRS3XeRuXAp6llaK R//iEgeAoEUpjhLYS3p6dlh13FDawcOSo30sF92FgK0GP7vS4c8iOx8aJHGY4DAHdBgX 4ka8Myzw7ywNcNX4eC7O+NZ0sMqcaE7nxICuxSsxylA9d+y2RvFetwynujIKdjjfngaW KEgoAqgLm2IJpg498LU/cNS36FxZc+Fr5zG7bnuPJMh7ESM2G05mUpVwglMBASIu1e99 n1EQ== 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=gGWklfucubZLT1npZ4FeMANA4c13Qs73DoQs9qZxcbX10QqBu49ekgRTP3KOprH7QY BtFdRP0slTg7tkqQi88yod1QGVzPktLKByRKgDhm6UWNjA2OEygJExQgS7SpH55IvUS2 fD4qXG2UTty/y7pSfKGaMJdS+v/NMNwZlvFRr4tE79nlQQxmCcyqRi83DS5kLxzN46s0 gBKHNzx/OK4VdFHIHrJ+WTE/Dluo3skcxNE00rZzX+gHwA4Kmceo6Rxn/3oM36Hziiz/ ityn7IH3uN0bpRNBdn0iskzVII1pytNbYzgP3H2q/l3dGNPY/SVJSwvPr5t84O7UMKUw Z82Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=q70FuXpG; 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 hp13si2466990ejc.593.2021.01.18.04.32.03; Mon, 18 Jan 2021 04:32:03 -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=q70FuXpG; 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 S2391553AbhARMb6 (ORCPT + 6 others); Mon, 18 Jan 2021 07:31:58 -0500 Received: from mail-vi1eur05on2076.outbound.protection.outlook.com ([40.107.21.76]:14624 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2391551AbhARMby (ORCPT ); Mon, 18 Jan 2021 07:31:54 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fS3OksHj3/phYPqK7RpV/EJsqad5x3J+04t3+u1NtoHT4uTSv6vjcD8+uBIvsZ/f0PsWlsjfcIjQVCI5pnrdmZ8it/4aMfBWN7kMOvc3Vtg/UqJH/m9Q5qa0YZxfTO2AS9PqhlsWLNjBi8wLL8fCI04chVrcnyrlpYCeu6kVrhnA+uMaGUmIZECKE3FwVBYbqZ7i5sN4xCiuBKQG9Acb8HVRVhAap0viQ0ZIoKecmNKyldC4Ik9ErSzMvogmrL7+7Fa0wNS17PsL5ZcLKvY5MddTCbIs6kCVeaKGQGZKjRUVbhqx6wOXOXTPj/ed8aY9/9lViUluBD6ASAbVHfsftg== 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=AweH9/i1o+gCSOPNXSlEGuavvLhsT1VJUoY8qrzxoWJTfHeU9llLWWlQ8brtRAj3xAeXNvOwo27zizWMEcQvUQyO4IvA3uSL2Q0QWX8FBY8EFEInHTYF0k/DE1qQm4e0eQARWBAFyGlm6yzR5JmmAOUY8cW/3TBeRlEQyzEkaZtrARBMm/1xOk6OFmt8PGxQ8Zt7xoHoajkMjx2kDU+QYB36TBfqKC0Br9VmvLX8p/sOL8N+eeYgGVWlutymB0epJoPJtJr0VE10iX+NxxQO7050m4RJI0pZaS2aHrqaKVfSfJf83jl/acnHhHcMdVq85h27/RK/9BUWaDt0MHa98g== 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=q70FuXpGfabClcWeVpGS8CkVYHtacNDMXVlzVo6yPiJ5gxG4wX/Vg4puH746WZQxZ69wd+F2BX5ph/28r5/JHlPIrZ8eFc3BCEsoDi2aFcxuoK9PdvBGxfY6hNh8fBQdpCTiOwneh5GYKS4pfWNOy0ndlzwKHJf61vQX3LMQrm0= 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 DB7PR04MB5243.eurprd04.prod.outlook.com (2603:10a6:10:17::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.11; Mon, 18 Jan 2021 12:30: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; Mon, 18 Jan 2021 12:30:38 +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 V7 02/10] dt-bindings: remoteproc: imx_rproc: add i.MX8MQ/M support Date: Mon, 18 Jan 2021 20:19:51 +0800 Message-Id: <1610972399-28286-3-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610972399-28286-1-git-send-email-peng.fan@nxp.com> References: <1610972399-28286-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR03CA0113.apcprd03.prod.outlook.com (2603:1096:4:91::17) 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 SG2PR03CA0113.apcprd03.prod.outlook.com (2603:1096:4:91::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3784.6 via Frontend Transport; Mon, 18 Jan 2021 12:30:33 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 20aa71a8-065e-46da-d4ce-08d8bbacdccc X-MS-TrafficTypeDiagnostic: DB7PR04MB5243: 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: Ruet0TPdZvdh7X4o08i7q20xpsQmGUNx4QayNY/2skMDWAsOEKOOODbikucqJLd+/hYXuneBiqksy05VWyaoedwoYwQC/1+OnX9hWGfvrGJI+w0QUL5O+vV8XGjF/Zam9uWLoRRK8EOilMZfQOQyEinyhHPoLd930k3juh5RxxAuwbYvlVD1V564dsrX9ENG9VARniJMOuiJpB9XZ0QX9mOBcjDAR52CvDwFjcyQCr5FukPeDWsiXkZkcLN0nLuet/S8so92cADvCsELa1eTGC9n4UV86BTPqWCOnKP+hFeeDJQRSzPdtyOU2xi6bCut7pPUP39aL5GgCf1jg8mhS2R7okAT6Q93aPVg8ezOS2cyvzbobN8LtQEqr4/RmcRMdA8VglcT6Lw1zPVp+HhWhWHtzaoEtXsMrH6IHGkFI2wBVVYLBi6TX5M/yRn9F8LjrkxOo5msxC+E4MxpP42ggQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(346002)(396003)(39860400002)(376002)(478600001)(6506007)(316002)(6512007)(9686003)(36756003)(6486002)(66946007)(66476007)(2906002)(2616005)(956004)(26005)(83380400001)(7416002)(186003)(52116002)(16526019)(86362001)(5660300002)(8936002)(4326008)(8676002)(69590400011)(66556008)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: dkE71XcXOcKtcXpinGpJUqOSRvkuF6kWFaJyr+iww3xKpupLYqtkneOfTsjp/yOzxS34Dxmv5108/Fp9rUheWY6LR1jNjUhuhQgRRu86Nb/yCUJSwn4PC3aJkDHiD5Vq3QipnCBIUG0Fg2EJyepmFEuBS3QCa56Je2eocGez947jx+uESTw5gxS8UK2rgN59eHAYCV2NoSypB7R7Fsvz5WyfW/O0HtzSCv/JmjzUxUiceC0RehQIjCpy3BRtaUOl1ZSzrznOgQ5eE3mPK0aXPoZKJ9D9m3/DZNVW6fLZMmPoNAbV3tZ9nh6akv7Osw88uD8uBmO33JVA7KmXLNFuo6+kGQOr/n9sR5gX5XMqTLXo96P2VBo7Fs+8i1mTRKiCS4Xj+qIbAj82i2q0OU8mnQTICLB8kmjkT68ZlyWNYPRyHMtkQKu1fqBSlmI2MWVxuU2vwxIHc7tDtZNQjAh6c7Tm+7tGBBD9ED88hC0wK3d+OKsiAvDMsdUDeDywm8tq5ja7+O/n5aS6IU3DBN9IKRj7a+sPN0qOlYUZ/vXYcK7bs7PH1VTdKpCWdo+bPyK5ZZQq+zM3MEOowkL5GYYBgi6FB8ANirz5dfVcqkkkFBqXHqL4kQI1Ra0oVH6jr16lo1vhizQclBxVKwj33gawH6vFxUfNar4y5iPtWQXjSlcQijmSjKEXS6QB9X6fR91banVrR/5x1ZveB04lBfoO4umunGpYdIPBVfVHMhzpZ03APiw4J2eDxuEtXgYKqYPX9edvVxc/fHFGFjTcp1t+OJS8sACvddhOTjE5zXsky1I8asFg+uPWmXWcA2PjYxW7qi3OcLqoiMFPL9W8HViSWIaMeo9YaR6q+wSZm6D/bUfQfAqwQAdAO1gyh9/HlKn+3beU7oxQJwSsP8X9ZqUa3en6XFKLBIjR8NatGjw+nUsV+jsvu6pz88bPPirLZFl6K9DgTR4x3Tx4HWRqaXM6+yDyBhg4/Q1US9KLvkIoyK61Jik1VQf/DkbJEpGicpxr X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 20aa71a8-065e-46da-d4ce-08d8bbacdccc X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2021 12:30:38.8324 (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: 1jqO1qt3/vY0EqzrwQOM7MiAP4oyySuhgUQ0rngsueEqpytE7XzTEeLld29g9ilrWuaB4D+mEP0P8TSy95+itg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5243 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 Mon Jan 18 12:19:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 365527 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp2220013jap; Mon, 18 Jan 2021 04:33:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJyH/DmBgb3WRO0gufUf+MmkfFgaQlb/uhb10MVElfQyXyx5HBgjhwy+aDZiRTzp8V8Bn8Cw X-Received: by 2002:a05:6402:1c0f:: with SMTP id ck15mr9868919edb.171.1610973212483; Mon, 18 Jan 2021 04:33:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1610973212; cv=pass; d=google.com; s=arc-20160816; b=zWfU0aIHxQW0ytDpDmOvp9Tc7fx50wSe0CXPrIunfcVhd73tXQUH0b6rzEz0eAocxi NdBeN4xy8LhgR2k2HJgPVT7yE9SHzXYCOsIhqbfHklncvvEh/WTPzA2y3Lv2RRqNc5Y0 9K4Ux8tzflpoQ38fbcuvBN7oOJ2btINvPMmGufgAiDehyxwZTDV1lSvyiw/dJgJe1UEe CTNStIKLWULMTtDF4I1/b1KKO9/mpb/T+kXzhC12go95OQ175tiAOC01jEFbHCwQsi69 mb/Dxmn7GMtR6glw2lcKcSDh357FQ6fWEyWzpAB08io7+hFkRlsqfeTqHFz3THY4COHR f4Dw== 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=Tw68c4/gM1jRTIu7sFMrjwlg7zNIct42dOCiC6LOdQGgifYEDl2c7mHFC2sUq2o/y6 AD7rZmCYnxPqXqbpDGiKDMHTJ3Hyw6EVZFHWpX6RXSsRy1q5yLLT/Y5hdbgUe+TU5iFx 2BxCXRW0V4vUbtROxnCalNQdyOaNylqyWhywVRW7JhsyZA/owFKw1bLkaY+CYQAGx4Yb zdcP3lw1gvJB3SB/eyZjvXvnY6h8BInNqFfEa/U70P+O6PXj6EHjiBHNLsgUtmUYiNej dN7eNlvyr6XUFKfAlTJNRzFTtRaPEEDekzLDeuPVeXc8KSeqa/0eci3PVP1PVpQQZ9KO vPlg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=keIU8fTu; 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 pk16si5154570ejb.114.2021.01.18.04.33.32; Mon, 18 Jan 2021 04:33:32 -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=keIU8fTu; 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 S2391568AbhARMcT (ORCPT + 6 others); Mon, 18 Jan 2021 07:32:19 -0500 Received: from mail-vi1eur05on2055.outbound.protection.outlook.com ([40.107.21.55]:54049 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2391563AbhARMcO (ORCPT ); Mon, 18 Jan 2021 07:32:14 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cf/rPmM1K2nhMlmTCxBksxLQ0NNMRhpJeprVTvWuafxxtNufQU1TiQqnmrx1kIXeyfqSr47U713Q6DIeAbw34ScZbdUNvZwSiqVF16s+1a2oKVvez7AD6DMngZZlDe9W8NfcK4gi1CJ9gMOZ/+9OvxgYFtACt0idu5bEL3yyI4gibXAs8g7/mAawTRHf/X5qC+yrme47B33mVzVteb/VCZ/OL6JVfx3+M2H2H/7n4VeaLHzbUnIXnxrg1OULr4Qziry7iGYI9W4lcHO4Bn4rHY7I1GXUni1qwjeO0/PAeD6e760XcNxSShN50kcVW7bbnOJX0TjYlMfGg+Jm0ciXjQ== 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=WXZudrLO9ATpm0kD7dDGyEhOSGq4dbVpvHP8JxBYNJMvqeuPjNh5FtyS6znmuqmX6a8YYbEoQ3IQMCAC4USOMDoNCRdO2P2yRKGiAYbd0LvuT4x3wnhwx6jJxGUsyEHxIF81dTXBKKFN17uj28g2tZiF7j0K6iDud7N5gOeKQ/ZeUJQiAeLwzwC+st2GTkaiJU2Z/l4JW/g0FhlJfGTWCYlm0R5lmALfjdRtSlgV0q/CkiDrsSfKurd4ylJNf0XQP29+djSFK4PSTpo8/jjUEDhWf5hTjtiymP9oXCMHyGxLIQcKMECgzp8f4ePwNSOQEGWrHQqFW9A96tQ6exkwBQ== 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=keIU8fTudSkWIJQsCVznpWIDLLb123YnJePdPESz/vQRn33EQGtR8+LBgACVya3F7pw0aMTxuUuNMQbQpN9JR7nh16E4wvpJ5igCWNv4+vxnowxI2unJXlkuai/GY8A4NYlcjVLdK4X6oTuebClyHmgEWXevzKXWYSzQ/mN8dfg= 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 DB7PR04MB5243.eurprd04.prod.outlook.com (2603:10a6:10:17::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.11; Mon, 18 Jan 2021 12:30:44 +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; Mon, 18 Jan 2021 12:30:44 +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 V7 03/10] remoteproc: introduce is_iomem to rproc_mem_entry Date: Mon, 18 Jan 2021 20:19:52 +0800 Message-Id: <1610972399-28286-4-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610972399-28286-1-git-send-email-peng.fan@nxp.com> References: <1610972399-28286-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR03CA0113.apcprd03.prod.outlook.com (2603:1096:4:91::17) 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 SG2PR03CA0113.apcprd03.prod.outlook.com (2603:1096:4:91::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3784.6 via Frontend Transport; Mon, 18 Jan 2021 12:30:39 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 9fbc4444-2138-46da-d4de-08d8bbace01c X-MS-TrafficTypeDiagnostic: DB7PR04MB5243: 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: wCUNJGoEJMsagZ5r8EvmpoLM+HpA9pi8/X5jVxByshjPKAXue3Q7dwz19GBFo6mukbCwBi5A9yT2BZjyNQQl70PpWAT8Oq6c6Hv/i535f+Rr5W/96lC8WaC9x3HM451ZK8kEddBJi/76f4ZGeCp623jKcYFM5jw8AzF5QeK2H+QkewSJ7/LXF3rX185pIKU5nqgBnoRFOLHh05G+O/QzdcZjfvhUN48VEhvYEQUq3Zsw9+GIkfr2aU3TeOB9SlG6pRmeANEyyv8G1wQl07Zryv5gOfIdLR+KTwAq16Fw8Y2dPZyDwyCO7rJVfVDaKyYtBT/MUgVF6+gj7RGJf1umn6fTgUXnEsjiCqpUAhtU0fPqm4SDFXGIU/AD6T722BiYVASbdm6JxYFYPURRbqktFUPw5isvDox9kYZBrn5ln3M8s0py7M22whHkolpj1kUNiGPgzQMXCfqoxg/pYuRrqg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(346002)(396003)(39860400002)(376002)(478600001)(4744005)(6506007)(316002)(6512007)(9686003)(36756003)(6486002)(66946007)(66476007)(2906002)(2616005)(956004)(26005)(7416002)(186003)(52116002)(16526019)(86362001)(5660300002)(8936002)(4326008)(8676002)(69590400011)(66556008)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 1Y4wMl0heQ6z9uX1VrOcqKSxNXhdL05XMH98gpIZGE08hg0JYsXoUCLghHoPlK50XDe/QZNYuFa0DTu/InwBxxUt3V6NzuiuKrN7UTrwMhn/gUe9XjE6e++hmqQCmAJJvSSiNq7KqRV4RsCYZK5kcrP+sybq+fZPuP+UGTchp+bXMHi9ns8523i7ATXiuy7eW9M6DdqoUAdY/WTGnR/hE2899cmHw1wjhzxpv+vODdmok4syLEdOGgkyfOU+2gkNYzc0Kfw+oNyD+RpcJvDdkKMBAWJ13m78svrBDnuMbLMPuclKgpQQqq7uuHa4TkMbTeqqOw0L/iOkBTYcF7QN4wpCa6WgdjGwt8nwmGffjlmb5N3vY6u6a/AozeCwR1AAuCpWDyPycJBpu13tVtXMwbOGVYwD+kMgw+nVQfSLOH6FbYq4OkgzLPlEl5xXMxtBalQylOwBLlWqP/HPtXuB5VDpQAHhRfHE3oPQPTwjbBkFAgozK8vSHqdi6rsKxK1AJv7t5F3ss2tuvaPbphweoQsDTgHgMSxu8+EscghsIw093nli8IU1f/BZDJ3BEfb/ehUXe1sLDmVbh5LFUZU4cTUfj5G53m49EedFK47gNYytH5Ukq/j/BEzAQYjKKSk0Ra0blGrP2ph24OCp+kTeANmJe15zL4qFLz+NwyMhfTQ/2i1zUeGNl+gnOujzu2fAuGX5Vdr3nuiaikzR4FZjTwSci3Otg+zQzfrw5+azy3sJZAJtck5N4sEtCFaZL5X76fAslj+OEjyRKC7ZAqEBH65AOu7SU19QV558fsUC2Bw3U6SFZ1GgJzXmOXZvl/1fWImfl3JzTn5cejJtZDAvwSZB0fdGcJ7Pq7KKZk2oifMNQfF29bberMO3KwLg16r6bRTz88mCoy0MyGQFcYrMLJjdcvy8rWeDQY8V8n05E0y1WExCDKTZ8nGynCbpEZWwcS07dA8R5FVdMmNSvWU8XoAqBYmH2YEBwBz882iBKglbckzIvHMtxVMmbl5uVgWz X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9fbc4444-2138-46da-d4de-08d8bbace01c X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2021 12:30:44.5818 (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: f+VwGUkRD5PRCJ37M3yE1Eq01ROP5Ehi0fNuc76ng/zpjqS6J8vLt5FCsLWuooB/0/FUxV46W9zYZ9eCpaoE+g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5243 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 Mon Jan 18 12:19:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 365533 Delivered-To: patch@linaro.org Received: by 2002:a17:906:fb05:0:0:0:0 with SMTP id lz5csp2734855ejb; Mon, 18 Jan 2021 05:11:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJyMJTkFiQonEJ/kJrqzbzhSKyZoiRA5b7f/z9Gb7hi0zdZnZu2EWK6TytYLqNtJ2N4wtLwX X-Received: by 2002:a17:907:1701:: with SMTP id le1mr17840094ejc.68.1610975494628; Mon, 18 Jan 2021 05:11:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1610975494; cv=pass; d=google.com; s=arc-20160816; b=VepASu2Bv30aQrzMxnXRn3gWeYavAeo4QTSxPKfuDFWD5iJIbvhORvqdRcekiDalUW OEkWqhUez30ldsEuE6G53OC4qyxLtSMBQVTJbatp8YGEbMW51NzPLylhVGMH+4KmybjT +1ZV9ayHuka40hMJ92Ynr7nnRiOV+2+A7aJ6TrT0VQ0vvor7LgKx4A5HkAbGpiNMJoOF FJKVUeSoLOUqllRKVyOS8HSPvFaNLoPBFksmvsF+B48dZPs2X7ncCGkWG0CLH8IwNGSg tnhGXHT/RiHDevfG4zl4nimTPEd33H/JFwgdBwls1pfWEon8dQxMQUSELf2a+uxjYStb 4Urw== 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=vtZtops3hvO5yjGuRqRKHcbHh5lIFlrYJgW658a/xOI=; b=QcRdxfTrt47pCN5t0VTh+Y2Q2pXrfGGFUEZRNj93DslZm8plem8Gtq+ewbn0+kalyP huz4DKNCOouMWGPUovwNEofZKXCEta9zBAttUOqXx/FMXP0a17lQklrzq82BGrqBOOKV tq6F7FNNEzGFxIQp2WS37PAOfFpTQF7r7ZUCsUad4cdmWCirXvDxaikthIB+fgq+wPQ8 qTOjEDSU9l8Dr8ytKEz+67Xzj1PQmBNBFjkiIefWFvXDUyAWvc0vjKSOntCPlOlzzEJe v6nJE2iLwgBxBq2+jM2RwR6+ZD66oj1KpBUq4mBXZ4X6e23IM0Tu6OqxcCziUvgE4ZBv PN3Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b="W5t5VB/0"; 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 n25si7804259edw.77.2021.01.18.05.11.34; Mon, 18 Jan 2021 05:11: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="W5t5VB/0"; 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 S2392012AbhARNKW (ORCPT + 6 others); Mon, 18 Jan 2021 08:10:22 -0500 Received: from mail-vi1eur05on2076.outbound.protection.outlook.com ([40.107.21.76]:14624 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2391566AbhARMf5 (ORCPT ); Mon, 18 Jan 2021 07:35:57 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DD1FiKHNn2Rxgd3RUqQNui3Mgn6bl2tnRZ1qTb54GZgn2ZgdSlgDZs/y63t3HqoUOMbOz/lC+Ykl5vcCtxX5CMOcRRgDO/jObvgoxIaf/USbwG7r7l9zpdlD4roP6zq/YlkWF1/8Bz2fMgC5BYJzIZnKDtHeBUuxgn6j+p7LLExCECR7MtHLHJTWY41KadcsF+O0T4fEWvNAha6ooJ5nvN1/3d6CabxjbOBfOQ7ibVsYkj5Th1MjuwSjdgQ5Zq7osMQAblV+F0NxaC6j/C6V0EHK6ZUHU8QfvjCuHKBL6ZIRjqsGrgtOUCP6cA2XAF/scOVjpg8x8hWdwhwfaLblXg== 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=vtZtops3hvO5yjGuRqRKHcbHh5lIFlrYJgW658a/xOI=; b=K9hyPrr0oWXxNYE2GqzRk3t9ML8IUhpS7LdjqVEcxXoWl5RuCAHZxNt7P4lhtM4Dj9uOFxIL04lrwI+eN5A/ia5EZfMJk4aFt3xOnLdqEIBU/Zt7c43h54vzbvWj1J/NaHw66AmMtn/F8pTsEYhjAHKiZr98VXoionvonepfeHIP+KCXalp37jxfhsYnr+sk19HLcnl5E3jMEvHJFZCBK4JuJuW5V4BZb1wYImBw2u1+h0jpXeM8p0X2ku2OgJZR16GXoalGqYYujX5sZn4SZATk5qOKm+0ATJrxde4McqDRRLupkN3Z6xc/P1RBzhG/K/kRgmrJYcuA3iaHSEn1rg== 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=vtZtops3hvO5yjGuRqRKHcbHh5lIFlrYJgW658a/xOI=; b=W5t5VB/0jWMTIQpOIDv7vbaYxDqfCY5UmZnSGNgd17a+A8QlD67dDuXmxDdpNUphpnTVMEI2vQ3smIrbxHs9XL4pomi8FCJzG++z4W18mq+xuAgFGttUsPB2bb1q6Bf6O7kNmAnImp7gWzNUg2x1lAdmlyFpmgQVHQ9cfF1UO4g= 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 DB7PR04MB5243.eurprd04.prod.outlook.com (2603:10a6:10:17::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.11; Mon, 18 Jan 2021 12:30:50 +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; Mon, 18 Jan 2021 12:30:50 +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 V7 04/10] remoteproc: add is_iomem to da_to_va Date: Mon, 18 Jan 2021 20:19:53 +0800 Message-Id: <1610972399-28286-5-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610972399-28286-1-git-send-email-peng.fan@nxp.com> References: <1610972399-28286-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR03CA0113.apcprd03.prod.outlook.com (2603:1096:4:91::17) 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 SG2PR03CA0113.apcprd03.prod.outlook.com (2603:1096:4:91::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3784.6 via Frontend Transport; Mon, 18 Jan 2021 12:30:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 64863efa-1d03-4aa6-a34b-08d8bbace39d X-MS-TrafficTypeDiagnostic: DB7PR04MB5243: 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: MKrrlWWyb7Z6SllSVRX9iq/F3C0FtubAehflBNgR2qq67EcekD+Eq3MoxgIK044YT7JyCn2CYJh2yTn2iTdBcI0iJaYgOo6k3L9eD/reeDTobzcXdqqhIxv/TLl7dsDtUkBI4uENKPH9dHtR+x+GFN2Ha2aP3xd+4U3zZC5THzkic1b7nyQkytzSl0S/RmljytAgRWnB9KHhJxYA3GfRZuWvMTol2A1oo5mfH3UyXzJMUYbXTPFF1eDoQljSR3nsbVbL4eGsx4J7ay9+rjg5nIh0fk2FA9j1r5awkZ3W8srE0G/DEo1pqxnfweV55xMXPYj/tf0r7pxb0buQ+mIeWXqhuXoEU4/SJRhqehRHDK66dksZk3ASXNVUj4iepwRk5XwcJ4SUy2NIbgLasoUE6CF38MHscuay2yW8KFbparW0Z2QCsVR/QLsce/6132Tr9EFSq4syNM3L47XQ5FLUEw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(346002)(396003)(39860400002)(376002)(478600001)(6506007)(316002)(6512007)(9686003)(36756003)(30864003)(6486002)(66946007)(66476007)(2906002)(2616005)(956004)(26005)(83380400001)(7416002)(186003)(52116002)(16526019)(86362001)(5660300002)(8936002)(4326008)(8676002)(69590400011)(66556008)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 08ICf4qFBW9Mehh9u58mfh6WBqnU2IBXehgngQXqvnzc49298lVrQTQ0WEHIONJcDUmsc6zmHuRRHvvBhxM3t+8MBrUyu4alE6fuTDYU401qcEXDYeyZdhUFX9RTFfhqeBJrlc+5DKzVn9q8FFe5d2GTQdt87f/U6rtqWW8Wnos7B+ZHLuZtlzagiSyEY3iXMSQRbW2sDXZMbbdgcYhZX3EPWy4xDytHalWKSXo52UwVELizL61RxAhrEzAWyqlvCM2HCYfMd3vUsN6JsAfwfB6Fzwvxsco4hr/pMSThWkBzkb/FDa3I4L+v5H+ZT5sUhUvFpEy3cEiAhisY2aqbO81M85248YdiWAvu/fQyiZzF+JOANBozwNa9aFHg02JwtJ/dk4kmyn61XUku11YvlBZoXIenqprH1sbrLGNvk2xO9m08pgG2OZri7qvNlAKJUGjwT//ZXu1VhMXRY0Y1lcaPxHQ9pLCkkelXl76CGyWzDBRknjXlmUNt2ld4CF3LfLtWQob3a5meqUhkwSJfIUVKtFxwRUoLp3AhbmvYte1wbfe1BSNuUlOOmOtp9zpsQy87j3iiHYc5T1bdhjaZFfz5p7jDrGBrUD7C19K81P2+GNzyBGtvapAxAUsPCpAuyuf+vpKBwbEqX7dvarhREH0pWUttiqCkIbN3sAOWlcSPElCXbAq4zBeUZLPalTwmbGHwQ1IHJ++26nEpH7Cjm5Iy+rUVX8QxBxXrB5EvknP1exJ9+fgWqBS/6hk0+GTPHQcXjwMRUvLezoZam32qQIwxuobVG0CwDC+ZkJBzgX1m/UEn8Pz6FJ8+O+51xypJZutgHJOXJpvWFJzQBOqHItNBL374nzB2uEzNOSP8ZlhaoMrh2oCFK4M4d0GxNWGMb/4Jm62lE970Wsst/5yLYQT8LyUSeIaSR6MmnFlI177aQpZQHoSWEmXYlGHZuCtigxN0LsQptFMdPjzhU6EOCHqYSFf2sNXfbQBGPb9Sctt73+r6lBv1eFDbupU3JUvf X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 64863efa-1d03-4aa6-a34b-08d8bbace39d X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2021 12:30:50.4131 (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: YtSgPNFnHmfSpXR3Zn6v0UK4jMQWZ7CGqVowIMPErP9dOHIHV8cdE1ewC04XFdFyABnjF/NeaoX/aeg/12ZyoQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5243 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 Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier --- drivers/remoteproc/imx_rproc.c | 2 +- drivers/remoteproc/ingenic_rproc.c | 2 +- drivers/remoteproc/keystone_remoteproc.c | 2 +- drivers/remoteproc/mtk_scp.c | 6 +++--- drivers/remoteproc/omap_remoteproc.c | 2 +- drivers/remoteproc/pru_rproc.c | 2 +- drivers/remoteproc/qcom_q6v5_adsp.c | 2 +- drivers/remoteproc/qcom_q6v5_pas.c | 2 +- drivers/remoteproc/qcom_q6v5_wcss.c | 2 +- drivers/remoteproc/qcom_wcnss.c | 2 +- drivers/remoteproc/remoteproc_core.c | 7 +++++-- drivers/remoteproc/remoteproc_coredump.c | 8 ++++++-- drivers/remoteproc/remoteproc_debugfs.c | 2 +- drivers/remoteproc/remoteproc_elf_loader.c | 21 +++++++++++++++------ drivers/remoteproc/remoteproc_internal.h | 2 +- drivers/remoteproc/st_slim_rproc.c | 2 +- drivers/remoteproc/ti_k3_dsp_remoteproc.c | 2 +- drivers/remoteproc/ti_k3_r5_remoteproc.c | 2 +- drivers/remoteproc/wkup_m3_rproc.c | 2 +- include/linux/remoteproc.h | 2 +- 20 files changed, 45 insertions(+), 29 deletions(-) -- 2.28.0 Reported-by: kernel test robot diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 8957ed271d20..6603e00bb6f4 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -208,7 +208,7 @@ static int imx_rproc_da_to_sys(struct imx_rproc *priv, u64 da, return -ENOENT; } -static void *imx_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *imx_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct imx_rproc *priv = rproc->priv; void *va = NULL; diff --git a/drivers/remoteproc/ingenic_rproc.c b/drivers/remoteproc/ingenic_rproc.c index 26e19e6143b7..bb5049295576 100644 --- a/drivers/remoteproc/ingenic_rproc.c +++ b/drivers/remoteproc/ingenic_rproc.c @@ -116,7 +116,7 @@ static void ingenic_rproc_kick(struct rproc *rproc, int vqid) writel(vqid, vpu->aux_base + REG_CORE_MSG); } -static void *ingenic_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *ingenic_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct vpu *vpu = rproc->priv; void __iomem *va = NULL; diff --git a/drivers/remoteproc/keystone_remoteproc.c b/drivers/remoteproc/keystone_remoteproc.c index cd266163a65f..54781f553f4e 100644 --- a/drivers/remoteproc/keystone_remoteproc.c +++ b/drivers/remoteproc/keystone_remoteproc.c @@ -246,7 +246,7 @@ static void keystone_rproc_kick(struct rproc *rproc, int vqid) * can be used either by the remoteproc core for loading (when using kernel * remoteproc loader), or by any rpmsg bus drivers. */ -static void *keystone_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *keystone_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct keystone_rproc *ksproc = rproc->priv; void __iomem *va = NULL; diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c index e0c235690361..535175f013e4 100644 --- a/drivers/remoteproc/mtk_scp.c +++ b/drivers/remoteproc/mtk_scp.c @@ -270,7 +270,7 @@ static int scp_elf_load_segments(struct rproc *rproc, const struct firmware *fw) } /* grab the kernel address for this device address */ - ptr = (void __iomem *)rproc_da_to_va(rproc, da, memsz); + ptr = (void __iomem *)rproc_da_to_va(rproc, da, memsz, NULL); if (!ptr) { dev_err(dev, "bad phdr da 0x%x mem 0x%x\n", da, memsz); ret = -EINVAL; @@ -458,7 +458,7 @@ static int scp_start(struct rproc *rproc) return ret; } -static void *scp_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *scp_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct mtk_scp *scp = (struct mtk_scp *)rproc->priv; int offset; @@ -587,7 +587,7 @@ void *scp_mapping_dm_addr(struct mtk_scp *scp, u32 mem_addr) { void *ptr; - ptr = scp_da_to_va(scp->rproc, mem_addr, 0); + ptr = scp_da_to_va(scp->rproc, mem_addr, 0, NULL); if (!ptr) return ERR_PTR(-EINVAL); diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c index d94b7391bf9d..43531caa1959 100644 --- a/drivers/remoteproc/omap_remoteproc.c +++ b/drivers/remoteproc/omap_remoteproc.c @@ -728,7 +728,7 @@ static int omap_rproc_stop(struct rproc *rproc) * Return: translated virtual address in kernel memory space on success, * or NULL on failure. */ -static void *omap_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *omap_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct omap_rproc *oproc = rproc->priv; int i; diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c index 5fad787ba012..8df99318f18a 100644 --- a/drivers/remoteproc/pru_rproc.c +++ b/drivers/remoteproc/pru_rproc.c @@ -483,7 +483,7 @@ static void *pru_i_da_to_va(struct pru_rproc *pru, u32 da, size_t len) * core for any PRU client drivers. The PRU Instruction RAM access is restricted * only to the PRU loader code. */ -static void *pru_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *pru_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct pru_rproc *pru = rproc->priv; diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c index e02450225e4a..8b0d8bbacd2e 100644 --- a/drivers/remoteproc/qcom_q6v5_adsp.c +++ b/drivers/remoteproc/qcom_q6v5_adsp.c @@ -281,7 +281,7 @@ static int adsp_stop(struct rproc *rproc) return ret; } -static void *adsp_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *adsp_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv; int offset; diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index ee586226e438..333a1e389fcd 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -242,7 +242,7 @@ static int adsp_stop(struct rproc *rproc) return ret; } -static void *adsp_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *adsp_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv; int offset; diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c b/drivers/remoteproc/qcom_q6v5_wcss.c index 78ebe1168b33..704cd63c9af4 100644 --- a/drivers/remoteproc/qcom_q6v5_wcss.c +++ b/drivers/remoteproc/qcom_q6v5_wcss.c @@ -410,7 +410,7 @@ static int q6v5_wcss_stop(struct rproc *rproc) return 0; } -static void *q6v5_wcss_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *q6v5_wcss_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct q6v5_wcss *wcss = rproc->priv; int offset; diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c index f95854255c70..1bf60dc84f69 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -320,7 +320,7 @@ static int wcnss_stop(struct rproc *rproc) return ret; } -static void *wcnss_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *wcnss_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct qcom_wcnss *wcnss = (struct qcom_wcnss *)rproc->priv; int offset; diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 2394eef383e3..9bec422ccce3 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -189,13 +189,13 @@ EXPORT_SYMBOL(rproc_va_to_pa); * here the output of the DMA API for the carveouts, which should be more * correct. */ -void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct rproc_mem_entry *carveout; void *ptr = NULL; if (rproc->ops->da_to_va) { - ptr = rproc->ops->da_to_va(rproc, da, len); + ptr = rproc->ops->da_to_va(rproc, da, len, is_iomem); if (ptr) goto out; } @@ -217,6 +217,9 @@ void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) ptr = carveout->va + offset; + if (is_iomem) + *is_iomem = carveout->is_iomem; + break; } diff --git a/drivers/remoteproc/remoteproc_coredump.c b/drivers/remoteproc/remoteproc_coredump.c index 81ec154a6a5e..aee657cc08c6 100644 --- a/drivers/remoteproc/remoteproc_coredump.c +++ b/drivers/remoteproc/remoteproc_coredump.c @@ -153,18 +153,22 @@ static void rproc_copy_segment(struct rproc *rproc, void *dest, size_t offset, size_t size) { void *ptr; + bool is_iomem; if (segment->dump) { segment->dump(rproc, segment, dest, offset, size); } else { - ptr = rproc_da_to_va(rproc, segment->da + offset, size); + ptr = rproc_da_to_va(rproc, segment->da + offset, size, &is_iomem); if (!ptr) { dev_err(&rproc->dev, "invalid copy request for segment %pad with offset %zu and size %zu)\n", &segment->da, offset, size); memset(dest, 0xff, size); } else { - memcpy(dest, ptr, size); + if (is_iomem) + memcpy_fromio(dest, ptr, size); + else + memcpy(dest, ptr, size); } } } diff --git a/drivers/remoteproc/remoteproc_debugfs.c b/drivers/remoteproc/remoteproc_debugfs.c index 7e5845376e9f..b5a1e3b697d9 100644 --- a/drivers/remoteproc/remoteproc_debugfs.c +++ b/drivers/remoteproc/remoteproc_debugfs.c @@ -132,7 +132,7 @@ static ssize_t rproc_trace_read(struct file *filp, char __user *userbuf, char buf[100]; int len; - va = rproc_da_to_va(data->rproc, trace->da, trace->len); + va = rproc_da_to_va(data->rproc, trace->da, trace->len, NULL); if (!va) { len = scnprintf(buf, sizeof(buf), "Trace %s not available\n", diff --git a/drivers/remoteproc/remoteproc_elf_loader.c b/drivers/remoteproc/remoteproc_elf_loader.c index df68d87752e4..c02d4fec93a9 100644 --- a/drivers/remoteproc/remoteproc_elf_loader.c +++ b/drivers/remoteproc/remoteproc_elf_loader.c @@ -175,6 +175,7 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) u64 offset = elf_phdr_get_p_offset(class, phdr); u32 type = elf_phdr_get_p_type(class, phdr); void *ptr; + bool is_iomem; if (type != PT_LOAD) continue; @@ -204,7 +205,7 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) } /* grab the kernel address for this device address */ - ptr = rproc_da_to_va(rproc, da, memsz); + ptr = rproc_da_to_va(rproc, da, memsz, &is_iomem); if (!ptr) { dev_err(dev, "bad phdr da 0x%llx mem 0x%llx\n", da, memsz); @@ -213,8 +214,12 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) } /* put the segment where the remote processor expects it */ - if (filesz) - memcpy(ptr, elf_data + offset, filesz); + if (filesz) { + if (is_iomem) + memcpy_fromio(ptr, elf_data + offset, filesz); + else + memcpy(ptr, elf_data + offset, filesz); + } /* * Zero out remaining memory for this segment. @@ -223,8 +228,12 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw) * did this for us. albeit harmless, we may consider removing * this. */ - if (memsz > filesz) - memset(ptr + filesz, 0, memsz - filesz); + if (memsz > filesz) { + if (is_iomem) + memset_io(ptr + filesz, 0, memsz - filesz); + else + memset(ptr + filesz, 0, memsz - filesz); + } } return ret; @@ -377,6 +386,6 @@ struct resource_table *rproc_elf_find_loaded_rsc_table(struct rproc *rproc, return NULL; } - return rproc_da_to_va(rproc, sh_addr, sh_size); + return rproc_da_to_va(rproc, sh_addr, sh_size, NULL); } EXPORT_SYMBOL(rproc_elf_find_loaded_rsc_table); diff --git a/drivers/remoteproc/remoteproc_internal.h b/drivers/remoteproc/remoteproc_internal.h index c34002888d2c..9ea37aa687d2 100644 --- a/drivers/remoteproc/remoteproc_internal.h +++ b/drivers/remoteproc/remoteproc_internal.h @@ -84,7 +84,7 @@ static inline void rproc_char_device_remove(struct rproc *rproc) void rproc_free_vring(struct rproc_vring *rvring); int rproc_alloc_vring(struct rproc_vdev *rvdev, int i); -void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len); +void *rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem); phys_addr_t rproc_va_to_pa(void *cpu_addr); int rproc_trigger_recovery(struct rproc *rproc); diff --git a/drivers/remoteproc/st_slim_rproc.c b/drivers/remoteproc/st_slim_rproc.c index 09bcb4d8b9e0..22096adc1ad3 100644 --- a/drivers/remoteproc/st_slim_rproc.c +++ b/drivers/remoteproc/st_slim_rproc.c @@ -174,7 +174,7 @@ static int slim_rproc_stop(struct rproc *rproc) return 0; } -static void *slim_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *slim_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct st_slim_rproc *slim_rproc = rproc->priv; void *va = NULL; diff --git a/drivers/remoteproc/ti_k3_dsp_remoteproc.c b/drivers/remoteproc/ti_k3_dsp_remoteproc.c index 863c0214e0a8..fd4eb67a6681 100644 --- a/drivers/remoteproc/ti_k3_dsp_remoteproc.c +++ b/drivers/remoteproc/ti_k3_dsp_remoteproc.c @@ -354,7 +354,7 @@ static int k3_dsp_rproc_stop(struct rproc *rproc) * can be used either by the remoteproc core for loading (when using kernel * remoteproc loader), or by any rpmsg bus drivers. */ -static void *k3_dsp_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *k3_dsp_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct k3_dsp_rproc *kproc = rproc->priv; void __iomem *va = NULL; diff --git a/drivers/remoteproc/ti_k3_r5_remoteproc.c b/drivers/remoteproc/ti_k3_r5_remoteproc.c index 62b5a4c29456..5cf8d030a1f0 100644 --- a/drivers/remoteproc/ti_k3_r5_remoteproc.c +++ b/drivers/remoteproc/ti_k3_r5_remoteproc.c @@ -590,7 +590,7 @@ static int k3_r5_rproc_stop(struct rproc *rproc) * present in a DSP or IPU device). The translated addresses can be used * either by the remoteproc core for loading, or by any rpmsg bus drivers. */ -static void *k3_r5_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *k3_r5_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct k3_r5_rproc *kproc = rproc->priv; struct k3_r5_core *core = kproc->core; diff --git a/drivers/remoteproc/wkup_m3_rproc.c b/drivers/remoteproc/wkup_m3_rproc.c index 92d387dfc03b..484f7605823e 100644 --- a/drivers/remoteproc/wkup_m3_rproc.c +++ b/drivers/remoteproc/wkup_m3_rproc.c @@ -89,7 +89,7 @@ static int wkup_m3_rproc_stop(struct rproc *rproc) return error; } -static void *wkup_m3_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len) +static void *wkup_m3_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) { struct wkup_m3_rproc *wkupm3 = rproc->priv; void *va = NULL; diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index a5f6d2d9cde2..1b7d56c7a453 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -386,7 +386,7 @@ struct rproc_ops { int (*stop)(struct rproc *rproc); int (*attach)(struct rproc *rproc); void (*kick)(struct rproc *rproc, int vqid); - void * (*da_to_va)(struct rproc *rproc, u64 da, size_t len); + void * (*da_to_va)(struct rproc *rproc, u64 da, size_t len, bool *is_iomem); int (*parse_fw)(struct rproc *rproc, const struct firmware *fw); int (*handle_rsc)(struct rproc *rproc, u32 rsc_type, void *rsc, int offset, int avail); From patchwork Mon Jan 18 12:19:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 365537 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp2260850jap; Mon, 18 Jan 2021 05:28:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJwQeDVKt/aa4RPdJ3Y6wGB8Tvlg4Gq0/KNdTzWnL5B9a4+OyyyZQjRlEa2l1SexpAO5MrvF X-Received: by 2002:a17:906:3b16:: with SMTP id g22mr12683731ejf.504.1610976500326; Mon, 18 Jan 2021 05:28:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1610976500; cv=pass; d=google.com; s=arc-20160816; b=wZ/xVltkbha6pqIr2f0yd6/TrqvSapDDF6tKAEAdEnBB3KM1EM8Z+RjBrJl8xfPeoZ XDFt99BZrJyPG2RaMsVYEC8rYC2pQb/6+WNFhVZTaIyro1tJ6bFvOxaAg9jNAkkJqsv/ E6DxWkIepbvz/T4LElmhWY7Q5O4jfmKPTN6iz1aJYlkytKH7+JSDCKpSJhKxfJJ3dpJ9 wCyKWFoMJjcZmux+0e9vtwslkMAK36KeXAqYdoxovN5iwHUej9c1ErDyNWjuKNSxzILI N7fZMTcyjh340eX96GFMksfAr4goUbc1krWKdshLo/3KjX5+zUhYr7yqA/Xd7pDVCekL XhQg== 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=kolgMyaS+qPUHFvuX5QsJ0lZOgdMIKAoreoWnkOrIvrBrC4HB958JnqgcLKShrnpZr t8leonM/R4xMwToTdN3shaT5OyCMHtRIArPrSpfeU0+WGcp+xSiQSR7JGswDEf0hbRcC hs132mQxX+TZr2X7k9gen9AqLy4ihhOYafx7rynLfhrXG+WvLBZt3TM99NEM16qNPn+V PV3ujRR2YDJ5StRa73ghgWMjtPuyR/DMshAo+5c9a1OUjAs212FDAh9yM0l+6Q03Nepb wFnx71cPxczJOy/nmBkwE6H8NOlUZUDczfWECX2ZOAwoVy1G7TCmDUcDgjhXSt3sal1g nSXA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=mOHEjCqL; 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 o17si6349400edf.247.2021.01.18.05.28.20; Mon, 18 Jan 2021 05:28:20 -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=mOHEjCqL; 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 S2390840AbhARN1i (ORCPT + 6 others); Mon, 18 Jan 2021 08:27:38 -0500 Received: from mail-vi1eur05on2055.outbound.protection.outlook.com ([40.107.21.55]:54049 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2391580AbhARMcj (ORCPT ); Mon, 18 Jan 2021 07:32:39 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G49nOlaXsOR5gD/ecoaVEhOeUeRpon/bVy06xopcmNPTLGveamJIwZMt88lRKxTToxxKpuL7YQFNmvFC4efGjBKZ4OA7audqoT1DC3WvLCYZIoOZCUd0qrWwTplkeM8FTx05Ba7oaUnLQwr3cpwimOg4Xs9CcvY3YyqYipZNzj07Iab0ywONaFDPUZoUoC3r51fPDTJ+yrQmvRjFsxG+WsWwMqEop7OQtk7YZ4nS7hUHxPJfSug3HbuTb+x5GvyEl3cg9RYFWLhtTq95ohUObHDX83e1mj+pwMxejckyTXjP7AWp2HQIs1aDMpqicDLPjmBZOebBTTgI3UOJ/hS40g== 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=dDGMIh0bssvf0wZzg3W8JmcjGt9+frk8kTMdDfjIzdgyvxn+kODdNyv6TFLqCT7l1oK4nZHt+CFiaEch9eVX4sSXDIOfl7rGZ/KvO4R6nEkAT5cPWRfB06ws9Q6S/PyCP/chonKcH9PQYGuIXghzo4z5PDj7kI8aXaH9lpw8BMBlvnBxlZT1el6U/pvCxQJYpSoA4By/oAhks45OPUw77rHhggP28OLpc+oodB1cAGr/1BnfJC49Hpwdx/X0klSoeuOtB2cjqjOzUnpG+7HHpBnJBkoovQvvXKcueaNLchlUyk974Ats/ZT14fDA2Q9cPO4UHHEFRv9mhXjxF41GKQ== 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=mOHEjCqLx9bQsdp7gF1ZRm+kYZG5xTIx3wJE3izi6DXPNf4hImTyeZX/rDZOUjYIl8blNw4RqdCP7mKZ3zlSx8IHNNQ0XmJvwRzoN3Ma5Id+qGeHLsaMKMLf5p3LtVblKLX0FTLJ3GJryb5AQg87eWRVT25skWCnetPYvf71iOA= 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 DB7PR04MB5243.eurprd04.prod.outlook.com (2603:10a6:10:17::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.11; Mon, 18 Jan 2021 12:30:56 +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; Mon, 18 Jan 2021 12:30:56 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org 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 V7 05/10] remoteproc: imx_rproc: correct err message Date: Mon, 18 Jan 2021 20:19:54 +0800 Message-Id: <1610972399-28286-6-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610972399-28286-1-git-send-email-peng.fan@nxp.com> References: <1610972399-28286-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR03CA0113.apcprd03.prod.outlook.com (2603:1096:4:91::17) 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 SG2PR03CA0113.apcprd03.prod.outlook.com (2603:1096:4:91::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3784.6 via Frontend Transport; Mon, 18 Jan 2021 12:30:50 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 8d5c516c-f575-4fd3-9978-08d8bbace70c X-MS-TrafficTypeDiagnostic: DB7PR04MB5243: 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: sEfZb1AwrMTCGnCucQHkNPRIcJEYsLE5utqlJuTMgBERA6aQHbCSj/chusuNoJWcchWc+jBOrqDBYW2wY8P5ahjtvhKzxBVDq2gmN6PeTyzvFhHlEOUStqwAf6zS/nJGY/RmkXhrcXjTuetj4vtAFnjMcWZthzKQKVMjMRlnifDWY1SUpfDlJlsAv6niJvU96f3LAj3+89gJBqMGdPqicEMmfgd/eWRwsHPn5SN6RmTd1xCj33GRwCt3eR9Z4cVnJ9VFPyglYdI1mlysGd22mOlsaSjvf3tK+esOfy2qtWVbRWf7wfB5XFT95JqpblRH+0UAtrR5CgUGVrSzLticTI/s6ESsGKDOkO7CbcxTmbQQckMBNzmPdHFP4pt7bxpozOkJei1KBG4rfIKd2EkQ8FedqiPov957g7sPRyYqBlVuqXcsmq8zL5YQao5tkI0yCLHrUnx9ZVo59iaM+BJx7w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(346002)(396003)(39860400002)(376002)(478600001)(6506007)(316002)(6512007)(9686003)(36756003)(6486002)(66946007)(66476007)(2906002)(2616005)(956004)(26005)(83380400001)(15650500001)(7416002)(186003)(52116002)(16526019)(86362001)(5660300002)(8936002)(4326008)(8676002)(69590400011)(66556008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 2Xs6clv6d2/cndWx7u6yLcRwJ2UR8prb0WKi3+cqM5EbvngmtXC8ASfRXzhCG2JHREKXWVY3N1ALwM6ZwwhNLBw/WS16cXUSp55h91J5mdKXARoCOI21BTGQfvTGJiZ3VBeoT+bmjWrKDfXJ/2U2IntyUNSSwD/6GA3pIB2HtYXMq6K8Jusbmodtavuhr7waE/cohTsrzontl941Sjzlv+gv7TutkLxRr68/eGykdqcX9bs3DZs9NKCmR7T9yRgtbQz+rvzUpCtKWx0sc0BSQGe3h7LGDBI4M1ejkhR7JlO3TSGiETvdUu2mVifm/8bOZFUtzxWXSzlFtga5SLyA18+6zR+QY2LBU5ahtnWtlQn5KvmboztqcTG96K9f539SN1TsTU3DzautO25VvJYfwjXyvxz57VECi/ytav7rc9IOcLb8HY1Z2jQx3sKds0IPvNOUmGQAXjE4HxOX+eHEM700a7CuE6qVzkpAVhERMWxbyU0DgJnOw5bQcLDlj/HZnkr4QPRObQu0MyDp17dr2WTp3UiQagbMRBXKBHWX3WNa9wd3zM3ZLnQIuWcfxPcxg00+s9yO1oQnxZjUJDemu4gGeT31zYABLWZ/mFxlQ4mi+MODfBB6MRsk39Hc2ZKy3nrwrjCCEcdtz1EMwGF+zuF6gHLo03f1kf6Dp1+fyrICUqyHnbAWh2yzyRpGMgYcStDIKbO91PSUQU4o6VyMIPn+9L08fC2PmqZV2TdfAv8KegHuijRCYDmqF+WjICHIChuB9ut36hk/5VWv3OKOBT8uqnm9WjLxg2agxxvSfqbHR2Jktx9zCwMwYHfinlki7601snQwI5WTa+wYV7eGDva83lHXKIZwFLQLQRoevQLOs5Z3X4goHaPeiBRqkkMRS+aWMNn9K2YwpOjaCLXouLwAvFosZMbnH7C73mGX+504+e505x2Cquk2i+OG/h5tvRMdOlluk14pbPgm+z0Q+v936BZ+MoBvY/NaamcRa/VolbgLus6CHmWtXyv3qpeN X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8d5c516c-f575-4fd3-9978-08d8bbace70c X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2021 12:30:56.1605 (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: ub3yEnXwQIeP35a6pCQBQlNJY3XJlrXrdbSqDMlmi1e1Mr+ynLDs+Z7t1MePKTGemGOl1B1euUyCXe9wxaRSrA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5243 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 Mon Jan 18 12:19:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 365528 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp2220026jap; Mon, 18 Jan 2021 04:33:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJFbw3iqEuOvB2hpRHMWLXWLSy252wrxsYlR2c1LLeNPCCTihxiYknsDGkj5IHeJmnZMv2 X-Received: by 2002:a17:906:f85:: with SMTP id q5mr17272703ejj.105.1610973213641; Mon, 18 Jan 2021 04:33:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1610973213; cv=pass; d=google.com; s=arc-20160816; b=HTzHTx6pPbyZBxyBmsnt3t0Ibl7V6DQCJrjEkfDYXBIdJrRCvmc83MW5Trj62EOaAA GjbfbH//0Ms7JlNsl/q4lovYm8VBHQJZq8bmwZe/JCb97XWsnWOwTROnHrZIn6Dskaez xqhiwkeWZyGSA0HctbfyTZZlWUdfLooY2z+oA+CYScFJtFcoU5yywcKaM//pkz+PQEsl FdeJYb3TVRSJGmSCyxAcB9VChDrkK63OBhsyg5qKAhA4fW3OCYmUVaibhk0OgYxar3o+ F/izfzTygo+pl4KPnmkQqTkkXb0u89sDucqPPgZN+QszalxY+g6rIJKFq+6FlBNRN+j3 +Sag== 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=J1LLjriNgd5SYXa02aU3axj9OQEKYS2umwbpeLzZqoL8vMNOLs4qLjeGzkRx+ZH6+Q qQBseFfDY2BnCHtJfu+jy+LB7setMW59xx3L0gjY6Nx3BV34LocGPHxw0OPYw4ic9U04 Ou42IVt0Z50hZ5yAAs29BKajx/Qwi0EdULXk4w0kBSyAL00S/J2B4u6WWidIJrfYpR/W ATSOQJo4/qqdvEBIePlqNfudqngbAQZKAcn+qDzWLHShZK+nmfDm99F9SnZ79x7ywCBp Bosz6012sMshpg54Bt7OamEHJB3Jw7XYui0FCg6Y01Ht1mnnoXLT248zLakmdn2QJOsU hdOg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b="mNS3c2/+"; 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 pk16si5154570ejb.114.2021.01.18.04.33.33; Mon, 18 Jan 2021 04:33:33 -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="mNS3c2/+"; 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 S2391600AbhARMdT (ORCPT + 6 others); Mon, 18 Jan 2021 07:33:19 -0500 Received: from mail-vi1eur05on2055.outbound.protection.outlook.com ([40.107.21.55]:54049 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2391592AbhARMdH (ORCPT ); Mon, 18 Jan 2021 07:33:07 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C7F3SZQckITv9/7JLqrA14Tcd6UO2p3uh3eKCes40wzLAeWTeQcsd8F64q4JzxFsjmssEBS2jDV3U1v7yUcY4DFRENjBjK0pd9xib0c0QpPLMZDPRaOeRCYJ2s7/83rRjVYiK/03/aI1XxsFk/6RLQ5mjjiWGqq99ne9PhxMknn6dDAcX+JKxhdZb9yatz8epomzV+AabHewy93szoTznSr2NC57y5b+sb01kHyko0RtFn7+oZPEf4H14PpkLj1AiKl4pT5RSYORV9z5Yvt6awtR1UzhDhvlIFpDtxTcH73Ya1aSEBLFPBVaPgftQEx14bCw/UjIISD0Q4xnVxZv2g== 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=EjEDHT10qoMwIo0CSGPv82XZ1rLXmriXYlyaQAebM2mZkE8rEaMHFsAopzmauxGMCq3Nxf3PrPbGBfgRCboxdXfxRemCWotbN4xcqLH4PbEcXbYajiOzaI8dElDBSfI6SDprX6LZXOQvEZAQ+XmXrYK+jjBuQPUVFapdJg+3VWPGW9WFx4G8s4/5Xy0WgjaICJoYzABmkrgWA06Fdi+9i7nDybmPRlLlx27Vmclhtbi9c7RKfmvjUuM2shbUqmCDo4yfxNrUNpxfrrTBc5pZV1qEQ5dlj8TR9iT0ZTTXIGrBJ6aAiiY7IYM8xNGTaXVj9Tmw5UlNpnoYQ6fEJmL85g== 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=mNS3c2/+7mVIYC/zLJotO5CdY42oLnMKXP56n3gt9UuujUq4Kp/zkBnPOe3Yj2xVYx9ANQww/ogWIt7A6ISs6l4fDCN4AhiND4v6+msPkF4JXMqI3F9KZPVvj/xZrdpkVFo0K51XJo4AnR4TZI6vlEtgTtMPvjJzXkv7Iz0cUmw= 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 DB7PR04MB5243.eurprd04.prod.outlook.com (2603:10a6:10:17::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.11; Mon, 18 Jan 2021 12:31:01 +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; Mon, 18 Jan 2021 12:31:01 +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 V7 06/10] remoteproc: imx_rproc: use devm_ioremap Date: Mon, 18 Jan 2021 20:19:55 +0800 Message-Id: <1610972399-28286-7-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610972399-28286-1-git-send-email-peng.fan@nxp.com> References: <1610972399-28286-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR03CA0113.apcprd03.prod.outlook.com (2603:1096:4:91::17) 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 SG2PR03CA0113.apcprd03.prod.outlook.com (2603:1096:4:91::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3784.6 via Frontend Transport; Mon, 18 Jan 2021 12:30:56 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 767edf5f-fd21-4231-2c34-08d8bbacea73 X-MS-TrafficTypeDiagnostic: DB7PR04MB5243: 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: iA8ycNQLF/1Qc0lkmOTA5680Einqba12CelkQpjSoKnsH+mdHMVTJF3reLTYM2a0+iTjGIZP98g3Rf1avRbwkE8JKyrE8WW9SzTexBvtKQMwVjMj5jZQNcl7Gl3grwk4xx20ZCGuQD7hQLWwtw+Qj88ek6fi7IFCl0tYBR9KB1ltL3ybN5wnQRqph70Xp0fPZzsNLibCDc+2hwHNEJ8+v4CiQMeBBRv0E2OaQNQFireQ3XRvg+9PwUHOxKBWp3X3DMXKj8r5oAkuacrfnrWd05nF56diO3uU+bMuyuUkR7xgbARZuyaD0kSr7/xqtlnKuMFT8NCnD/7qx4PYCSmnKOuGsc6IAht+6EE9kvXH0f35RbnbE7/ZuVBv2bLMFEEsraCf4XQx/OYbPkn4HK86HfIRXKQE9MVUvw6MEoa2RjQCXLL7bBiHXp6MPuy/6Iho+ZHGXGKvolvnhLOOSS6zaQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(346002)(396003)(39860400002)(376002)(478600001)(6506007)(316002)(6512007)(9686003)(36756003)(6486002)(66946007)(66476007)(2906002)(2616005)(956004)(26005)(83380400001)(7416002)(186003)(52116002)(16526019)(86362001)(5660300002)(8936002)(4326008)(8676002)(69590400011)(66556008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: dTCl9Kv9rH+WKj7NtHIXibm5sxvhF8vZGsGctZPPfzZLaTzv0KJusuQUXHPyTFeJoHLwNKrktxISd60Hu9ksBP8vbEo2LSHXcnccPWP9i1fw08jtz6WDOzfLYB9lvuupllloMEfzI9JFnNLBNxDlgAN6g87DcZ6Q4QNgjZiFZ6pIfqTji+ZnhimsqGh1U2iyv7ZMnvgIaZNb1X94nW9ig5kYagWiGsOCOpM12o7KZyH+lQRcycdsHtYjwkOxKWiQK5uqzJ0UftdUfpJIJpD/Cvcjmv63VlGbZ6yL5p+uIBKF+9Wnk3AV+HrHKwJrKM8nrt1C0D6u8/GRl5ztYTz0X7OVwdd4z5ZqKjL6fKRLxQ4liI+Wv8qanK5cOfeffNJ5PTU9JTMeIujcuVmdEWzYCTjqE49ztyfw24317B/DWTdAuHPnS5/JEhSHgJR0f0mKOzzn7PLT6AjcVoO6Pi3WS9MVYvCfQdp12zSYJnFXtWXQSpttKRJofBj8sUeCI+Hv0M0AVOr8cQOJionWKuP2PHBQaTwX1HVpEGt/JNy3s1ON3kNYF+agzaR99IZig1Y+tttTDiPds1KX18sQapjZfzBi/XPCa6fgeNijrp97u2RkEfuNnT913nYbjBndMS2NHzTWB27RMEdE888nhEqHzgyIRnHLqxn/TBLqbX7fOlm0l4qdRffBtVl9JVdHOjIQiKOJy+6JQmYm/7JyEKW6ZDNqvo17Xt0nXhSwowfoCB7JMYQWOTwv4S2iE8o5WMgGPSVuDI4onOYjDfP5hblvVRmNKUo42SRTs2nOUFkfcJfvjNvPPdxoxc+Lj6aymblKBsRfiTqxg+wnlIpV5t2AwwMiLd94XfPXA9DePp2dxr7p9fVM7Rpft98sOkMT6zH4SyvayRFDjZTwH1QrhmazeToIsV6jVgVYZZTcLUWuROE86F+hSjywqFN1sIEAJfrLRjOKEkTBPCIcNgP+7DLIQarYUFmqu9pWkLod1+oPEL5G6BmG0hU2pW6YMqH0TeR/ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 767edf5f-fd21-4231-2c34-08d8bbacea73 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2021 12:31:01.8479 (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: zR7hyB3FMyqUYQZxCz+5HPKqXmKZsWFvUs/E8QBXL2GHdMCCv1yVJbFohyQEZhIMH5weCNopgEG3GPFKYRsg/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5243 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 Mon Jan 18 12:19:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 365536 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp2260841jap; Mon, 18 Jan 2021 05:28:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJzfIFBq6iRQ88/GbydhwdDpSOu9saR50a1Xp3+zW0OfFyilVnV104vRLiFqYGYMEcKy5Vu8 X-Received: by 2002:a17:906:4955:: with SMTP id f21mr9585171ejt.384.1610976499569; Mon, 18 Jan 2021 05:28:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1610976499; cv=pass; d=google.com; s=arc-20160816; b=Q/74VRH8hjIphSzaHs9p1jLMA300PPvzY9j5yBgVCXoJc2WikNb4fP2MQaa4dnHRvQ JtJO9Kc3hczVEMA9k501RUMjopu2fDXxrtwXi8GFgAA8gWoZw83yjKyCuZ+HzPe8jXLh 1QK4ZTPYhmCx+70QVpY7aOCDwjmNyKO0hLJDyNH2ovWWgJwQWbOxK05CjpxTBw6GpDwT asXGcV56L+aQhhfT2MzPxLXwa8e+Son9lDOteWWpOgef+Nx/DtoM+3M6GvioVNE7VuP7 HXEs/mS4TAOVlJpH3H7oKF+kpbLMxZW0tdB68LBJHy6+BLwTeKxOnF6qlKw2Z9/27/1q Ce/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=sPFDy9u0V0n4kcoaeuDH3f4yuir3vLJ07Nxch5aSlRA=; b=Mmd2pS83JPECVqi6jBe3xTgklkSqiSKtkYrktDfhoK8hOF0o8FCDQbqUZv6PmktNln 4NHKH3hqEdDSqzqIHHGMDO4bnV3dpF6EYUfU8akIL9sz/Cn4ICKAQlo9WZUGDcZ7zZMC I8bMP+xzvg7bsVx0nM+SCt7RQRFaz1DJU2extcGCHZ20vdfSI/Zy4/8IV1Mnt/aWOODe B5+8uirm3pkWfSErWMG9x48H66OX8hPd32xTpppurngn4iia2dSozQREMRsb4aoQoeGP 6r0Xj6+BWpY7VNefnZ8EvH0XEL56TEAnTM5dWddbHX8dwDzielxDTelyqBKQng/K3Wji +ozw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=iQc1PxfK; 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 o17si6349400edf.247.2021.01.18.05.28.19; Mon, 18 Jan 2021 05:28:19 -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=iQc1PxfK; 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 S2389711AbhARN1S (ORCPT + 6 others); Mon, 18 Jan 2021 08:27:18 -0500 Received: from mail-vi1eur05on2055.outbound.protection.outlook.com ([40.107.21.55]:54049 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2390840AbhARMdd (ORCPT ); Mon, 18 Jan 2021 07:33:33 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HqnMUAiOdLsrrMqIQvf511xVp8ROobj1ndnOkoJiRDsfFhhLpdrHIsx1asNNliIdbPCcB4/oRKq/W57m/6zB5vLyaUCQpDjeJAJMPa600KSJE2uAHRcvjYMvcuGgs8+dcU8xv99HBOQ1Sz91R43gYZzxmxwpkHZt26XCTNoBBgdwpf5dfKtJgWnnJVvP3jAx4sr3aA1OqEAWphDdipWnwZ6CPJ5tL2CG2iUPwcOvDZU0aMFBcthOVO09ljYEaOyZAyTb0MgB6IxvxVrcVB2RNH0gspPr+EEJwjyi+VDrxDDNroIw5df+qvpEtza4R4pI9koNWxKK6Qrwy/G5uCuRSA== 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=QIaipXjk9YUkc93XhUFWcS5jvwswm8YXrQJfT9Jx2BH8nl2GVcCse/h6Y8chMqPz08Lk9G1expNmBGq7+A4TQmXCHIJuAkOB5azExzKGZaACLTY5cVty4zYR1G15CXtj3lUCVaOY8vtGIc/51tdG7GNrQpjgmRFpQz7xrGN3/Yi39Jg6CS7jDvTjTyULw6j8ew8LtJ7j7P2vabEKI9UXmq+Dvq/LZ3Mp2zMyFmMQijTfhyJ9zpvKRwLcE8JD/JT4vGC+ew9zAlaZmYfsg216IquEAcfSLAQgxo2lQEK9C2IWzR5zJmgJNXGboNqEmhDVzpQ+amBoU7edpVPrTZ6uWA== 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=iQc1PxfKKeAaZPeBftWc2MYlvjxaaihEnHoYWOxO0tIyrN6SHpE0KdInW8ju9hvtdeMTsk3SG+z1ReE4O7oU8tBVw/HIz+BVvM9wKs1xDiEZHumyyU/FBTc5/+agf0bJG+7gHOVftYNeZ/n5AoJd1n/VIwTnJBMuPC1vMlc13GM= 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 DB7PR04MB5243.eurprd04.prod.outlook.com (2603:10a6:10:17::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.11; Mon, 18 Jan 2021 12:31:07 +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; Mon, 18 Jan 2021 12:31:07 +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 V7 07/10] remoteproc: imx_rproc: add i.MX specific parse fw hook Date: Mon, 18 Jan 2021 20:19:56 +0800 Message-Id: <1610972399-28286-8-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610972399-28286-1-git-send-email-peng.fan@nxp.com> References: <1610972399-28286-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR03CA0113.apcprd03.prod.outlook.com (2603:1096:4:91::17) 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 SG2PR03CA0113.apcprd03.prod.outlook.com (2603:1096:4:91::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3784.6 via Frontend Transport; Mon, 18 Jan 2021 12:31:02 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 0175b122-7e25-49be-4161-08d8bbacedd4 X-MS-TrafficTypeDiagnostic: DB7PR04MB5243: 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: RbVGfGWyk6vDcFL+RxZMTws6EkCFmTFm46usYJKvts3eUPhMP82mbxBXAzCdaJ0htko596RnZQQ0v0H0Sb+ooFXAnBVZIHla0oWxSh/o4lOSiKlS8zszb2PGQs0NwWJv2worp3BTK6BybbANBVjB/0CCo6TEz92BRxehMKHWw9hO78+O3XFSXgME4SanBMyUBHjeJuRBVp0gy0ZbIg09T6a2V1EEvqAzuZxbjHSkcXY+0RNlPoO6Ps3mLMd7D5qGkzVvKnsZyhxiAbOBUUHh7reteR5lSrXiwfGS8mPNqbFnKh4mEEa2xZHjVarvv2B3I7KxGm3dgnIsaWdHnMNJBQG/S4rZu8kInSBa+dYn2n+caQDHEmhZwZ0LbhOO4kE7d0aeNsN19b7L871oFSjk68Ei7wM5EaCeOqa/ni5fryCX+KRj3WeT2q9vzauNwDVLhbxzk5Fn2J4lMNTKbJ48pA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(346002)(396003)(39860400002)(376002)(478600001)(6506007)(316002)(6512007)(9686003)(36756003)(6486002)(66946007)(66476007)(2906002)(2616005)(956004)(26005)(83380400001)(7416002)(186003)(52116002)(16526019)(86362001)(5660300002)(8936002)(4326008)(8676002)(69590400011)(66556008)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: bIBZ5mL6uJO8FG4gYdIDlNw4pNg8X5+PUw6RbqVfNxx7S00/XN3osIBD1YZGnOc+L4TVNWPwymAiIQlr9PxcLUkeDv9vuQ4J2DLXmi+7+Dn/wIa76dkzqtW3JQRGsgy9Ys2u8+hEVQLUTjZF3RT+/lI0umXfTQgXevSvlRsUwDzlG2CDIADNwxYMGiVUBgyCIftvKdEUox9eTP6lj07IuQe54ck1QzOYYP2jITtG3CVWuTo/Bp5ZvYXlOwo44u5DgMKd+yuMPFrmDGf8tTiMwtMBpt/3mb7qGPdpxKbCfeyhYpWTyiOFGAfe3leINa/IOOKsG9cBjKqKmZCSlbiZqWPHGEDrhg/3toDtUNLle3l/iaU63Txzbk8ZPt7FaCcGgUKytGg1OszJZsa/X7HvAxGH0Vko6BdOUWpeNh8QqP8LoUFPrRjmiodFjm0yDV2jKLpne1Wf96EkAK1JU7z0zQDkbcdjwCcblA26JOR12izzfk7fkpwwFWNi7ycX5pNZ+w8IqdrhE7eBZQWnw7y9sAnK6YPC9Oyuo5fth6pn4kpxtQ+8iBN1h3hw/64yVQXvV8I0ghfZNmxLSQJAHDkHfurqQPKoc7sAUGxqQ3r+ZFqsB482f0aY1q2SPNCIZXTGChP+9XLVOtT3JCjVMT3SglQXI6IWPKoj086LDGp/7IZfTj/7QCs+BudberHR3zp4CHEhS59rf7Oru4sRaqO1LEee2XUxzOJ+jBrxJWE3w6PkN71XTRD3eCD/ggI6evHI+LNqBh6wJuUgc+O2TVFDwCORi2R/1dpY7VCZRl87mM82M+e9AckYXseRat6uy9AbmJO3VlSgsHQmrPyRgzS2+VzH6LTL/oYX5ibrXjlt+kKP7swLSo2FOvA2g/33Sr6c2IB+YNVSAcrC8aidauVPwRkvFZLsXUJ5M6yPPaGh9c8tapumRzlnNbQbHNlMPkStLwOV+bqznBfEBFGuUgEqagqrI5Czj8Eqx7QaNFlXhVs+jao2R6xy7iqtlw7OVwk5 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0175b122-7e25-49be-4161-08d8bbacedd4 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2021 12:31:07.3703 (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: JXk0exAmADW265TayPYSY5/gAc3u7EqtwqXly6xpOEB/9rJH8bLnx5rYI7HuM80GzIuapdd1TdSd/aw4wJPXwA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5243 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 Mon Jan 18 12:19:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 365529 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp2221019jap; Mon, 18 Jan 2021 04:35:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJywnxH/XvuZd8t6UYu5JhtI8WKWdprYEvm3rGH1JeyeGawcQRLvc6lw/6Nl6DT0vTJ+UzXz X-Received: by 2002:a17:906:1d0f:: with SMTP id n15mr16336480ejh.26.1610973304472; Mon, 18 Jan 2021 04:35:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1610973304; cv=pass; d=google.com; s=arc-20160816; b=ZCiJV1rjCzfmR7dzq7vLrSri7GgedaninusRBP4UWOy0IF+BuGDUjU/Q+mMCQDCleB Rvtq0Lpj6AZN/Lr5clstUJ704EA7bbw+iJooKqxEhO5GZ7EyUl86n3dpjeF4nf5b3d70 bpA5Uba4b0QXgP9c/6+Vim63VDlnupSHzZTjawyTeDrciCCT47lecYNlNiNbjdmGKEtH J/gJdrO2sU6trUHAV204OD3VNUZlJUdSZX3SglFZfQFmWXY0u7LFV9DdtWmIG58gEiZ1 rkznUHeKaMUaG8traH/ZZc30dxo7aSq9TKJA9UQhNWE0wSqJvSAH7LFfb+0klSBRGUd/ vppw== 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=RKiki6D3OXy5y8o+2eWhBaY5V+P/C3eAWR+VKfmfxDv9AD1soFfDbP+asq9W6XzTLw A5fyr9Hjj3t6xJSZ61+XemiuE8jIqzpYv+ZIwxHZoV5Gr3YloVo9Q0POrzJmOppmzbTC khY71FbYvtxOT4PajyDlVlx7Tifgp5wvNBBe21Mil2icBnw88aezLhpDvLluiNBCAkud vDXwYu2rKA/srh5qM5K3f2tPFBR6KEqvNuAYbdKWE2FVah7CYhRzD6RTbWuj3sKKy9oi Ds7LevBrMXeIRdRCMGOW2aSVzil/QJ7Xwll3jnlqY4+qJkrG+J18xGRR5wky0Os2NGE5 SMwA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=bAmSMIuA; 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 39si735739edr.358.2021.01.18.04.35.04; Mon, 18 Jan 2021 04:35: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=bAmSMIuA; 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 S2391394AbhARMe4 (ORCPT + 6 others); Mon, 18 Jan 2021 07:34:56 -0500 Received: from mail-eopbgr130052.outbound.protection.outlook.com ([40.107.13.52]:63401 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2404041AbhARMea (ORCPT ); Mon, 18 Jan 2021 07:34:30 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GQW3IkJku0RMVwxfRA2bXY2kFQt0Q6fOPlGwXeBsr1cTCCQ64AzgjO6kj11/ta+3exRK79JBharXaBxN4nQ/PIGFE3SukeLK4mjbAVCtVpiY4DLr6vujxe4gCnQBG23fbbpcEpm9NG5rK65N5wDw+ETnfI0v4x3tD5+v9fe828NqLE2xr2aREatPXAmV5uG2uY7ELsvXQB+zkzhpP7P+zgiNg2LIx87ETcFizcQrIXXBC4dEkzzcrbOt5TYqYmjfznZmRAUHpIny13zmDhDrksU0hH3T6SGCgThE1Ux3CDDpOOGgZ+NJO/8z2Gmtq+WGbmEYbmhPY5WwAx/YGHGJCQ== 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=KcJDy8b3AIr18x5H2dX2pMh2o5yDXrrnn5igp4tr/snCRGpZND6ZidLUgWpocG/r0fdGPVrpteKbvuQb0sVPas0B+uuriPthDr1QBWo1PVgHHR8LpFyI7eu4XnwGB8ubdLzPOG9t+q4mu+xRYLfMkMBgH34hMExdF64lNCgB5TFCAsn5Zf7Zzpsc6qcdYjTmJbBkdyikuylZRQg/kh3y68+5/fUrFJDQpDub7Qfn+xAF81Sr6SCLQz4kUC0PraC+cl55ojZ3IoYzlLrhQFlTa4/fLPlA4Vlx/BJ5Rz6hhxSwSI20r3uqowASF97xhmjPoDTEcIJpP6MZNp1fb7kc3Q== 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=bAmSMIuAK8QTBFFAezekG4U+Fi/cpZ/sKktW26SQAR1iGqb7kPepg+lFsAQQWzmnPapU6BerzRQ7HwyIxvE0RiJioSc3y1p7qkdM6vUy/oDll8s4wEQ3OC90ERsLg+lT6X80pRh9fXLTqQqvxSHKqRU+FPAe4QO9LaLy8NYWJRc= 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 DB7PR04MB5243.eurprd04.prod.outlook.com (2603:10a6:10:17::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.11; Mon, 18 Jan 2021 12:31:13 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3763.014; Mon, 18 Jan 2021 12:31:13 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, 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 V7 08/10] remoteproc: imx_rproc: support i.MX8MQ/M Date: Mon, 18 Jan 2021 20:19:57 +0800 Message-Id: <1610972399-28286-9-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610972399-28286-1-git-send-email-peng.fan@nxp.com> References: <1610972399-28286-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR03CA0113.apcprd03.prod.outlook.com (2603:1096:4:91::17) 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 SG2PR03CA0113.apcprd03.prod.outlook.com (2603:1096:4:91::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3784.6 via Frontend Transport; Mon, 18 Jan 2021 12:31:07 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 2d0de694-cf4b-41c4-bf8a-08d8bbacf120 X-MS-TrafficTypeDiagnostic: DB7PR04MB5243: 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: wQFF2cZnFERlnqJJNTx0W+NuPlIS+y3R/OKGioCHfwav4uYhX/cBWPuJ3awtr9IXBVNM/0lIxUpDLOdlWf/owW/VRIRZj0NYLC17dK7VTmf+/iAnRSnFlLD+cmK1+73wL2wJ4fM85EFmRZjmphyEMTM2BchdtgNnbPVR9EaZtCrW2+z7ShG5cJSLSj99bFSQx9gFMXPoMVGTGElZ7AzYGXMHnk+0HoOQWPmTSrZF4VE5XC7vVdhFIoPT55xbk/syFmW6rW9BdQipni1nD9aPjgpdfUW49UL44MZ10LHlK4pWgrzcF9TKpAAN8I9EqHTG8ymwHs677nBhgQCUy6gi6IY3rSF7vh1YLkzPa+L763XyGq7jrE7BzEXpq2cvOQAEQjqFfCEWol+WyMS3ioZGPVfG0SyFHJRVxu7nGN3F/ME5dLLobLPr843I4M+y5Yis X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(346002)(396003)(39860400002)(376002)(478600001)(6506007)(316002)(6512007)(9686003)(36756003)(6486002)(66946007)(66476007)(2906002)(2616005)(956004)(26005)(7416002)(186003)(52116002)(16526019)(86362001)(5660300002)(8936002)(4326008)(8676002)(69590400011)(66556008)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: aYu6xW5Ec/ASkaVBUgjHfoBrY+zKhyfgCz57dH/vQ18zJ19cougfvXoD6SNvZQ2PLqFyCebSpqbGn/TPMOCX88iJt/IRG7mPUtgH+QPhfm1KAij4z8cwpn1kM6KzUc+NlHERlH14B3LHb12S63Z7pyRIuIOlxOI+gmx/xuL21MReBjx5ibXpZSmAoezzdyMs+70Wm15dT+PqSlolTcPYA/8H+jbXzpTUEz5Hr5sRkpjUzDnl/1j31Dr+851VRdJ1Hei3Q0O5r79ovz9K5d5iN1svY46D1LVAKqqAz6O1ymZmtDPBfEahaGx8xb9ow3hmPmyZkEOp9NJO2CU1MOxXJuFv/tgP3RF1VIyfdBAm5YSjQlkLTEwFFNneEmvHDaq0J06x6ZvtBEdpbHsrc62Bd2OHJtPWFzyjkK+LLA2tbfhMyqGwJHpjTVMMrQlVGTFjjaBfR/Wq/kK+DqyI6lFRdGC1DPQ3n0c6a6G9N82ILvwu1BqHLLdWImKcVj8xF9Efp1w0W37wuFTfxWVm2gxJOw6Kvq92E/sdFIduPVVVaKy2x0aVAcYRmG6Xxzni70DJoVZcd0la7rjmUwe0ojrrfWNmHl5VpsbDIXvqiKlzXTuttD/6FMbgATEmqcqvLz4ED6O0Ll3kFbKCXdkLM5WtQA2nAwR1dPho4B89o1AzR/5yPblMiZb9dSY87Iyar2aqEYs4Fdgcg9YVBXEe35o9mTjRRQDZ9IJMfC9+azy8Ux6+6zzrib7m9OKEmsivAXaZIarRS7IrIggXPvpPdeBwm3k4YOIJ37clLzylU8N6sr3n5+8L4Pt5FF/Dpz60Iaq/tYm2hD/0+MBBLeZmrupa0qxXQXbrRpf7mlowDQk55HEZdIuRGdtvkriJTb0NAGo0cwL+6XS1feEO4wiUbxSgKA6x8B/CkWoIXaMfKtKXLyGRiw8Z5rVCmb8MJBGdllzK7nz17mr2EBz979tVaUV0ViXJpr8ohBsa71rlz80mhyTOCq345toDAlGxwKfbZAdO X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2d0de694-cf4b-41c4-bf8a-08d8bbacf120 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2021 12:31:12.9378 (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: jc7SyvkLMrgBg1KRWXVH6oxc3XrLXkoFPXiCxtuXm312bm0RnvQ5NDaZ5IMR+vXsM6bcyj7owmKQrG6lZ/DLyQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5243 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 Mon Jan 18 12:19:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 365534 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp2256562jap; Mon, 18 Jan 2021 05:22:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJxyMCVjmor+8xDAtLWOfLkbnKzld+bmBBQPprOmnH2SpuhdPKYMsnhRhUroNinIx5EKGVzs X-Received: by 2002:a17:906:950e:: with SMTP id u14mr3140211ejx.342.1610976177795; Mon, 18 Jan 2021 05:22:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1610976177; cv=pass; d=google.com; s=arc-20160816; b=XQvOS+G/Lzg2o62v5Gb14xs+eCfRRkbpK7vk7dp5DGo0Sz0jRqbhq2AtpmbCs80i6F EfgWRl50N8xus02usN7wGGtVYKf7YZqnK/UCwAY2vtk0+Kcy5oa1XmxKZt+iyKwz+cjr p4DPy1oHzpYgEFvY7dsJV7Dy+JRhYZYf07CpJ+bFpvk/Y+kcBpbo/9FUur9dljYuLQP/ qtfujsp98e1yynMRpBU1w3DpnCqpwSVwpAzk4pXqqoCi1QQQ5I/CTtdLSf3yXlX4OusU Najyuoe8vuBpNeMjRwYzQm5JenzKEmrDLXPNPq1tPrnMq3QiYZ60qsD7RoEt3hum44S4 VGCA== 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=f+2Pi8NcU8EH7HUpUcwTjnrCcawlSA19qUz9SYvNTR/EuqVKQJwqDF0XbprTN78r4S 3gBtS3Gj0BP7oXml7jRePpU0Dj16vieyeIvveSxhAjdRnrVS+4DZmwWXNOH0eEAMvUzT vhOGCceisadzjvw4EkaQfDO/fRN0AyKJ9fug5iXb+l0FY9J4MAnOQ1nP37n4UmyrF1dN Lpx6RPAgAxFPJz0yhpRbHPruwGC2DbLP/3X+VpA8/ns9P8geKOh7fJNCPMvIjAzu7omx +P1q6SLT49qLf+dF/oezQSWxoaNqWcolN2uQAJy/cKST18m6bjy+PxfJpJ6CKZ8av6NP YxzQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=GsP7dezL; 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 q4si2598227ejr.478.2021.01.18.05.22.57; Mon, 18 Jan 2021 05:22:57 -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=GsP7dezL; 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 S2392102AbhARNV4 (ORCPT + 6 others); Mon, 18 Jan 2021 08:21:56 -0500 Received: from mail-vi1eur05on2055.outbound.protection.outlook.com ([40.107.21.55]:54049 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2391624AbhARMeG (ORCPT ); Mon, 18 Jan 2021 07:34:06 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RlOnihLU/RZv695tPJQWyAQ1iFUsVWMJdjPtDn00eARjHgJZ6xecDli5+oeJ9BpYgKzorJZU8lGA8HslCvFVia4Kvh9XEGMCGBxDyVG5fu+whZVPv6bhjJQ2GjNpyNy4DCUp0LbbDYI1v6zHNTBlrnjCgi4vZDDyW4xWfnFTOTI8DiCe+eBA5Na90oerOGc2mthWj8dDRKsAgjPDPMFBXj9DUdJkg+UnauJlQ16xifCLQXbpPNcv5CfnZCp8m7DM8kDafxxkOf/ejQKDk3Shc1VgyvgJgIwy5bNkZ6DiZkYRRJlKFGTCxwO+dEHpFuS3Mku9Z7KQmMUu8LwYHbCr5Q== 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=PkSoorinffSV5MwGo4NBpSo9Ngyd2vIJJ46YFseK3bo0bW4AbVaXUeiLOP+v0KTJTH3rTEtmUbCslu2TsXGHbi8n281XQiV0AS/SI7Ky+0T6WLo/BXt0hEBuIRR9pvaUEy/1Ucy4aOdONlIYB5MoAbwAXQWaytMMbfqVSFDwnRb7VMsKmvjbxFEhQ016Z199ThDbvmwrW5zEkEv6CV4MBgKh24lDUGzFbYRmJJUPXIVGqMKUWdhE+td8MyoK09iCXYqh/+gGajXteBhuIgcDU+GpLMEUnYKSmxvZoKv+YIGb2BPaObZ/LoOt2Gpd7x/hHR1GfkVJZFbsbBWPBy3TNQ== 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=GsP7dezLQvX8QZ/o8LpL+R6ElXwLadf0AEh55WD5uCpT/8zsQoe+nfi0G9CtnRAkZ3kZ5h3poxBmAWTMMZRd5qFmLIjCEThqr4bD2EY+eYobeYypb2qT0ne4v5FOOQkk0wQ3dP52WlLV3J6xbNuSYW5PVJfS6vi5wghxVuwi9Es= 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 DB7PR04MB5243.eurprd04.prod.outlook.com (2603:10a6:10:17::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.11; Mon, 18 Jan 2021 12:31:18 +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; Mon, 18 Jan 2021 12:31:18 +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 V7 09/10] remoteproc: imx_rproc: ignore mapping vdev regions Date: Mon, 18 Jan 2021 20:19:58 +0800 Message-Id: <1610972399-28286-10-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610972399-28286-1-git-send-email-peng.fan@nxp.com> References: <1610972399-28286-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR03CA0113.apcprd03.prod.outlook.com (2603:1096:4:91::17) 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 SG2PR03CA0113.apcprd03.prod.outlook.com (2603:1096:4:91::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3784.6 via Frontend Transport; Mon, 18 Jan 2021 12:31:13 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5608b491-28b9-4ff2-7e8f-08d8bbacf473 X-MS-TrafficTypeDiagnostic: DB7PR04MB5243: 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: zmhaZTlXYhxUprfjEmH0PQm7U1FUIt//XGzuRW3TdzWoxNMNcyk80SqfzGxKzPQiBs+By/5v5McXeQcW/oLMv6VlBPO49ZrPxMS4KiU3r7x823lPHsCCkVYmd8hUqbJobMLWJ74LcgSrm63DKz/+H2VMPgDXQcui4OnpJjAvypu7R2leqbCP/vHLfP14flP7pWeGzQ/M9Ool1VcVggIxqGbrVevkkaagCjz/TowPPUyyspGSn92IWxX5xRt1VKZSTF9rMO98DC+NQ7UnywSMBvyf0xEjUNBOfsKc8hlLhzpwYKlR8socSsbFH5CfNFh6/9Y9Ou4K0z0P+kYyfVaLFYKuQwj7LdrXKvf/WBpbvyPlHI55SLKFueK2kIvArcpkVFojXUjkPbdIyZI3mWCD6yiIeaj2LI8lklCuoDZakgUM0MYkUDVrrVQmcdMQh/aK X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(346002)(396003)(39860400002)(376002)(478600001)(4744005)(6506007)(316002)(6512007)(9686003)(36756003)(6486002)(66946007)(66476007)(2906002)(2616005)(956004)(26005)(7416002)(186003)(52116002)(16526019)(86362001)(5660300002)(8936002)(4326008)(8676002)(69590400011)(66556008)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: bGP+qyswcS+FhXknx3dNDHS+5N5iWQXKyXnrsVkaqQgWQIjzr/IQQpl2pWVeBLCuc+bftmxIdA+0BLIM4kfG5AxUUUzIiS9i5OKlATZnuHKWJOdDOZCWmBtpmJiwf5YZE/y4ylrpbE+ZnsSPFXuKR4I8PL1Pfm4+uY593Wn9QZ0AsaZ1UdBRLrlGBOvaSZ23rFVbhKKuiYVaOQX3bVMeHgAjZmCdLTqpOwjQd1/OhiID0QezhzJAH79jOgY/T9EIVp6x3I1NhWXfAs3gAhPHgltqAnPV7NTGuYXWNLzfNJtGzwIabmlqPdO6oJ17GZcEVnLfTTcdcMPbNLvc6t0omVqkyASgDH07jx8gtUZp0GqyN9I2Z8EQat8rE+sybLV61Pf03+WIjdoTCgxsRC0A/BEJWA6VDtJ3LKe6bDU3VblJpPnaScdD9a+HrfRz/5ygzUFWejW8DpwqVepceKtSyvy4swJrWcLf1GdV1wY6WNFVOYRqwAraZq6BngGO/xGw5JkST8ctdOMPBM/xLHPt/iIgm46JJXNFbmWLE6nJ5pNTCuszZC6n6neOfiyEjxV7MpYsxolrosnTaIpUdu8V02dK2ueaMn7nfHMVDagoCkqCpIVNIElOB4hVnVnEiY2MZ7AV5Y48B0zoR7V047k7iv+YhDZzIlo2WqVvmnbhe4TU3+DT8S/5NxjgLj5fc7i6+PlEfaiaIMF/ACxDZ1SRdTf8eYpUJ2ydtK7UsqNcUZRTr8MlR1bGFahtywKlCo+jaxYmejKYOgIm8CP72w/vTnFqd0/0hF2kqs2TKF/hvOQrguVe3fZfipLHvi13kDLr+pWfMgQ2/qwMf6MMa3+0VokjCu98alpWlw4HbnxXd99Iq2MMEQHTE8oj7nj85PUJ5RzPbRj14jnazzGaEG/AsBus1A/637TdxsFfGe4WmMNzGmc5kjRMg5LrvT50zEYr66NbvTG9Hh06li4EAyvhhUCK/hB+eoe1OhqQYx8BSEYL5x6QmAyxmFh3q7HP0GeE X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5608b491-28b9-4ff2-7e8f-08d8bbacf473 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2021 12:31:18.6732 (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: wS6B2rlh+PEmGQj5X+RRpVNSTXIJrekt+VKqqhXRZnXsy/vesbATvBJQAmVl+fDZ7Mg8as16qegMM1vXC48BzA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5243 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 Mon Jan 18 12:19:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 365530 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp2221993jap; Mon, 18 Jan 2021 04:36:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJyZMCxZQNBfRsJ7mT+HmIGY70CEytnsk4KBJF2fYY/burIG36Q1CFZs1TDRezy1LxqyOJJF X-Received: by 2002:a05:6402:160f:: with SMTP id f15mr18982489edv.348.1610973392815; Mon, 18 Jan 2021 04:36:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1610973392; cv=pass; d=google.com; s=arc-20160816; b=sviUgr4lSXdM5YLfnKOm3WD3Fy5eDSz/GwFhXYGO4gONfAcbsiMpMHFyh3OhOsvqIA WqCcpSbuJlkki2WqjHGuffFIrwF9DABeCYvZpYITy6UNKz3gxf/nxULkV7NfYL6VHC1d ekbd/4oBgvLViQIPclFZfM8i/5JtI4Dm8wKzXswTCXR2p6vFuQXp+gTzKXps87vIK/cF 4mMMPftoozBQ1vTLcMRtyXQtwsMQZGL6/OGfFPXoEIHNUVVTK+47aM21uQUGW9R2dvgf jRojxA2ye2WgAflGiXDA7nlppL047GkqksxM83OWB9SfcY4Az6+5Tu9Y2OYxsQoi7GKx QpDw== 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=f2iZ3bm7fsGegN2fj7pFUsvH5yZGTZE8RRKgWGqCM814m+pVi42iJhnOY3OMO092Sg NvYUanaNqI9W0AE4fzzr1Fic6EpwPIrUd2bNjtw3vVo77wKi99AjWZBKJdDO1EIjUbco UcmvQ/bitSiyxGWB60bSayacuoFMpyRCM9zEZc0WG5Y4mEiuPO4NQmMoaWo88G4FJVME rjbOH3iGYE4gCbgbbEa02jiTyT1lC4DtJUyhm6Zn3VHarD/4kPqp5BklMWmDkcWGVLRh vJ8KOet4fnyiqRHg/VENiUudIxtnjlRXdMY7tObCB/jgDx3NwDUg6E1urlim0GBdS86Y Mb9A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=UoHObX0+; 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 m24si5275434edr.215.2021.01.18.04.36.32; Mon, 18 Jan 2021 04:36:32 -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=UoHObX0+; 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 S2391636AbhARMfM (ORCPT + 6 others); Mon, 18 Jan 2021 07:35:12 -0500 Received: from mail-eopbgr130058.outbound.protection.outlook.com ([40.107.13.58]:59298 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2391629AbhARMfI (ORCPT ); Mon, 18 Jan 2021 07:35:08 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aLWZbf4WkR9eg+Q3Lovtbx2y/RZuuGWfRnTh/+B23SQvo7d27NiIl0ZG1aG259GPmEGw91w/3hEG1W55khOk0nTAY2gI5J4JI8kMKt6EpLMszLmadWievG8QFEjRb1mTDyCPgDFnY6WhICFqDOa8gfRo4aN45ur5PGHuVuaKnDQ4zKwByaoRRMbv5hKML4f2QbFqss773HaoMOygbz6yVOUDo9VGfAVq8GeJWAelIutzrlbMNfGo7H11RaAzX3ov8y4nVcmg2QW/zH61oDdMVcVxfcEU+7E9fsk9gAosmZUoonyrtKHqKTPtEAdJpNwpRHqh26vnBL0ViPS1SHhHcA== 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=fZJUfoHyEn6Y4YkaXeIvcOWCj5Wlsv28oMmBeIjY6lgj1OsgU+Od1gCvyqUNIIo8WOL/Lp7/OuWmv7E+sFXOMSKy6gH0EtG2jZffi1Rpho2u/D+ohrXHmBY7Dav9YFK6eVRQY884VtloagbTr5Feibo7tS6qibyMgeR/3yWocG0aqs6wO3XMrCOvuO9BGt/Z+Xau8JWLRlgfSF2wLpZ1gQmliKQEcbxTT2twJ9cfv4ablWZzGdD1h4hFgRM8SCeR0754g7suOR4e8F9AaLvx3FO0V99qfpfZSLIlDp8kBBjXG372MVGr09Y2opyH30Jpwevvg3LS9cuKRfxisGHVCg== 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=UoHObX0+Jsd4wHePmFR5BItkZ++uvE05/RLNUgUR2H6FKM2J5xABiblXtsBURXmdFY4zLk7l6b2MLbZh7fVu1Axx04puigIjxMMIdZEorkMuRcdR2iT2Q7PvLmFA/eZrUeLz1pFHe0FZse5gWr8lse/DpDSCJ3tkeS38gDtq16Q= 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 DB7PR04MB5243.eurprd04.prod.outlook.com (2603:10a6:10:17::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.11; Mon, 18 Jan 2021 12:31:24 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3763.014; Mon, 18 Jan 2021 12:31:24 +0000 From: peng.fan@nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, 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 V7 10/10] remoteproc: imx_proc: enable virtio/mailbox Date: Mon, 18 Jan 2021 20:19:59 +0800 Message-Id: <1610972399-28286-11-git-send-email-peng.fan@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610972399-28286-1-git-send-email-peng.fan@nxp.com> References: <1610972399-28286-1-git-send-email-peng.fan@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR03CA0113.apcprd03.prod.outlook.com (2603:1096:4:91::17) 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 SG2PR03CA0113.apcprd03.prod.outlook.com (2603:1096:4:91::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3784.6 via Frontend Transport; Mon, 18 Jan 2021 12:31:19 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 9e9c1bf8-c320-4434-e17d-08d8bbacf7dd X-MS-TrafficTypeDiagnostic: DB7PR04MB5243: 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: Ku/7P0UZFL1+ta5YMzAnELpm/4xbSz80vroQMAD/UhNFJi9W9Quwl1EgndBJfIrskWmigTWDRwTYkytK8IovaGXgtsPAmqvAcVohrrWWj5QGDHBlZ4kLEQabRK/ktOvy+obIYXuSyhNb0k8FnssqFl/o+DzEx+hY4YcyO54AaSickLrXngkd5cnYClwigCS3xly26uDKECRXTQTsRYW7zB2zfj/DalT8lxf9LkWBs2XsNeKXyZ6jaspwSy9f+IHozBI1wL8XqY6pKRecOVpDu4ZHG55NcmtbrrpIp+Iympw9O+6fGmo/SmifxvP4sWgVsZ360KLYdDzFpbu3zayjhOOQQd1DJt696zlsWmU0cGRI2WUUKm+oY1GinDUEdho+HuRxOt7cgXle2Ro2ZbOXWsOup2mjbyYAeyM8Vz4DuGkD58ZnPKs5KOkF1UH+Jks1pFqYrRX0MCSiLUGRFzj1Dw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(346002)(396003)(39860400002)(376002)(478600001)(6506007)(316002)(6512007)(9686003)(36756003)(6486002)(66946007)(66476007)(2906002)(2616005)(956004)(26005)(83380400001)(15650500001)(7416002)(186003)(52116002)(16526019)(86362001)(5660300002)(8936002)(4326008)(8676002)(69590400011)(66556008)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: YlBN6rIMc6Q0CU8GUwE4d9dXjUg9nydi3AUDzjAUGZX4V1iX3UnAOCP7e1dKsFRtR2VARtLsNfQeH+JWRrvrx78cDbREk49eNu9Yo52f2n8Axl2put054Z5jBBMfYrbU/X6muv29XxL8KlOb83Wb8O6IJqLvJjFwkxToUWUFR9w2O46KTIvuaBY4rZxk0GwwVHabxZZZPfMKte/TqtF9ZuRzjtdjEay9jMm6X5hAdWEF6PNZyntkYhjTnCEU+GrBg+nh7tBn4ju1KTyupczqWAHWVS3UnCaHWTUp0koebIxYNzy3QHA+xdv8OKHU3UKzzTDQpByYh2nARJVriW22F4Pq5cyFyAvNcDoON0zDfcGzzUc4aIEGbbvGQpA4EwBHv5NMETuuseKghCCHCAlnbJ0VpB6bJN7sTk5fJz8+1ANJrzfaptEBHxbz21p8Hq0WRRrog7wGr7l6R1qm7+lwOpOsKcSQRPp2Zcpr3HgDQ1wQrpLqRAFVa8JfhFIM+RQ5idKNZpyQnIKPyhPaVcBY4gzVvB+vBVDBDDySCkz59dEhAGsUJtKLlDeHTR1Qn+giqD9fpUUPzoz6ENnImNv2a4o17J+8k56S/lQOYOftvGRBcxXfBO7KqvilNv5qIHOi9bTttatVTCRRymzGArvf8M2w4U2aqhi9/pk2zUb+HiMpVj2WqmnMevhgB7U2qDo1FvU//y9Kwz59hGyRxfNyk7/7w1WSMtmIgcCW5bH9B93+IX0U6V7Z0N+xEmUAZefduMvcnTQpw6Qww10O8U8PF3tRg0qCr9TZOq2AWyOfvMjkSW1gLKF5nUDffdTbB45WwUc/ngeuku0emg2W9E6Naaug0AJMG5MYzxP8kPL14moKn4z9bkmru8JpGP7RF3JOY9cpa/Ha9r4ea7dMHO7HlZm4q+UDcLQI387vWYmAi1F/c3wr79+BGYOFrDjUcq731WJJjim5vXkhrcWgp2zDQMLaZElzRMjj3VSTzIHcpZOOZTPEErHy5xmQDjQWvaba X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9e9c1bf8-c320-4434-e17d-08d8bbacf7dd X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2021 12:31:24.2156 (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: OdUGwZ/6sRyTCWgTPL6u5MclMt4w75q3yJFnesg2Kp/NvNQ/XQEM+8HMbo2OutA7yJjQebGUmtBwkRo9T0zTpA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5243 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 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;