From patchwork Fri Jun 7 18:11:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 13690590 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 CAAA6C27C5F for ; Fri, 7 Jun 2024 18:11:32 +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:CC:To:Message-ID:MIME-Version:Subject: Date: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=mPzz6KhagkI/sysXkjtNsJ07ra+Zray72YTM1E76t8U=; b=raOX2ufwKvFyP+ PfWajJqPn+5kcgxwKinXr52Itt+SBw936keEar9LoZHL/z/svrmPizvnAAsiAzPIQSst/9WSLNIMH fGI2OsZaOo7mf/iUIHspCCmsdDkaLyrmSWW83n3AgGtCVhTKhVFqKPb9MAEysnZ7uuG+8dQarY87c Q5dPayj1uhuiYFJYUzal/KhBbeIdE/q1BjPGo32HTVQP7b6iD9QLzKGZcn/27IOAjezeZUqHHuCyz JKzCFnDtYK4Ghn1wLPzaHqgC6wVfEh/hozinWjSWe5ryijw5yayycj07SJQevgMbyd2vx4E4dQG06 GUxDlbsK/jJvnyWEbkew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFe3a-0000000FDml-2gpT; Fri, 07 Jun 2024 18:11:18 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFe3W-0000000FDlz-2bPZ for linux-arm-kernel@lists.infradead.org; Fri, 07 Jun 2024 18:11:16 +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 457IB8qc084349; Fri, 7 Jun 2024 13:11:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717783868; bh=1NbOSS+4rivslz6nKFc+8bXVa0m/UsOBAIGS0ru8ukg=; h=From:Date:Subject:To:CC; b=grDTLYT90srjuBoZvfUFkjM143ofl3i5zfoh4N9yTXUBt6pR1/HurXe05CTGtf34U cl3iPYQT/z5H42N36j12692D7c4LeL0G72dUoQWhl6Jh5fm0hj8/NtHfQsZL1t7TFW YU9NSdHMF1+P2qoYxow6aRp9d3ZMW2rrUNaCvrZs= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 457IB8Mp034461 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 7 Jun 2024 13:11:08 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 7 Jun 2024 13:11:08 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE104.ent.ti.com (10.64.6.25) 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; Fri, 7 Jun 2024 13:11:08 -0500 Received: from localhost (jluthra.dhcp.ti.com [172.24.227.116]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 457IB7ew118297; Fri, 7 Jun 2024 13:11:08 -0500 From: Jai Luthra Date: Fri, 7 Jun 2024 23:41:03 +0530 Subject: [PATCH v2] dmaengine: ti: k3-udma: Fix BCHAN count with UHC and HC channels MIME-Version: 1.0 Message-ID: <20240607-bcdma_chan_cnt-v2-1-bf1a55529d91@ti.com> X-B4-Tracking: v=1; b=H4sIADZNY2YC/3WMQQ6DIBREr2L+ujRIlUhXvUdjDHyw/oXYACFtD Hcvum9m9WYyb4foArkI92aH4DJF2nwFcWkAF+1fjpGtDIKLjkveMYN21dOxTegTMwYlclS96BX U0zu4mT6n8DlWXiimLXxPf26P9q8qt6zGDeomZjlY1I9EV9xWGEspPyTVN9epAAAA To: Peter Ujfalusi , Vinod Koul CC: , , , Devarsh Thakkar , Jayesh Choudhary , Vignesh Raghavendra , Jai Luthra X-Mailer: b4 0.12.4 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-20240607_111114_895529_E9099842 X-CRM114-Status: GOOD ( 12.43 ) 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 From: Vignesh Raghavendra Unlike other channel counts in CAPx registers, BCDMA BCHAN CNT doesn't include UHC and HC BC channels. So include them explicitly to arrive at total BC channel in the instance. Fixes: 8844898028d4 ("dmaengine: ti: k3-udma: Add support for BCDMA channel TPL handling") Signed-off-by: Vignesh Raghavendra Signed-off-by: Jai Luthra Tested-by: Jayesh Choudhary --- Changes in v2: - Add all BCHANs in a single operation - Update the Fixes tag to the commit adding TPL support - Link to v1: https://lore.kernel.org/r/20240604-bcdma_chan_cnt-v1-1-1e8932f68dca@ti.com --- drivers/dma/ti/k3-udma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- base-commit: d97496ca23a2d4ee80b7302849404859d9058bcd change-id: 20240604-bcdma_chan_cnt-bbc6c0c95259 Best regards, diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c index 6400d06588a2..df507d96660b 100644 --- a/drivers/dma/ti/k3-udma.c +++ b/drivers/dma/ti/k3-udma.c @@ -4472,7 +4472,9 @@ static int udma_get_mmrs(struct platform_device *pdev, struct udma_dev *ud) ud->rchan_cnt = UDMA_CAP2_RCHAN_CNT(cap2); break; case DMA_TYPE_BCDMA: - ud->bchan_cnt = BCDMA_CAP2_BCHAN_CNT(cap2); + ud->bchan_cnt = BCDMA_CAP2_BCHAN_CNT(cap2) + + BCDMA_CAP3_HBCHAN_CNT(cap3) + + BCDMA_CAP3_UBCHAN_CNT(cap3); ud->tchan_cnt = BCDMA_CAP2_TCHAN_CNT(cap2); ud->rchan_cnt = BCDMA_CAP2_RCHAN_CNT(cap2); ud->rflow_cnt = ud->rchan_cnt;