Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3023273pxu; Tue, 8 Dec 2020 01:08:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJzMiRG2xe7Rd7Yr4ANwRSTqvNi03zWq1RztREOcPvxmW66JJSYakBrfIflFpr93aE4j59OW X-Received: by 2002:a17:906:fa8b:: with SMTP id lt11mr22245336ejb.94.1607418491556; Tue, 08 Dec 2020 01:08:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607418491; cv=none; d=google.com; s=arc-20160816; b=LVGb3FlpJ/GyMPzvgXTBFTE8b3H8cB/Lg8+ZOGGiMX/kDQbWV2N5QpvbuTUMcCPI9J +nwDpnbbxw6ie05S2sQRTWxcSRt07KB/zTF7aubsziuw5zh+/CAE5qquYdxu/Uds5K3t RdVJKxbfk+FJUrhZFIOf9xc4pPswkHhzKsPgnpo4G45t/N6f6n+M9/ytvJXMJntY1E6P ncbSSqRhY0OH6nagILnGm3Spx21BXLQFRxNB9ooJzQt9u6JqgRCpknmG/OPcOlRpt3/C pECGhDUChcbwQWJumvem2wNAFtzvz7yA6WuHQODFtrYGFTIX0dSPEVlSSTyk0sWkYxD3 Ohkg== 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=trmedblIMoIIdN26UWVAjk2puTIl3JpZgfzQ9vaGZBwfDO3OmKxLoiDKKIFdfWamIA WDlMHWEUGkYwxFys4cifkUYCWEzcSZW3AbsfkCF0c9ZHGwO3yWU44l1HLMEMTvk9k9ZM zRZxu9fGDucHD5U3TaMZeinUkRqPmua/ovuwePALFVh2/I8RGKmUlvRA8BxtCsPSI4kj them1FQWsFx+U3ABeCTgcQMch44ch6NzaLru0PLRIvWSnzhqjkrSOuRixp54XTPXOEYK NqYimocEQXoseo/gPWMSQn0b+pTmlOfWTuqOwTGLFexvpWCjTY3ecydKFq7/mKXeMsVD 97EA== 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 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 v14si9400063edb.336.2020.12.08.01.07.49; Tue, 08 Dec 2020 01:08:11 -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=fFkDdCEO; 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 S1728511AbgLHJEo (ORCPT + 99 others); Tue, 8 Dec 2020 04:04:44 -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 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