From patchwork Tue Nov 17 10:56:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 324566 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp4066612ils; Tue, 17 Nov 2020 02:57:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJy+x7GvqA7vmrxHHTjyvEJtvUmoPyavkf4gYgyTA5Nc1zCRaBsDtFdx93vrSUuYDHkqih3O X-Received: by 2002:aa7:d502:: with SMTP id y2mr20432602edq.120.1605610639276; Tue, 17 Nov 2020 02:57:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605610639; cv=none; d=google.com; s=arc-20160816; b=z1/GrZA9K4+BFSkxQwjnl5qeMpi6a0zqwvPJRqftxYOsen8MS7+M4xa9bqEulBcrLC 64kJSJ9ikf3pFOuijLg++4BHWwNYkcShDFE8zxi9x4EkmNliwj2MD1bABeMH4QivrJmM 01Lwu9GmPYboRcgBVmosRO1JvBlWY2FucG3SruuEezGjT1VsV60x2He5q3iLtTixGTBx zCTzjswo7tcft7OFsUYzibd31e7fUhUIH+PvCoHiXg+Hi3DdAhVC6BA087zDafdYt2KQ e5rz2GM5/NP4ovFv2gFPsIiMQEl5wJW+m56iphrzr8zA1FxAh+FM70VQkUSjJu8X3quK 1ERw== 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=KrUTk8ul87troFJrpjX2nEBHGpMAgPlBoUHLfqkKttI=; b=UdpAZNVG04lSBlWt/7Jw+ANZU5lw9zyAYSNJm1fswWqDwC7Nus8RohBXvYEfMfy1O3 7wmgEZPBA/DuGX+Oy9V2ZZoiZ9SpU9FI0RbB4sYoE6nL4tvAkXDmQjvsQ02sMaKk9sr4 omxKB+LvxElK5ztCzojXcGuhZuuZs2WIMZEevrGrboSE3R+Eywr0qA/gOP+GwciH9h7o 6tVJCrGsTivVM/wBmpJ2QOVsxHuJ2Uxm0B2bKWak4XbJHUfJEb/GGji8V8u/sss85FJb 00qKNBTO39EtVTBZkoPinNNQWuEwNLorQPmRVA2nnCMKwFyd2JxspuFKLJ04vkYRUTiU ZHSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=N57a+EYm; 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.19; Tue, 17 Nov 2020 02:57:19 -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=N57a+EYm; 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 S1727347AbgKQK4y (ORCPT + 6 others); Tue, 17 Nov 2020 05:56:54 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:34142 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728143AbgKQK4w (ORCPT ); Tue, 17 Nov 2020 05:56:52 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0AHAuka1117372; Tue, 17 Nov 2020 04:56:46 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1605610606; bh=KrUTk8ul87troFJrpjX2nEBHGpMAgPlBoUHLfqkKttI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=N57a+EYmGunHmUk0CrK3SaBvFLQyP9HZIozZ2Jsp6erWv6bhA9MyAbf3zOtkEYCub dQv5h/NRlz3UdZPBva4gW0MawvYutWCkbmwYISiOLgdUbWCUx+BqTlr0L3+ZC/vXMr TyAD9CY6wUpQT8t3dqvv9YTm5729JvR7R5PlexVI= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0AHAukCA010356 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 17 Nov 2020 04:56:46 -0600 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE102.ent.ti.com (10.64.6.23) 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:46 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE110.ent.ti.com (10.64.6.31) 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:46 -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 0AHAu6tw087311; Tue, 17 Nov 2020 04:56:43 -0600 From: Peter Ujfalusi To: , , , CC: , , , , , , , Subject: [PATCH v2 12/19] dmaengine: ti: k3-psil: Extend psil_endpoint_config for K3 PKTDMA Date: Tue, 17 Nov 2020 12:56:49 +0200 Message-ID: <20201117105656.5236-13-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 Additional fields needed for K3 PKTDMA to be able to handle the mapped channels (channels are locked to handle specific threads) and flow ranges for these mapped threads. PKTDMA also introduces tflow for tx channels which can not be found in K3 UDMA architecture. Signed-off-by: Peter Ujfalusi --- include/linux/dma/k3-psil.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/include/linux/dma/k3-psil.h b/include/linux/dma/k3-psil.h index 1962f75fa2d3..36e22c5a0f29 100644 --- a/include/linux/dma/k3-psil.h +++ b/include/linux/dma/k3-psil.h @@ -50,6 +50,15 @@ enum psil_endpoint_type { * @channel_tpl: Desired throughput level for the channel * @pdma_acc32: ACC32 must be enabled on the PDMA side * @pdma_burst: BURST must be enabled on the PDMA side + * @mapped_channel_id: PKTDMA thread to channel mapping for mapped channels. + * The thread must be serviced by the specified channel if + * mapped_channel_id is >= 0 in case of PKTDMA + * @flow_start: PKDMA flow range start of mapped channel. Unmapped + * channels use flow_id == chan_id + * @flow_num: PKDMA flow count of mapped channel. Unmapped channels + * use flow_id == chan_id + * @default_flow_id: PKDMA default (r)flow index of mapped channel. + * Must be within the flow range of the mapped channel. */ struct psil_endpoint_config { enum psil_endpoint_type ep_type; @@ -63,6 +72,13 @@ struct psil_endpoint_config { /* PDMA properties, valid for PSIL_EP_PDMA_* */ unsigned pdma_acc32:1; unsigned pdma_burst:1; + + /* PKDMA mapped channel */ + int mapped_channel_id; + /* PKTDMA tflow and rflow ranges for mapped channel */ + u16 flow_start; + u16 flow_num; + u16 default_flow_id; }; int psil_set_new_ep_config(struct device *dev, const char *name,