From patchwork Tue Dec 8 09:04:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 339704 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp3617619ejs; Tue, 8 Dec 2020 01:05:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJwKjZOaCjlkkAHm4hD6DhpRi9ZgSCgpk3nuwq+pQzVon+o4cOjFVVjopyGLS8WA0rB5eoB9 X-Received: by 2002:a17:906:3712:: with SMTP id d18mr22918218ejc.178.1607418339897; Tue, 08 Dec 2020 01:05:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607418339; cv=none; d=google.com; s=arc-20160816; b=i46uFiV+6jONFmHEt6G6KCBfNBm+cQefZJLh0Lxp4NBgUkHZy23TM3ky54+KxS1Nus WsNIYks3iLTdJJkuMpVllikw/nx+4xFdc9fmBaJxm28NdGWzpkt4OpKu/XGbfmTFLwYI t9Bk9vAh+JMquIUm95Lit/Uyrz3E0hTv2qb9qaNuB2AKTTYr5mrm+4YOhmw1wQ4JpF5D 558Tczm+bqMgE8o+7cqxrcv4ggfXNp5LuRdJfy8OLosAQVCyy7QcB+1Uq/KfjgrSW6Xs QsL/ud9svaHCJQHRjrmZxeAxutjd8/mlxU50Pb5bZUGMpzeSAZTeyw0NepeiwZxpxo7s oCdg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vOyHJcWQgFd/X5VGt8S3nS+qlpjg6sSRGX+cBw76W44=; b=DAfaa0a9OWLyC2CbZ9FIWZs8cTloccuNflhhTcYo/HkL5BlEswqcQfyel6Zp2AvM3E qdqk7DjZyZfh0Ryg2uw9pUNOGF6VV1uCbFKngN1tuRgtriCJdwemuifLHqkl7N09kGGI wGMbuwQJP9QUq/3fy2pRRR7hjwwrE/Y3Srzwh3/edXifcTtSFar1eB1GhGOAH3Vn9V/1 J/UPdsR5rOvdzPfWc2jYwVpg2aeFlzzLDqJ/3xOFZsGMwHWbC58rqmlcQf9BdhUXVB6A Q9Kk5Z7rO5Hy0OYflUBJRdl9XxUnItWn3iB/yJ5XVsjXo7PjOlary9j6TJ3eTqJWj0kg 5mZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=fFkDdCEO; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h18si5193516eds.65.2020.12.08.01.05.39; Tue, 08 Dec 2020 01:05:39 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-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=@ti.com header.s=ti-com-17Q1 header.b=fFkDdCEO; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 S1728375AbgLHJEn (ORCPT + 6 others); Tue, 8 Dec 2020 04:04:43 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:34276 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728189AbgLHJEn (ORCPT ); Tue, 8 Dec 2020 04:04:43 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0B893k4m002581; Tue, 8 Dec 2020 03:03:46 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1607418226; bh=vOyHJcWQgFd/X5VGt8S3nS+qlpjg6sSRGX+cBw76W44=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=fFkDdCEOaDUf73et7E5jWSD7PxCMneiXeBRLYNRzlbc9pknrPvPa6KveYWQ8FIhWp Wfb9nklwFsX+pO6118mNXrdcbr5X016b3m0MZqL/6Vgj5GPIZKn7K+FWb3Sx97zbn2 D61kTHIDgWB3pxBYO+IdP+KggG54JIOVFpN/F5vU= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0B893kQE116402 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 8 Dec 2020 03:03:46 -0600 Received: from DFLE101.ent.ti.com (10.64.6.22) 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.1979.3; Tue, 8 Dec 2020 03:03:46 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Tue, 8 Dec 2020 03:03:45 -0600 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0B893dc6120112; Tue, 8 Dec 2020 03:03:43 -0600 From: Peter Ujfalusi To: , , , CC: , , , , , , , Subject: [PATCH v3 01/20] dmaengine: ti: k3-udma: Correct normal channel offset when uchan_cnt is not 0 Date: Tue, 8 Dec 2020 11:04:21 +0200 Message-ID: <20201208090440.31792-2-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201208090440.31792-1-peter.ujfalusi@ti.com> References: <20201208090440.31792-1-peter.ujfalusi@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 --- drivers/dma/ti/k3-udma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c index e508280b3d70..0e8426dd18a7 100644 --- a/drivers/dma/ti/k3-udma.c +++ b/drivers/dma/ti/k3-udma.c @@ -3199,8 +3199,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);