From patchwork Sun Feb 13 20:12:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suman Anna X-Patchwork-Id: 12744679 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 086F7C433F5 for ; Sun, 13 Feb 2022 20:14:27 +0000 (UTC) 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=6KMCjiT+6eGzN903cZVtX/3+KZZyMcw7ww5H7Fui/JI=; b=RI37zpCHJgjOJb J4bA+ZhS9B0IC9Ek6YLJXme//N4lXSwdNatooHUdpIsNVUWaD5pgCXWr7Bw0YL2i2qc1ffxMQUzX+ i+d+GxhlG7wubUS/HNuYiG416F42Pod6X75EXbzi+zgtuPc8pMzUtQODtWHkMfWHVg1iInUKfxRzI DMlbDGYDO6N+kMjpJriUz84LtLsABFv4Ngqk1VKHZS412OLvaf3qoFtjqM9+VTI9JdvXpXZpatHfT l4IcUgjTHpVOgHefu+fhXDoUOM74LlxUoHA01nnZ7OWoGMPLWPzM9GTqKjphxB3JNKU9nAcahcPxN yfpWAt1jTwwFq1dYKlsA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJLEw-00CSoi-J2; Sun, 13 Feb 2022 20:12:58 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJLEs-00CSmr-6i for linux-arm-kernel@lists.infradead.org; Sun, 13 Feb 2022 20:12:56 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 21DKCnLN017971; Sun, 13 Feb 2022 14:12:49 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1644783169; bh=fXdzgJr4bmKoEdXDCQvT/8aohJq0rCxwYgWBdYInjpE=; h=From:To:CC:Subject:Date; b=f9k9O9kA5pKDBbfbfWvc0mkMbCiYi1YlvIM3KmgKrlMwiXx8DjnP9tDtOPCJvlQzY T06g8DxrXHrtfaSh6/VbR/PrXm6m6Kmw6du5EXPTTsk6m5ET2t2oZNWOH8UQqKl9Tx f6mkgBZjiyHsBwUJmrqj4y8qvsxCR37oK7byDqUU= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 21DKCna4112350 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 13 Feb 2022 14:12:49 -0600 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Sun, 13 Feb 2022 14:12:49 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Sun, 13 Feb 2022 14:12:48 -0600 Received: from lelv0854.itg.ti.com (lelv0854.itg.ti.com [10.181.64.140]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 21DKCn9a022100; Sun, 13 Feb 2022 14:12:49 -0600 Received: from localhost ([10.249.37.221]) by lelv0854.itg.ti.com (8.14.7/8.14.7) with ESMTP id 21DKCnul002408; Sun, 13 Feb 2022 14:12:49 -0600 From: Suman Anna To: Bjorn Andersson , Mathieu Poirier Subject: [PATCH v3 0/5] K3 R5F & DSP IPC-only mode support Date: Sun, 13 Feb 2022 14:12:41 -0600 Message-ID: <20220213201246.25952-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-20220213_121254_384226_6FFC1D40 X-CRM114-Status: GOOD ( 15.62 ) 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: Praneeth Bajjuri , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, 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 (v3) 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, AM64x and the recently added J721S2 SoCs. Patches are on top of 5.17-rc2 (since rproc-next is baselined on rc2). Please see the v1 cover-letter [1] for the design details of the 'IPC-only' mode functionality. The following are the main changes w.r.t v2 [2], please see the individual patches for the exact deltas: - The first patch in v2 "remoteproc: Add support for detach-only during shutdown" is dropped - Added a new "remoteproc: Change rproc_shutdown() to return a status" patch as the first patch in v3. - Adjusted the K3 R5F and DSP remoteproc drivers to invoke rproc_detach() in the case of IPC-only mode during teardown The following is a summary of patches in v3: - Patch 1 enhances the remoteproc core to return a status for rproc_shutdown() that is in turn returned in the sysfs and cdev interfaces. This replaces the flag-based logic in v2 and is used to return an error for K3 SoCs that don't supply a .stop() ops in IPC-only mode. - 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. J721S2 doesn't have either early-boot support yet, and the dts nodes are also not added yet, but I have tested locally using additional patches. regards Suman [1] https://patchwork.kernel.org/project/linux-remoteproc/cover/20210522000309.26134-1-s-anna@ti.com/ [2] https://patchwork.kernel.org/project/linux-remoteproc/cover/20210723220248.6554-1-s-anna@ti.com/ Suman Anna (5): remoteproc: Change rproc_shutdown() to return a status 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 Documentation/staging/remoteproc.rst | 3 +- drivers/remoteproc/remoteproc_cdev.c | 2 +- drivers/remoteproc/remoteproc_core.c | 9 +- drivers/remoteproc/remoteproc_sysfs.c | 2 +- drivers/remoteproc/ti_k3_dsp_remoteproc.c | 208 ++++++++++++---- drivers/remoteproc/ti_k3_r5_remoteproc.c | 287 +++++++++++++++++++--- include/linux/remoteproc.h | 2 +- 7 files changed, 431 insertions(+), 82 deletions(-)