From patchwork Fri Jul 23 22:02:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suman Anna X-Patchwork-Id: 12397055 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=-13.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,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 7FDEFC4338F for ; Fri, 23 Jul 2021 22:05:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 4DD8860EB2 for ; Fri, 23 Jul 2021 22:05:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4DD8860EB2 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=psPZftrZCZs7p7sYvSqiNlJjjy9WLb8BoMnVfg54SHA=; b=q6N9Nol1rgyqCr jV+YzuvpvgEPO5Iz836wL4tDxxzEemzg0mCElls3VkNZyd9TaTKTFpLQI5Z492cEE3PVxxbJ+c/L2 hWT2tfqVZ3IMpbaEvV11kp1zOggKDOEJrOxtw2OuSWnKtk8fGv49Uq4m3A/pjdIrfquEWrL/OxFX3 LGArf66zslEY5kG9vZqG8HpRzjY/Jl9rLdHUATZqObsceD2wLvHDnrhMWyh3g+1/CyVUKTD/TX6s0 Re1ZUqgNiFq+YUW7mVCRXu90NjBKkRvk69eHMC4QZULGRk0qtTeKWMkHRD/vVV00KsUKz0KGC/yOp UC7HR4eqg53i6gUtYSOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m73Gw-0068PP-SL; Fri, 23 Jul 2021 22:03:59 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m73GB-0067yZ-6s for linux-arm-kernel@lists.infradead.org; Fri, 23 Jul 2021 22:03:13 +0000 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 16NM3AI8056748; Fri, 23 Jul 2021 17:03:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1627077790; bh=FF7s9FeiE7UAehlY5MJJ2DICyJ0WdcLF7kuc1bEetJ4=; h=From:To:CC:Subject:Date; b=U/iVnaYIupEZXqALOBvGHTA04H+1+tr9ZUDwZ36pi5d9IbjmdiE/EBXGePHk6dfkh pqSkAYucHyOPbz+ZGVHo7RIdo95vjanDRm2/0sdunca3Hg1/KzbXzDWrlcoKsmnCTk O5qnqgrEGt5twIqIpDEg9OVouy/NguhbNIXQnoKk= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 16NM3AOk106128 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 23 Jul 2021 17:03:10 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Fri, 23 Jul 2021 17:02:50 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Fri, 23 Jul 2021 17:02:49 -0500 Received: from fllv0103.dal.design.ti.com (fllv0103.dal.design.ti.com [10.247.120.73]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 16NM2nhY001427; Fri, 23 Jul 2021 17:02:49 -0500 Received: from localhost ([10.250.38.176]) by fllv0103.dal.design.ti.com (8.14.7/8.14.7) with ESMTP id 16NM2n6G126725; Fri, 23 Jul 2021 17:02:49 -0500 From: Suman Anna To: Bjorn Andersson , Mathieu Poirier Subject: [PATCH v2 0/5] K3 R5F & DSP IPC-only mode support Date: Fri, 23 Jul 2021 17:02:43 -0500 Message-ID: <20210723220248.6554-1-s-anna@ti.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210723_150311_411161_894D190E X-CRM114-Status: GOOD ( 14.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lokesh Vutla , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Praneeth Bajjuri , linux-arm-kernel@lists.infradead.org, Hari Nagalla Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi All, The following is a revised version of the series that adds the IPC-only mode support for the TI K3 R5F and DSP (C66x and C71x) remoteprocs covering AM65x, J721E, J7200 and AM64x SoCs. Patches are on top of 5.14-rc1 (the other dependent patches from v1 made it into 5.14-rc1). Please see the v1 cover-letter [1] for the design details of the 'IPC-only' mode functionality. The following are the main changes from v1, please see the individual patches for the exact deltas: - The first patch in v1 "remoteproc: Introduce rproc_detach_device() wrapper" is dropped - Removed the addition of the rproc state flag 'detach_on_shutdown' and the 'ipc-only' state flag in each of the remoteproc drivers - IPC-only mode and remoteproc mode are supported by registering only the appropriate rproc ops. The following is a summary of patches in v2: - Patch 1 enhances the remoteproc core to restrict stop on early-booted remoteprocs. - Patches 2 and 4 refactor the mailbox request code out of start in the K3 R5F and DSP remoteproc drivers for reuse in the new attach callbacks. - Patch 3 adds the IPC-only mode support for R5F. - Patch 5 adds the IPC-only mode support for both K3 C66x and C71x DSPs. I have re-verified the different combinations on J721E, J7200 and AM65x SoCs. AM64x currently lacks early-boot support, but the logic is ready for Single-CPU and Split modes that are specific to AM64x SoCs. regards Suman [1] https://patchwork.kernel.org/project/linux-remoteproc/cover/20210522000309.26134-1-s-anna@ti.com/ Suman Anna (5): remoteproc: Add support for detach-only during shutdown remoteproc: k3-r5: Refactor mbox request code in start remoteproc: k3-r5: Add support for IPC-only mode for all R5Fs remoteproc: k3-dsp: Refactor mbox request code in start remoteproc: k3-dsp: Add support for IPC-only mode for all K3 DSPs drivers/remoteproc/remoteproc_cdev.c | 7 + drivers/remoteproc/remoteproc_core.c | 5 +- drivers/remoteproc/remoteproc_sysfs.c | 6 + drivers/remoteproc/ti_k3_dsp_remoteproc.c | 197 ++++++++++++---- drivers/remoteproc/ti_k3_r5_remoteproc.c | 265 +++++++++++++++++++--- 5 files changed, 407 insertions(+), 73 deletions(-)