Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3765393pxb; Tue, 17 Nov 2020 03:02:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxUGXudmtaU6UDiTHbBVN1864y2iHDMo8/JrTUUkDhcrG8Zot0GbZHoA//G3FJuJJnQnR7 X-Received: by 2002:a17:906:3ec8:: with SMTP id d8mr19077691ejj.32.1605610923060; Tue, 17 Nov 2020 03:02:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605610923; cv=none; d=google.com; s=arc-20160816; b=shJUWnygVcNA+HB8JYG1TcdVfN6MmbEB7Bnw0DMq0t9LV8B6MvPDDZuAF/A8SJ3bwZ 4uNOT7dSTnTrmDtsPtBcb6fPIhmUpv5GG7DNxoI8qJ3qSpsOhBasHN7Cn260dKDUwPyP t/YbY5b8neKrj8xMT526+klBDrAnNs73PTthUDjtuuJMA9RQaPx4YP+zs949G01fLznU NuOOLAxRH7/ipGF3knvsJoNvvzpfK5UCDB9vnJ8NnwSB245c5CBbLD0adCz67DcaoGxV +LYASuwrbZYq+uR8ouGWNZ8vqnYJgqu5qmZd4bbwiTwh4Nx9gqvvCsBCnitmUaMhOFO4 jzAA== 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=nExgtDZge6ijj+Ryjr3S0SkznFJsBS7/grjCmAG5KyP8EoHyxESdkeXwVvgTguxdGi iTGgv499E3KPcGf+48gm7Ayxz+FQIW7LDa37kspkQ1fK24sF6bLGFhkxqdc4geD1BJPE MOiomtqXI+eVc5aUkeLPQfiQQ+WoCOY/GaSgscb5OBn/SaD86xhEinCycHmGZXZ9AZn1 TmgqPUnqaC6UVk0W9IsZ2D5k7yj40svHGsYMJ4qcgcBn8/g9Yiw8COZusQiItlmoBxtH +GCP3LKW7U8cw8F2r/0iuu8cd3OM4P4KuEvoVmYyC2zv0r+bQ9B4/ghjInQtvV8ooNJC SmKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ikBSvicE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 i12si14750418edn.236.2020.11.17.03.01.40; Tue, 17 Nov 2020 03:02:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=ikBSvicE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S1727918AbgKQK4T (ORCPT + 99 others); Tue, 17 Nov 2020 05:56:19 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:59602 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727347AbgKQK4S (ORCPT ); Tue, 17 Nov 2020 05:56:18 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0AHAuD0D019443; Tue, 17 Nov 2020 04:56:13 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1605610573; bh=vOyHJcWQgFd/X5VGt8S3nS+qlpjg6sSRGX+cBw76W44=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ikBSvicEeXyZkVW/bI2E9SMbQ9sG+P56mnzbCDb6/hhEq4lYSm4epHS1dkxGULBFP eGXXo7gmyrCbnAKG3iBcCxtXefV+6xA4tvhkIDMJPdJ2L7uh890AaCTDklGuj96Gaq 72GEpZlhbrNtCblViZkokE80M39bnNfM6/RjV1dE= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0AHAuD4a009876 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 17 Nov 2020 04:56:13 -0600 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Tue, 17 Nov 2020 04:56:12 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE109.ent.ti.com (157.170.170.41) 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, 17 Nov 2020 04:56:12 -0600 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0AHAu6tl087311; Tue, 17 Nov 2020 04:56:10 -0600 From: Peter Ujfalusi To: , , , CC: , , , , , , , Subject: [PATCH v2 01/19] dmaengine: ti: k3-udma: Correct normal channel offset when uchan_cnt is not 0 Date: Tue, 17 Nov 2020 12:56:38 +0200 Message-ID: <20201117105656.5236-2-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117105656.5236-1-peter.ujfalusi@ti.com> References: <20201117105656.5236-1-peter.ujfalusi@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) 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); -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki