From patchwork Tue Nov 14 08:39:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddharth Vadapalli X-Patchwork-Id: 13454961 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 48ED0C4332F for ; Tue, 14 Nov 2023 08:39:50 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :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=H2gh1EjYtjNnvV0wYSS236YMeh5ZUT7EX/FSEJSkZs4=; b=0AwAAtnEyrf3AJ QpvVXDqlvrplYbV5KcC87bO922TQqLUvZRZsDfRlQouJ5uyigNb26s1krmsOqUfNaz601+AVhWb50 ouwMHN4y09MqBlLLhmiSWbXV2RMdwahHkbhdv6DQqxEKgCoKB6pAWbd/gMSX/DnT/SnFNny5VosLC Bt9PMgnt+LtKryB+CvibjikShMaZCAdTaAIOcaND2BstWIgkLOKKjtv1SrkoBYJdqEBLDTrBH333v ATw8J8i9PcXDavY3obZv3g4/6te2vMygGeGKmzwskKvIwoKRl/ymBsG2wAPEtXCwZYqg2aE6OCjfM hHGewEVdj2myPpLCvFWA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r2ox5-00FP0r-0X; Tue, 14 Nov 2023 08:39:19 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r2ox1-00FOzx-23 for linux-arm-kernel@lists.infradead.org; Tue, 14 Nov 2023 08:39:17 +0000 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3AE8d9ir075629; Tue, 14 Nov 2023 02:39:09 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1699951149; bh=I/jTJBh67qt3+0P1OhgtWf5cWA2mWrKJXj6iqCyHXhI=; h=From:To:CC:Subject:Date; b=tRQLCWBaElO10cJwAPnhVM40HYV6x37ZfWcvIh9EYFJJJnD9BUx8kbbkmBW/itDgc nGUrILe43Dk/FzaTrxl1WjMNB5MTLM7jU5UvnSa4ZX9gV3cUSzylr4KjpouWpANGUy Zu2rS7qnRMXu+yUxLTgBD94sRtEqwn4fTnu8CvEE= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3AE8d9r3115281 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 14 Nov 2023 02:39:09 -0600 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 14 Nov 2023 02:39:09 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 14 Nov 2023 02:39:09 -0600 Received: from uda0492258.dhcp.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3AE8d6OD128120; Tue, 14 Nov 2023 02:39:07 -0600 From: Siddharth Vadapalli To: , CC: , , , , , Subject: [PATCH 0/4] Add APIs to request TX/RX DMA channels by ID Date: Tue, 14 Nov 2023 14:09:02 +0530 Message-ID: <20231114083906.3143548-1-s-vadapalli@ti.com> X-Mailer: git-send-email 2.34.1 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-20231114_003915_836327_C3492FD9 X-CRM114-Status: UNSURE ( 9.68 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The existing APIs for requesting TX and RX DMA channels rely on parsing a device-tree node to obtain the Channel/Thread IDs from their names. However, it is possible to know the thread IDs by alternative means such as being informed by Firmware on a remote core regarding the allocated TX/RX DMA channel IDs. Thus, add APIs to support such use cases. Additionally, since the name of the device for the remote RX channel is being set purely on the basis of the RX channel ID itself, it can result in duplicate names when multiple flows are used on the same channel. Avoid name duplication by including the flow in the name. Series is based on linux-next tagged next-20231114. RFC Series: https://lore.kernel.org/r/20231111121555.2656760-1-s-vadapalli@ti.com/ Changes since RFC Series: - Rebased patches 1, 2 and 3 on linux-next tagged next-20231114. - Added patch 4 to the series. Regards, Siddharth. Siddharth Vadapalli (4): dmaengine: ti: k3-udma-glue: Add function to parse channel by ID dmaengine: ti: k3-udma-glue: Add function to request TX channel by ID dmaengine: ti: k3-udma-glue: Add function to request RX channel by ID dmaengine: ti: k3-udma-glue: Update name for remote RX channel device drivers/dma/ti/k3-udma-glue.c | 306 ++++++++++++++++++++++--------- include/linux/dma/k3-udma-glue.h | 8 + 2 files changed, 228 insertions(+), 86 deletions(-)