From patchwork Mon Feb 15 12:34:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12088159 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=-11.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, 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 B8A93C433E0 for ; Mon, 15 Feb 2021 12:47:56 +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 6839E64DF4 for ; Mon, 15 Feb 2021 12:47:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6839E64DF4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References:List-Owner; bh=wi9WmimxKyy3V2iFYJeM4rCfxPdTSKoBUNiM5XFZtLg=; b=AXBwPeOy4fHJkiUOganmLBlcik fSdkPbYe7gHkxnV7mbWH4yRGuDO3tN02CQ8NYn/6mFUUvhlkkEcCSEm0g51VpgWrabze3ObDuu0YL rXeuXdXaRoeVHTkdhOOKC2qPFcFXmOjnQ6GWpo9SLU+7ACclV0kzOfyL2/3jAXeeM4Ab9afaMsOhJ e14eY+xc/2YbiswYgimfaJ69IMN7WNiMJWZRNUeAa2Hlb4/ufOgH0wZ+QmVdHqiVYQAaqLiFWfkK+ GCUN3Y0wzcADJ7oLXkVYAqBBLVIexCzIL52XN24gvwYIs+dNOp6NZ+1QTnYpod6SEOX/gsJdU+96t qJ8Xpoaw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBdGl-0003VZ-NU; Mon, 15 Feb 2021 12:46:27 +0000 Received: from mail-db8eur05on2047.outbound.protection.outlook.com ([40.107.20.47] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBdGi-0003V2-AW for linux-arm-kernel@lists.infradead.org; Mon, 15 Feb 2021 12:46:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qfywkcr51nfK/nKk6phHkMCrU8V5FvHGG8sqWMuYAraZXL6G7vV5IMSWK3/uUhAbX8AtRN4yyPf9FsI5FlJOvEYsGErCtFO0KfLyEU+jbARjesgtUbORrb+Jka3Lmkd54JesfgHl7TTaCP8h3/JwNzIYrq7Rg//k28iZDy79l3/ww4sRw7yKE8fu7D24n0VqA0N9fSRp2vm7wYczllQjQo7q9GqLn5uvL17OOz8rbCgZTCsHOU8gZQ8hXLhnSlwNR+wo72HuGKZtsaPgYSjTk/cnHxaK9+4IFquMU6VIq1PTjFVKVlbQnksagiTwb6JjkCLuMUWQXM/T02MNl0k2DA== 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=Bw6qdWEjO7pS0I7AeO/4Rp9HIpEHn3VBbnU2UcSJQZE=; b=LDmUQRz/lQvXCjvtQnyDk3H/7z194Cg5Orqk4McymCp12rxOaoipJb3HQE+EEZk0yKEQoLBrCPWDa0SyFtgBkfDFafAYdt8dVHcOkaJ1aDkUNXOJo3Sg6xttTIo9J9tyPPM+rflwxdR+0Kwg9PbgozgCsw/Dg8wueW65O3rTMh6LIkBCqp0IwxF15n/cHerAZ7B9Rt7fy6F8gFOq0wRJOeaLdZ3trJmKGU3Bq2ZhFyk71SdBS2pRG8q3K3peULc3O7jLHstbRDXtpFmW6lbitWrOVGPo1sxb/VUJvt3fe1ge9vO0+I7FLrKP0uX/ancgOk8QgnzgI3QLYzDnK+AFlA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Bw6qdWEjO7pS0I7AeO/4Rp9HIpEHn3VBbnU2UcSJQZE=; b=c94CqRYdvAu4ovEymQ2QKl1micxt5D4vsWtKdQP3z4SpWVO/+ZqTJS5Bim7fqb/STxMYX7Scui8mJ8MuSUGD/S+oeFXYr0v8psm5u4PMKaJf21D7umpN7+wlW/ME0z4kkvJjB29o/r+edd+m2DGujF8eJiFycVdOL8HdB0YataM= Authentication-Results: wizery.com; dkim=none (message not signed) header.d=none;wizery.com; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB5081.eurprd04.prod.outlook.com (2603:10a6:10:23::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.36; Mon, 15 Feb 2021 12:46:18 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d58c:d479:d094:43d0%9]) with mapi id 15.20.3846.027; Mon, 15 Feb 2021 12:46:18 +0000 From: peng.fan@oss.nxp.com To: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, o.rempel@pengutronix.de, robh+dt@kernel.org, devicetree@vger.kernel.org Subject: [PATCH V10 00/10] remoteproc: imx_rproc: support iMX8MQ/M Date: Mon, 15 Feb 2021 20:34:13 +0800 Message-Id: <1613392463-9676-1-git-send-email-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR0302CA0019.apcprd03.prod.outlook.com (2603:1096:3:2::29) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SG2PR0302CA0019.apcprd03.prod.outlook.com (2603:1096:3:2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3868.12 via Frontend Transport; Mon, 15 Feb 2021 12:46:12 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 09c89f3b-6a92-4a74-dc12-08d8d1afb029 X-MS-TrafficTypeDiagnostic: DB7PR04MB5081: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lIN2hQr2lifOnPDTA4nZ6gFAJJ+60h10C37YKN++fjkvCY2y8wpDnL5KzkyRvGEQSXeCPhrMM387xI4gaRYmfHiOlWj1Zjlz2pzSiktwuG65mVd+UafnbWJPKhyYFHhq+zOAMOFM461bMJt+f1AnQjJwzG2xhWqvJjkdwYHaz/bx21PQ0hJJwZMgqPZZ0joUrzoGUgaY/5R09FvMynHWQRFKGIWsZvysZ1FxR3BH0TSoRoa3SwamfvW88wwXoZMr4L2JeRp3EaQ484ADRVht1iGvN4lrp8KyU78+GTmS5nXj/Aidz6eF7nF+d+Gx1ozYN61n0LlQtp2IcrhJ7+p1K3N/QxQP4vuVciCJ2uAPodXqetkDb6GvMPS7ugh0W9PL2sWaNGUtxu8RLOsInhcxW9xo8zFJ3UCZxXY93hsZHeCOGYGF0CZ2AkCdgzl2aPk2/iag3qVhWE1iaoWqDxf1IIBTGnd1nkeUCPEpK0EVRKKjUYm6EqpJt8yWyOFDG3ZrO7sGRWxeh4haY5Rre639mcQjHTEbwzNiqm/2xwdHXrbalsZgtbNbXvuIfUM7ZdC4wgLrIayZOEvPIBzULEU+8oA9/u/x+NcNRLr3pQR99O1M5/Ix5rVZGzwSx2Czni4EU/nc2K3I94m2paqEyJGVcpJBJWyibk9IYhj8VIlzvOhuByj978ONtNYyWu5JGNoA X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(366004)(136003)(346002)(39860400002)(396003)(4326008)(86362001)(16526019)(186003)(66556008)(6486002)(69590400012)(66946007)(2906002)(66476007)(7416002)(956004)(2616005)(26005)(83380400001)(8936002)(8676002)(9686003)(6512007)(52116002)(5660300002)(316002)(966005)(4743002)(6506007)(478600001)(32563001); DIR:OU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48XuXiZ7YmwEcWi5vA5BPjt1lBqixP6RdSGySmkU1LCgXUc08F7DQtkum3Qj7LOI9SDYLH1Nkpxg4cE2MS1hj8fRr6sqNtMjlJpg/0OPV6GxplJrrsXkoeUfPllzvvGTfFr1mhNGbOedOahB+1M2XLlwugHrvtWHfs5vw8kefzvqs1RiQx1kIp2Mf+D41qplAr+dqKrkQ25HepS8qhy6XKBW0qbpdrwwglINLoH4wpTxLb46YxnjQro7KVynqva/rObpHi1DMJyt8krMbS5g86SYOEFc2WTMwkZ4n8 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 09c89f3b-6a92-4a74-dc12-08d8d1afb029 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2021 12:46:18.1878 (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: Uu1VMxCWAh3DREqBgYdKpvKKW3PtxJIimbjh6NroA4ldyso85mSosz1YnQ9IPEEvz+SOy0cFcwBwZuHcnMiDlA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5081 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210215_074624_401999_407427FE X-CRM114-Status: GOOD ( 14.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , shawnguo@kernel.org, s.hauer@pengutronix.de, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, patrice.chotard@st.com, paul@crapouillou.net, agross@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, matthias.bgg@gmail.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan V11: Per Rob's comments, fix memory-region in patch 1/10 Rebased on top of Linux-next V10: Per Rob's comments, fix patch 1/10 V9: Per Mathieu's comments, update the tile of yaml in patch 2/10 update the Kconfig and MODULE_DESCRIPTION, I merge this change in patch 8/10, since this is a minor change, I still keep Mathieu's R-b tag. If any objection, I could remove. Add R-b tag in Patch 10/10 Rob, please help review patch 1/10 and 2/10 V8: Address sparse warning in patch 4/10 reported by kernel test robot V7: Add R-b tag from Mathieu vdevbuffer->vdev0buffer in patch 1/10, 7/10 correct err msg and shutdown seq per Mathieu's comments in patch 10/10 Hope this version is ok to be merged. V6: Add R-b tag from Mathieu Convert imx-rproc.txt to yaml and add dt-bindings support for i.MX8MQ/M, patch 1/10 2/10 No other changes. V5: Apply on Linux next Add V5 subject prefix Add R-b tag from Bjorn for 1/8, 2/8, 3/8 https://patchwork.kernel.org/project/linux-remoteproc/cover/20201229033019.25899-1-peng.fan@nxp.com/ V4: According to Bjorn's comments, add is_iomem for da to va usage 1/8, 2/8 is new patch 3/8, follow Bjorn's comments to correct/update the err msg. 6/8, new patch 8/8, use dev_err_probe to simplify code, use queue_work instead schedule_delayed_work V3: Since I was quite busy in the past days, V3 is late Rebased on Linux-next Add R-b tags 1/7: Add R-b tag of Mathieu, add comments 4/7: Typo fix 5/7: Add R-b tag of Mathieu, drop index Per Mathieu's comments 6/7: Add R-b tag of Mathieu 7/7: Add comment for vqid << 16, drop unneeded timeout settings of mailbox Use queue_work instead of schedule_delayed_work free mbox channels when remove https://lkml.org/lkml/2020/12/4/82 V2: Rebased on linux-next Dropped early boot feature to make patchset simple. Drop rsc-da https://patchwork.kernel.org/project/linux-remoteproc/cover/20200927064131.24101-1-peng.fan@nxp.com/ V1: https://patchwork.kernel.org/cover/11682461/ This patchset is to support i.MX8MQ/M coproc. The early boot feature was dropped to make the patchset small in V2. Since i.MX specific TCM memory requirement, add elf platform hook. Several patches have got reviewed by Oleksij and Mathieu in v1. Peng Fan (10): dt-bindings: remoteproc: convert imx rproc bindings to json-schema dt-bindings: remoteproc: imx_rproc: add i.MX8MQ/M support remoteproc: introduce is_iomem to rproc_mem_entry remoteproc: add is_iomem to da_to_va remoteproc: imx_rproc: correct err message remoteproc: imx_rproc: use devm_ioremap remoteproc: imx_rproc: add i.MX specific parse fw hook remoteproc: imx_rproc: support i.MX8MQ/M remoteproc: imx_rproc: ignore mapping vdev regions remoteproc: imx_proc: enable virtio/mailbox .../bindings/remoteproc/fsl,imx-rproc.yaml | 109 ++++++++ .../bindings/remoteproc/imx-rproc.txt | 33 --- drivers/remoteproc/Kconfig | 6 +- drivers/remoteproc/imx_rproc.c | 262 +++++++++++++++++- 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 | 4 +- 23 files changed, 412 insertions(+), 72 deletions(-) create mode 100644 Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml delete mode 100644 Documentation/devicetree/bindings/remoteproc/imx-rproc.txt