From patchwork Tue Nov 17 10:56:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 324559 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp4066512ils; Tue, 17 Nov 2020 02:57:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJyaMmfgKycloAQO26juDnPaXU6D1u5M7d5/rDITeHyNnca4Ga91CP60bxDIflJ/l+T4gA3v X-Received: by 2002:a17:906:1a0b:: with SMTP id i11mr19568601ejf.404.1605610623288; Tue, 17 Nov 2020 02:57:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605610623; cv=none; d=google.com; s=arc-20160816; b=EEUpPrnzuX8btCgDKmqCoTpd207hNhN4KyZmjnnYZVCYfOMKP+U7SARWwfkalXTaHR tzSZemHokhYEd8ZfY3+9seSmznD7doMKp4pXwMBADy4rW31Po+LHIbHIu3+8nxVhHxGz BeIafJMyFq6FXjhuxJ4fVlh2GU6JIB/83rtJMzl6n/73rIZjFlf4pObqyvKl6hoEbF/a cznBOyXDzr5HflLKt9rH0RPpLS7twGl5Y973xUajigLC/mQMSIVp+RDbgXElss0jXKFZ m7VthtO5qFDE6tsaNn65K3wM1JqwkPEFEF+P79staU8TuGpIkp9R/mAvTOKgIByIY6VA ntBw== 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=V1GrgskZ91CK6xc+oqt63yicQukP50NqQvyBTMfpGT4ZjBDrHSt1Pt8pWNcJv9X49L PzYdKkC1QNanIa2bfCAZyJqoV0sfAfA91U+7a10HkYS+nJIgX1w00Ss9W6A955q6u+vZ Bq+IXVo/jjqaiMcARX8gjtx8kdvZR9ZS2+EDw67EmRNLiLocLqRZV8dzhrv0bsKiQJze 4YtvU+tQudvOVyo4cGd/USiETuFhjPZ1IdJck6OmlDND/pOl0BR4Q9TcKWezUmkPtClG 6ODnLG2EGdHeBm3BlhgKb63DW371lTqQGkzX+m1JvHyOkBlYo6sR40DDzszQfNOXglzg 5K2w== 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 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 dm25si12962825edb.238.2020.11.17.02.57.03; Tue, 17 Nov 2020 02:57:03 -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=ikBSvicE; 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 S1727859AbgKQK4T (ORCPT + 6 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 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);