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: 12027111 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7EE8AC433E6 for ; Mon, 18 Jan 2021 12:32:18 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 19EA2222BB for ; Mon, 18 Jan 2021 12:32:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 19EA2222BB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YZEntgS5CgS6SDa1MPoH2L6YM5quK8jNwhlobHetRyE=; b=xgpj0MiTq66PaqU6Disr2Qket +MWXwuGWOpoJHM4W73YyabtZxh7lh4O5527E+P9MJ6SetUEL0JoTp91ILLovmDnqtW+xsRrTfzmEN hUloFet1pGv2ICVuTCoMqpeXSpAwLMg7LFsjTEr+os8Mhl2Ay6NLjC4q7O58/ibYcE+UD5850jNXV hNCOCtBraGrBUQd8jW+9zo5180tg5Z3b3J2IVTIFS/aAy/feHGLvVQnPdSFbVjUpD9KjkVjI3zzZa 1d8SFs3ovwCrHI2tXwLDdeKDhHkPQxJKe6/pxG66JOX3GCHTnnwkiMUdvEmOj9BNutmBdUdD4qfHc /YTJMHWnw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1Tg8-0002zU-4r; Mon, 18 Jan 2021 12:30:40 +0000 Received: from mail-eopbgr130041.outbound.protection.outlook.com ([40.107.13.41] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1Tg6-0002yw-1D for linux-arm-kernel@lists.infradead.org; Mon, 18 Jan 2021 12:30:39 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210118_073038_101873_68BEAED7 X-CRM114-Status: GOOD ( 15.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, patrice.chotard@st.com, paul@crapouillou.net, agross@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, matthias.bgg@gmail.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan Convert the imx rproc binding to DT schema format using json-schema. Signed-off-by: Peng Fan --- .../bindings/remoteproc/fsl,imx-rproc.yaml | 59 +++++++++++++++++++ .../bindings/remoteproc/imx-rproc.txt | 33 ----------- 2 files changed, 59 insertions(+), 33 deletions(-) create mode 100644 Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml delete mode 100644 Documentation/devicetree/bindings/remoteproc/imx-rproc.txt diff --git a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml new file mode 100644 index 000000000000..bce6ccfe1538 --- /dev/null +++ b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/remoteproc/fsl,imx-rproc.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: NXP iMX6SX/iMX7D Co-Processor Bindings + +description: + This binding provides support for ARM Cortex M4 Co-processor found on some NXP iMX SoCs. + +maintainers: + - Peng Fan + +properties: + compatible: + enum: + - fsl,imx7d-cm4 + - fsl,imx6sx-cm4 + + clocks: + description: + Clock for co-processor (See ../clock/clock-bindings.txt) + + syscon: + description: + Phandle to syscon block which provide access to System Reset Controller + + memory-region: + description: + list of phandels to the reserved memory regions. + (see ../reserved-memory/reserved-memory.txt) + +required: + - compatible + - clocks + - syscon + +additionalProperties: false + +examples: + - | + #include + m4_reserved_sysmem1: cm4@80000000 { + reg = <0x80000000 0x80000>; + }; + + m4_reserved_sysmem2: cm4@81000000 { + reg = <0x81000000 0x80000>; + }; + + imx7d-cm4 { + compatible = "fsl,imx7d-cm4"; + memory-region = <&m4_reserved_sysmem1>, <&m4_reserved_sysmem2>; + syscon = <&src>; + clocks = <&clks IMX7D_ARM_M4_ROOT_CLK>; + }; + +... diff --git a/Documentation/devicetree/bindings/remoteproc/imx-rproc.txt b/Documentation/devicetree/bindings/remoteproc/imx-rproc.txt deleted file mode 100644 index fbcefd965dc4..000000000000 --- a/Documentation/devicetree/bindings/remoteproc/imx-rproc.txt +++ /dev/null @@ -1,33 +0,0 @@ -NXP iMX6SX/iMX7D Co-Processor Bindings ----------------------------------------- - -This binding provides support for ARM Cortex M4 Co-processor found on some -NXP iMX SoCs. - -Required properties: -- compatible Should be one of: - "fsl,imx7d-cm4" - "fsl,imx6sx-cm4" -- clocks Clock for co-processor (See: ../clock/clock-bindings.txt) -- syscon Phandle to syscon block which provide access to - System Reset Controller - -Optional properties: -- memory-region list of phandels to the reserved memory regions. - (See: ../reserved-memory/reserved-memory.txt) - -Example: - m4_reserved_sysmem1: cm4@80000000 { - reg = <0x80000000 0x80000>; - }; - - m4_reserved_sysmem2: cm4@81000000 { - reg = <0x81000000 0x80000>; - }; - - imx7d-cm4 { - compatible = "fsl,imx7d-cm4"; - memory-region = <&m4_reserved_sysmem1>, <&m4_reserved_sysmem2>; - syscon = <&src>; - clocks = <&clks IMX7D_ARM_M4_ROOT_CLK>; - }; From patchwork 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: 12027115 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8331AC433E9 for ; Mon, 18 Jan 2021 12:32:19 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3F7912225C for ; Mon, 18 Jan 2021 12:32:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F7912225C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mO8zYK22whNIMkGc785ynhnh9D6lv+caySPPqrQw+pY=; b=thtnyDxvSnvPQbJ2G48aXjrh6 nLpgEkW/JCn+WCLhcFn+S0euQzYkOhqZM0OzvRM+WT6RzjAWTrIQRJcQphNPWb6y6/yafSRP2ptgT KMD67AFlcXmrAETvbfoyrC87EVMF+cW8sFqGM1EA6SXGlaEevbFEAZaRDxdDRvhYbymKHsrYcpBrV 9U4ao0JXI9uFIAXIdImsENO4RwcmFcxm/J+C5M4hIUQv5NkSEgJe+Spd0qVNsAYP8pj4C/9dnLdss Nd+UPclZOgVet/MmRnl8BwL0a+jfFAU+OxopLKdU4lRzR5Kyh116lxTks6pHBNbcalrlNhWVMEb3y P65QeTkHA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1TgD-00030p-NR; Mon, 18 Jan 2021 12:30:45 +0000 Received: from mail-eopbgr130058.outbound.protection.outlook.com ([40.107.13.58] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1TgA-0002zh-VT for linux-arm-kernel@lists.infradead.org; Mon, 18 Jan 2021 12:30:43 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210118_073043_220004_14F8F1C2 X-CRM114-Status: GOOD ( 12.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, patrice.chotard@st.com, paul@crapouillou.net, agross@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, matthias.bgg@gmail.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan Add i.MX8MQ/M support, also include mailbox for rpmsg/virtio usage. Signed-off-by: Peng Fan --- .../bindings/remoteproc/fsl,imx-rproc.yaml | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml index bce6ccfe1538..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: 12027113 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FB66C433E0 for ; Mon, 18 Jan 2021 12:32:19 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3AA64221F8 for ; Mon, 18 Jan 2021 12:32:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3AA64221F8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TeL63D8bCGgMSAwkzCKJfmrj4OUtLgqGVncUE9rZ6H8=; b=kyTYPXfo7Jx6jl8QYXIm9koY9 Gji+j9Yx1OfmKTXvIXi9tso9G7rLAy4O71TI+0Ew4by2zcLn2/RBQEslDSQ+qoGnlN9COirvSMgNB tUaPTmNCnBqYPCE6Z4XXUjHKRWzInrw/IpfCzVY5yAqQCpWGA2b2idXXT21Vcj6I45MbbB60QRJS8 nCvOCSsx8VlPfzLD8EVqLJ2rOgQsZh7+g9uvm+PfiJJ0g0Q7/l2J+la6MSPoRkjeZ4ZoikMWgT5R3 fEcM+r7KxthdHTx97be6NG8+vqUMH4wKqJpezuM22J0Gm8+XCd2j48P25/QPu4djRppWLc9OlVJvC +zIWbKRwA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1TgL-00032q-G3; Mon, 18 Jan 2021 12:30:53 +0000 Received: from mail-he1eur01on061d.outbound.protection.outlook.com ([2a01:111:f400:fe1e::61d] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1TgH-00031W-P3 for linux-arm-kernel@lists.infradead.org; Mon, 18 Jan 2021 12:30:51 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210118_073050_785611_88F33553 X-CRM114-Status: GOOD ( 11.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, patrice.chotard@st.com, paul@crapouillou.net, agross@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, matthias.bgg@gmail.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan Introduce is_iomem to indicate this piece memory is iomem or not. Reviewed-by: Bjorn Andersson Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier --- include/linux/remoteproc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index f28ee75d1005..a5f6d2d9cde2 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -315,6 +315,7 @@ struct rproc; /** * struct rproc_mem_entry - memory entry descriptor * @va: virtual address + * @is_iomem: io memory * @dma: dma address * @len: length, in bytes * @da: device address @@ -329,6 +330,7 @@ struct rproc; */ struct rproc_mem_entry { void *va; + bool is_iomem; dma_addr_t dma; size_t len; u32 da; From patchwork Mon 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: 12027119 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D491C433DB for ; Mon, 18 Jan 2021 12:32:26 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4EF42221F8 for ; Mon, 18 Jan 2021 12:32:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4EF42221F8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pl3PU7BTxEJFFOOTNZLYT3KdVvZVYBugGxj1LpgKqjM=; b=sxAm4xIn2gbA6hmt45p+nlODE hoQsHWPV3aTOOln+92wuAIOQMUNL5ohLvSUSVUQrTQ6ZSNx43AYr7AcikQnTimBOJZrFlzxb75HTf FQOtrRJFnHAsC0thgRmTwXk7tDrwiKhFl6QzrRVhMHM7Fx4anf0ceL5CVlGRkUJSzPvs6DjJw5AO6 5Rk2t4iRbhS/XLDQ1SmvRfrFj/UAKCM85paIsWA8bPxJ4GvBQT8Wc4hXN/QMN5xKRBEUxhyLhdYnn RMDYmHrVPs5fvxaxtsYHkWR7yn8fnQuIRMA4lXGBaKBPStf3nATyZRPn+rsVidRFVRCcVOqTQwFzu bBer/xKjA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1TgS-00035L-K7; Mon, 18 Jan 2021 12:31:00 +0000 Received: from mail-eopbgr130052.outbound.protection.outlook.com ([40.107.13.52] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1TgN-00033G-JP for linux-arm-kernel@lists.infradead.org; Mon, 18 Jan 2021 12:30:58 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210118_073055_820022_908B6DAD X-CRM114-Status: GOOD ( 18.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, patrice.chotard@st.com, paul@crapouillou.net, agross@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, matthias.bgg@gmail.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan 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(-) 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: 12027121 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24F7EC433E6 for ; Mon, 18 Jan 2021 12:32:34 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C9204221F8 for ; Mon, 18 Jan 2021 12:32:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C9204221F8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kD7heymAe6N57Th45P048pw/aE4orizX7V73fLQIblE=; b=Ks/Kc8x0RfYrixKKTvjQ9VtxI 1ON8UDGQo6glXJ9TWTqvUIk1JhrGmPrLOomc/wO6YQhJ7+WEhJMRQ3vg2l7V04fDtUAnYovomDFLb I7pYOQ2q72pnp3i3zPB8UBo/rc01nu7pNTWmoTiCe1oQDtX+MFjN6rTRBXufOcr67BpbsjnRIm1AH F1ADaoG3Tt2Q6fytTp6d4H2Yf0oA/6qTz40P1RglEp8V/82LO/OsyySXywZ4loitkORnDH/xZM7Q9 5aRlNkVD7I3d0v63Qam4mWTD7MkF3Mi8V7G079i+khwJVB4P75HB0gU4Cir+VmpPe8bT6JUo9ucvw 3mLddvYyA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1Tga-00037o-Pp; Mon, 18 Jan 2021 12:31:08 +0000 Received: from mail-eopbgr130052.outbound.protection.outlook.com ([40.107.13.52] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1TgR-00033G-5Q for linux-arm-kernel@lists.infradead.org; Mon, 18 Jan 2021 12:31:00 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210118_073059_241865_50994664 X-CRM114-Status: GOOD ( 13.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, patrice.chotard@st.com, paul@crapouillou.net, agross@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, matthias.bgg@gmail.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan It is using devm_ioremap, so not devm_ioremap_resource. Correct the error message and print out sa/size. Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 6603e00bb6f4..2a093cea4997 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -268,7 +268,7 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, priv->mem[b].cpu_addr = devm_ioremap(&pdev->dev, att->sa, att->size); if (!priv->mem[b].cpu_addr) { - dev_err(dev, "devm_ioremap_resource failed\n"); + dev_err(dev, "failed to remap %#x bytes from %#x\n", att->size, att->sa); return -ENOMEM; } priv->mem[b].sys_addr = att->sa; @@ -298,7 +298,7 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, priv->mem[b].cpu_addr = devm_ioremap_resource(&pdev->dev, &res); if (IS_ERR(priv->mem[b].cpu_addr)) { - dev_err(dev, "devm_ioremap_resource failed\n"); + dev_err(dev, "failed to remap %pr\n", &res); err = PTR_ERR(priv->mem[b].cpu_addr); return err; } From patchwork Mon 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: 12027123 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62627C433DB for ; Mon, 18 Jan 2021 12:32:36 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1C25022B47 for ; Mon, 18 Jan 2021 12:32:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C25022B47 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kFHanEakSdTcrbz0nm9LgnvogecTsIk/Y7h65tYgnDk=; b=eckMsvFJVa43EhmIq6Clhl/HW o6Pl7MfvkSGR79Mn/6YBu9GdlN51Innbcp/F3bGxOZBhEiPxDlToEDqTZ/aI4w3oauW0Cz3UwWhwx EY4/ilKnONS6qjQMkKAfWd8n4AOHhXcyfXz0k7HweAzxrL95O8+/+h2PJr1Rek7HdPnE8WoPGpGsn 9Oiv2QM7IZ9bWV/q/UDxsyhsGhIeX4VI1E+Q0Himu/lbFYX9r7KCKTSE6WbHliAIZLck6YLP2tNyV Z47AzbsrJMpjS4PJNAtnM33HdMmWMnWJU6y4bC939Ir5gsGFiQZ9PzH90bjldEf1/kzkHluMAZ4KQ uPlyYNLGQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1Tgf-00039R-Nb; Mon, 18 Jan 2021 12:31:13 +0000 Received: from mail-eopbgr130050.outbound.protection.outlook.com ([40.107.13.50] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1TgY-00036k-7P for linux-arm-kernel@lists.infradead.org; Mon, 18 Jan 2021 12:31:07 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210118_073106_315693_D71E28CA X-CRM114-Status: GOOD ( 13.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, patrice.chotard@st.com, paul@crapouillou.net, agross@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, matthias.bgg@gmail.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan We might need to map an region multiple times, becaue the region might be shared between remote processors, such i.MX8QM with dual M4 cores. So use devm_ioremap, not devm_ioremap_resource. Reviewed-by: Oleksij Rempel Reviewed-by: Richard Zhu Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier --- drivers/remoteproc/imx_rproc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 2a093cea4997..47fc1d06be6a 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -296,7 +296,8 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, if (b >= IMX7D_RPROC_MEM_MAX) break; - priv->mem[b].cpu_addr = devm_ioremap_resource(&pdev->dev, &res); + /* Not use resource version, because we might share region */ + priv->mem[b].cpu_addr = devm_ioremap(&pdev->dev, res.start, resource_size(&res)); if (IS_ERR(priv->mem[b].cpu_addr)) { dev_err(dev, "failed to remap %pr\n", &res); err = PTR_ERR(priv->mem[b].cpu_addr); From patchwork Mon 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: 12027125 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39EF0C433E0 for ; Mon, 18 Jan 2021 12:32:48 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CC443221F8 for ; Mon, 18 Jan 2021 12:32:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CC443221F8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3MhynoencNAmSvh3qmz1estWc+o+yT5ZlhJemlUYXgo=; b=N2mh+LWHSSijhyQQQnzGc00j4 4vGvelcAh98JI8mDARBIyVS2RORu2FPRjIHNkBvGifypmc00ni8cs9EihGDBFHBynQwhaboiGlLvc vADyaNFFqC47rEnHueZc1Y2KpS+pHv5L6H1TeqmFyuMoSykMqqkBsMg5p4YaSIgxCsR6Vr471Tkof TAoXxqcoRuisajokDGSG1hUhPFq0d0RrewqqPYMztiLSk/3wc4SHamUPk/bjVDvKSyrdI2x8zRdhC kPUKI7sNy1fVfqo2+TueYOHRzjhSaC8KXaAIjeNG8aMc9/RX+EFlKM2Vvl6RxAskwKwEmhniY2fDR kovWvkg7w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1Tgp-0003Eq-MU; Mon, 18 Jan 2021 12:31:23 +0000 Received: from mail-eopbgr130088.outbound.protection.outlook.com ([40.107.13.88] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1Tgd-00038q-Eg for linux-arm-kernel@lists.infradead.org; Mon, 18 Jan 2021 12:31:12 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210118_073111_557159_E94BAD92 X-CRM114-Status: GOOD ( 18.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, patrice.chotard@st.com, paul@crapouillou.net, agross@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, matthias.bgg@gmail.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan The hook is used to parse memory-regions and load resource table from the address the remote processor published. Reviewed-by: Richard Zhu Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 93 ++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 47fc1d06be6a..5ae1f5209548 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -241,10 +242,102 @@ static void *imx_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *i return va; } +static int imx_rproc_mem_alloc(struct rproc *rproc, + struct rproc_mem_entry *mem) +{ + struct device *dev = rproc->dev.parent; + void *va; + + dev_dbg(dev, "map memory: %p+%zx\n", &mem->dma, mem->len); + va = ioremap_wc(mem->dma, mem->len); + if (IS_ERR_OR_NULL(va)) { + dev_err(dev, "Unable to map memory region: %p+%zx\n", + &mem->dma, mem->len); + return -ENOMEM; + } + + /* Update memory entry va */ + mem->va = va; + + return 0; +} + +static int imx_rproc_mem_release(struct rproc *rproc, + struct rproc_mem_entry *mem) +{ + dev_dbg(rproc->dev.parent, "unmap memory: %pa\n", &mem->dma); + iounmap(mem->va); + + return 0; +} + +static int imx_rproc_parse_memory_regions(struct rproc *rproc) +{ + struct imx_rproc *priv = rproc->priv; + struct device_node *np = priv->dev->of_node; + struct of_phandle_iterator it; + struct rproc_mem_entry *mem; + struct reserved_mem *rmem; + u32 da; + + /* Register associated reserved memory regions */ + of_phandle_iterator_init(&it, np, "memory-region", NULL, 0); + while (of_phandle_iterator_next(&it) == 0) { + /* + * Ignore the first memory region which will be used vdev buffer. + * No need to do extra handlings, rproc_add_virtio_dev will handle it. + */ + if (!strcmp(it.node->name, "vdev0buffer")) + continue; + + rmem = of_reserved_mem_lookup(it.node); + if (!rmem) { + dev_err(priv->dev, "unable to acquire memory-region\n"); + return -EINVAL; + } + + /* No need to translate pa to da, i.MX use same map */ + da = rmem->base; + + /* Register memory region */ + mem = rproc_mem_entry_init(priv->dev, NULL, (dma_addr_t)rmem->base, rmem->size, da, + imx_rproc_mem_alloc, imx_rproc_mem_release, + it.node->name); + + if (mem) + rproc_coredump_add_segment(rproc, da, rmem->size); + else + return -ENOMEM; + + rproc_add_carveout(rproc, mem); + } + + return 0; +} + +static int imx_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw) +{ + int ret = imx_rproc_parse_memory_regions(rproc); + + if (ret) + return ret; + + ret = rproc_elf_load_rsc_table(rproc, fw); + if (ret) + dev_info(&rproc->dev, "No resource table in elf\n"); + + return 0; +} + static const struct rproc_ops imx_rproc_ops = { .start = imx_rproc_start, .stop = imx_rproc_stop, .da_to_va = imx_rproc_da_to_va, + .load = rproc_elf_load_segments, + .parse_fw = imx_rproc_parse_fw, + .find_loaded_rsc_table = rproc_elf_find_loaded_rsc_table, + .sanity_check = rproc_elf_sanity_check, + .get_boot_addr = rproc_elf_get_boot_addr, }; static int imx_rproc_addr_init(struct imx_rproc *priv, From patchwork Mon 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: 12027127 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B76BC433DB for ; Mon, 18 Jan 2021 12:32:49 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 306B6221F8 for ; Mon, 18 Jan 2021 12:32:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 306B6221F8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=u9jSdJ3zPj+Vmi4eauVS7bUga+/wJRRaV1Xshjid5dE=; b=pavT3jo+J1IgeUqmPExcUMLCI zL+4PIkQ+eGDbvpxzlWMtaZYuO6omyOjAbs9OGWUBwJrjVUoEVQKWw4bsN0F9z60Giebj+lEGf3eS 4ENhFQT+8jQofk6qOBzxeeDtiF/UieM8pZsHgAkTWaXpTF8cUBijnN4k5j3bVfrYHsovDfnWWDObC LRiUPrvv1OR5UTFKzxmfs/EAa5nf+k5eSvywNQgRlRvrXTnkpRS0eUObX4gSa9AEoNZnbJRQ6uqWl t7IK7eIycKJaQrTo2wDNv38LoTjQroLKRh4x2YnDyO/iDfmQTagpHNegC1CdPm4NtvZEVu6CpigK2 l5uv8nKeQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1Tgx-0003Ik-NK; Mon, 18 Jan 2021 12:31:32 +0000 Received: from mail-eopbgr80053.outbound.protection.outlook.com ([40.107.8.53] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1Tgj-0003C7-Qn for linux-arm-kernel@lists.infradead.org; Mon, 18 Jan 2021 12:31:24 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210118_073117_929322_E62C556C X-CRM114-Status: GOOD ( 13.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, patrice.chotard@st.com, paul@crapouillou.net, agross@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, matthias.bgg@gmail.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan Add i.MX8MQ dev/sys addr map and configuration data structure i.MX8MM share i.MX8MQ settings. Reviewed-by: Richard Zhu Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier --- drivers/remoteproc/imx_rproc.c | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 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: 12027131 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BBFDC433E0 for ; Mon, 18 Jan 2021 12:33:29 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 280C7221F8 for ; Mon, 18 Jan 2021 12:33:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 280C7221F8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6ztYgofI8+WKkoIi07zAyq4f0yf3K6kPm/9QcDPezdo=; b=h7eXNgw4KqGD1ospuhrje4L1i Sl9RD+fcQ/S81GEwCjOwriDDJtWNf9oCldBomgdE8liot8LUB7s7t8WKl9hxGmlyFd9HBEZqNUODd RR15vOEIvwSFizCAcDqmPctQAxwfCkU28TURM0qJHlTN8BdR9AqNPopf3g+TJJkdIo/Kg8dTT728g JCi1UiZbmq9VnbIAF03jFE1A7VSsghGiA4W+A5vg22JrVzPLF1uUWiEUSBLlpkKTgubV3mDBZoDCp /oJgNPonbxtIsLhMloltN1WnnTtMJM2+da5D/uSVz1xzrixtR53QJFfkJTJSg2u8QcQqYYrqH5SsA SpkVtkVdQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1Th8-0003LA-Np; Mon, 18 Jan 2021 12:31:42 +0000 Received: from mail-eopbgr80053.outbound.protection.outlook.com ([40.107.8.53] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1Tgq-0003C7-GQ for linux-arm-kernel@lists.infradead.org; Mon, 18 Jan 2021 12:31:28 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210118_073124_603520_59D60810 X-CRM114-Status: GOOD ( 12.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, patrice.chotard@st.com, paul@crapouillou.net, agross@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, matthias.bgg@gmail.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan vdev regions are vdev0vring0, vdev0vring1, vdevbuffer and similar. They are handled by remoteproc common code, no need to map in imx rproc driver. Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier --- drivers/remoteproc/imx_rproc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 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: 12027129 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D4A1C433E6 for ; Mon, 18 Jan 2021 12:33:25 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 52C69221F8 for ; Mon, 18 Jan 2021 12:33:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52C69221F8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=PWI2pKZ6OSgnF3hKZTXZaRqShj9nuS3wdz+hV7zlZBY=; b=GTr6gar7AOQ702L+G2y6dTWJL pRAnm7PhaE/NK6oMOzNmZ1NLgl+IUoqPVx6EMpABmTNVSMPECT6qYE7Bkn9bDwS8qVADVY4Ekg19G PXrx6lv09LADk7RY6JY/KojUu3olxP2C9uODtLmZs/Tky/dgkKSryDEo+ZZD9Wvhbp08oqV7GN4iz pEX30zHrc89LvicahdZX0Nlg2pNvArtCJyKa4nQdOi1nmfG71FyZmDjVWcmOCqY5bE3uXVqaw1uTs SOhkMLPl44oh+pOnEYRmwb91ct9LJ2iW4dWWk/4d0YL2CeoFhoEvrTP++7ZANh8mISYQqf8k01WgO iPXvRetdA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1ThB-0003Oz-Dd; Mon, 18 Jan 2021 12:31:45 +0000 Received: from mail-eopbgr80053.outbound.protection.outlook.com ([40.107.8.53] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1Tgv-0003C7-8N for linux-arm-kernel@lists.infradead.org; Mon, 18 Jan 2021 12:31:30 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210118_073129_328042_57CB8B0D X-CRM114-Status: GOOD ( 21.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, patrice.chotard@st.com, paul@crapouillou.net, agross@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, matthias.bgg@gmail.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan Use virtio/mailbox to build connection between Remote Proccessors and Linux. Add work queue to handle incoming messages. Reviewed-by: Richard Zhu Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 116 ++++++++++++++++++++++++++++++++- 1 file changed, 113 insertions(+), 3 deletions(-) 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;