From patchwork Mon Dec 28 12:46:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 352689 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp9805140jai; Mon, 28 Dec 2020 06:55:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJxW9cj5rZDwSsz2gAtM6nd0HChdlQHU/iRTIR2sNNPjZn2nMYR/XG2jOGj3psna3Bt7pl8S X-Received: by 2002:a17:906:7a18:: with SMTP id d24mr42599937ejo.324.1609167217665; Mon, 28 Dec 2020 06:53:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609167217; cv=none; d=google.com; s=arc-20160816; b=ETLIWLJ4i7B8njOJbRWF9Jo71afHwDyhnlNj/Sg99J8ZUWKLtqOWh+bbvQRs0x7L1s hHBOX7z0l0qn34DqYQeh0uHBjUZzm4s3ZMYTvVKbVJhdUj9BDeYC8EaYcRJJfcJnq+u/ nVTTqPO223k/NwvvyMVbToBs9ksewqULm85Od+/xKhjD8QcsxjNX6agXteTmtfSvuG8+ 9Bj1AZNDq4HHaYZbbDq3BktVKi0wDraLHs+HXiSdIwrB4bm7Se6kPsNOG1D+a/btpqab 4KuTqxyczYkauJn85icPD+nbcXUyfIyo1oQMXenJHQcXP/T5ZGUaaDW1Dw97l+A0p9pV 78/g== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=c+tjEyYyvz5MmhBNsq9kZ9ZYKWgcoh01qyVb3R6+Ss8=; b=lBAhLfv0vP4U6O5eUBnaOyYSrBRYwAWO0kVLyn3OaBn6HcnBZc7dN4KHEzL++IePR2 TI9Hs42tYYiYXLgyYkvofOONYwcQV3YYAQrpGDGiTh0Rywv3jBvs3RacwrwVFuuIVt3q KDCD2S0N3xAhlQ+gjtZmXIqixh9u4IdaCk6NIbju9xrQH89/gofHdNjbayugkS8tI1Gr kiWDYXQ8MKp9JnEc9QRDsS0EwdTrfwpPJVCKFolRFpWRp/BrF0TURoHzqvQQa4YYgsP4 zPQs24hX1AM2HnyBcjKRpfZ+pI9vsHTPe6okqpAlaym2W5l/NXqBO1BtUXYTi1WWfvFa kq/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=S9Uq+Tmg; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gj10si17827929ejb.578.2020.12.28.06.53.37; Mon, 28 Dec 2020 06:53:37 -0800 (PST) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=S9Uq+Tmg; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2503796AbgL1OxE (ORCPT + 14 others); Mon, 28 Dec 2020 09:53:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:54718 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2441630AbgL1OTZ (ORCPT ); Mon, 28 Dec 2020 09:19:25 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2CFF122B2C; Mon, 28 Dec 2020 14:18:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165124; bh=9g0/XxWyP3jMlOsB5v6yCEAHuPcYlFakdyDme1xpF90=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S9Uq+TmgZMFgxJ038nCf9KWDK+conzJRmbihJ36QHuYDcLgRKHaHdr1LsTQ9jDJ07 2sAycyA7j19PeGEUSmDRVM/KxGdQygIs5pZyt7QOavaRqF1liA2t5UvYcE6dGK8R6b 5kVEXHDXRAsojnczReBAsj20RqlE03X9b8bJnsGM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peter Ujfalusi , Vinod Koul , Sasha Levin Subject: [PATCH 5.10 421/717] dmaengine: ti: k3-udma: Correct normal channel offset when uchan_cnt is not 0 Date: Mon, 28 Dec 2020 13:46:59 +0100 Message-Id: <20201228125041.133605068@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Peter Ujfalusi [ Upstream commit e2de925bbfe321ba0588c99f577c59386ab1f428 ] According to different sections of the TRM, the hchan_cnt of CAP3 includes the number of uchan in UDMA, thus the start offset of the normal channels are hchan_cnt. Fixes: daf4ad0499aa4 ("dmaengine: ti: k3-udma: Query throughput level information from hardware") Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201208090440.31792-2-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/ti/k3-udma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.27.0 diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c index 82cf6c77f5c93..d3902784cae24 100644 --- a/drivers/dma/ti/k3-udma.c +++ b/drivers/dma/ti/k3-udma.c @@ -3201,8 +3201,7 @@ static int udma_setup_resources(struct udma_dev *ud) } else if (UDMA_CAP3_UCHAN_CNT(cap3)) { ud->tpl_levels = 3; ud->tpl_start_idx[1] = UDMA_CAP3_UCHAN_CNT(cap3); - ud->tpl_start_idx[0] = ud->tpl_start_idx[1] + - UDMA_CAP3_HCHAN_CNT(cap3); + ud->tpl_start_idx[0] = UDMA_CAP3_HCHAN_CNT(cap3); } else if (UDMA_CAP3_HCHAN_CNT(cap3)) { ud->tpl_levels = 2; ud->tpl_start_idx[0] = UDMA_CAP3_HCHAN_CNT(cap3);