Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5580543pxb; Mon, 14 Feb 2022 02:33:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJz3g801/Za1lElDg1M3RYL3XOrDJMXzBQ0+ZzomZBkCGWz+uLAVYmrMLobJKojFGD+1tHbx X-Received: by 2002:a17:906:7398:: with SMTP id f24mr1088545ejl.171.1644834803795; Mon, 14 Feb 2022 02:33:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644834803; cv=none; d=google.com; s=arc-20160816; b=e0iN5HDal+jhYkgYm9qTjUive2oDRXw1C9m7dhDH/S//LAuEvXkzuc1wBv9hSvIZ9c HAFDqA3RnPrRtd1dg6AMkmHeHDdhl1bEBceHofMet0gVajQRMdZR2sFF25Qyjg/NvGpD c3oqvF6rAQ+MkDrajCKidcHLcBAMvre6okc8Bvz98sbAnas4x7hKfRRvYvAgw1rs9h0Y d0QHVnPxULIE3bF7pRGr4at34MqF2ttoelyFEz+0ZO98U4FaTaPGrxjfVb8Ajl5I+yuA 9WdPbHwlp4id0sznMEL0x8i4iBe96J8/Qs4NUFsY1fM3OVWDFaTivYpOIbys+ARyI9OG k47A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=fXdzgJr4bmKoEdXDCQvT/8aohJq0rCxwYgWBdYInjpE=; b=ebtDP3QohFfiOip0jIkDut2wgh9PubaRZ66lPUUi3319HNn/0+Feu+qojv1Yy7qBWZ ENmZSTVud5Wqb4aYlqoYS7TCQZy6aYTChiZwV2GRjOBMlN+0h0ChAqDSK9mJMvOGCXSm IUlsNrBJ/059XvffU0BXqDqtxuKCTdJrOL5QtHne+x9XlFUkWaPbH9HYvVvRNfXJTKNo fdqEdiowKs7NFDzL0qbXUV2W8gPbfVN0p+wRZEbYvjCYl2c7jvLwwzfzbVPWFm+D3CuP guYgGuoWA12/2mL5hXix9gz3sIE1/8t5VQYN41qoGUMzyzc/TejrQ64W8dAiXg7EPJ6d J3pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=f9k9O9kA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eo15si17366781edb.393.2022.02.14.02.33.00; Mon, 14 Feb 2022 02:33:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=f9k9O9kA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238122AbiBMUPW (ORCPT + 99 others); Sun, 13 Feb 2022 15:15:22 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:45242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231844AbiBMUPV (ORCPT ); Sun, 13 Feb 2022 15:15:21 -0500 X-Greylist: delayed 139 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sun, 13 Feb 2022 12:15:15 PST Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50D12532DE; Sun, 13 Feb 2022 12:15:14 -0800 (PST) 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 CC: Hari Nagalla , Praneeth Bajjuri , , , , Suman Anna 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 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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(-) -- 2.32.0