From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1645B1A00EC; Thu, 15 Aug 2024 13:52:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723729972; cv=none; b=TvUFrTgR7Yt9WRDHDx5kSP1PJJb0wpE6SIlgM2Ty9LkamI/QqSm8JxuMFOAxuv7BTOS2qQuZE+wirLBvf20MblZNzrPBRcF4KQ5AQr11VlB/NYSGWTumP9hgfSau2umwX0TxJ9iQdodOmSNzOR6eQXoMhtefXgBqtx0agTmzGDo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723729972; c=relaxed/simple; bh=A+d8em/E+DYLe8X3kaFhqyh/iQWLzb6LXQYL0VZZEuQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Rk76CVxESaOi/0svlDfOEXiZ5RNewunt/jfOG4/MpFrSFOQTQapC0rDjibw4orEdLZx2cRbhuShBeq8W88wyeDi5qbsn6uoKNF0NCoHD+juXvTXvLfNYcyf+sI3EkpdjoqnIKU1KSEs+6jlRhkeEegxLFCaHg0hMV5RD0fwypPM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=h/jgJArm; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="h/jgJArm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44C94C32786; Thu, 15 Aug 2024 13:52:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1723729971; bh=A+d8em/E+DYLe8X3kaFhqyh/iQWLzb6LXQYL0VZZEuQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h/jgJArmm5JfjnCb8DiAWcGBl7PKfiuErmcjfDXxN5uVuLaIBR6NjXGUyfwM3cFIN ATxSCigSn3hz5bVfSICgzp2PGB0m2xXfkHbOFOxmOGUk2iNr2YTRMq6TnWjZEPmVvg t8A0YtIF2quW1SIjfjZcYDhP9v8uKHk9ZZ06pxuU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Vignesh Raghavendra , Jai Luthra , Jayesh Choudhary , Vinod Koul , Sasha Levin Subject: [PATCH 5.15 263/484] dmaengine: ti: k3-udma: Fix BCHAN count with UHC and HC channels Date: Thu, 15 Aug 2024 15:22:01 +0200 Message-ID: <20240815131951.560064921@linuxfoundation.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240815131941.255804951@linuxfoundation.org> References: <20240815131941.255804951@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Vignesh Raghavendra [ Upstream commit 372f8b3621294173f539b32976e41e6e12f5decf ] 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 Link: https://lore.kernel.org/r/20240607-bcdma_chan_cnt-v2-1-bf1a55529d91@ti.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/ti/k3-udma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c index 698fb898847c1..9db45c4eaaf24 100644 --- a/drivers/dma/ti/k3-udma.c +++ b/drivers/dma/ti/k3-udma.c @@ -4415,7 +4415,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; -- 2.43.0