From patchwork Tue Dec 8 09:04:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 339723 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp3619151ejs; Tue, 8 Dec 2020 01:07:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJxCSVa6X+2fUKg3elrTgbi6Rl6sL3AiwaYJaGXED+3/o75cKHpKhRh+8llIVfX6vb/jTTgx X-Received: by 2002:a05:6402:142f:: with SMTP id c15mr23880698edx.33.1607418464809; Tue, 08 Dec 2020 01:07:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607418464; cv=none; d=google.com; s=arc-20160816; b=DbaEa9X0M8Y7rvlSlUzgFSRNJxe7SINy1kKIZyZtPoenJTlE3+gyrTGj5B1CBCAuNL RpHUJqdF9GsKvCM5CQ885ZMnNuU16m7GqKts5N9Fhs5MlEcb6kP5Jf1ktbh7lUnIoN7q Nc61oWxQ9QWX2+nCZkcPtO+OIId2XaHXJ/UK4F6Q/XhVg0+R1e/HtrBhkOhHFDpfv5oc C/OeSVLyMEnb3nzVxromyXuA/4sxBq5pAydIS/OILHw0mRHJC0BCfHyuu0iAdzAIc1AI 7Px3wjO3Vi7eM2V2ub6e//kGb/7tv6AUszOgfko1tsPuHc0Q0socFuYQly6Yt/zXTMi2 wh9Q== 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=r6BZcfFspKekPk2CsVfLnHhDTFjI4u11uU/6NZJdVNU=; b=pc24lWBcub4I2WgxoHjz/snfnT2xxy+wx4nOJGb9CfJoR53IkgFjeoHDoh91OJEQQH 1DDELRRLet1Nm/EVhS/ffcJShzykPEcGS92Wn/TXnuA5CjHeqYG1Nintlt/JKNFW4vKS 2+Sv+8tKF7x8cNH0KEGymx4Ulx2HGBzu3u87qHsGsBXoiYQSIIVAWAEvhSchqq5PXA9w rZ2aAPfWluCJWycPKZOcTlDwaJbl8qJD80zeFeUm65yjPE1U68Ve8jwUrN/pU5PLsg/i dqAS2WelgD9Yy7h9imYPObhPnNYWglI4U+ufAuarTKp58gU18UwSPoNQI+zWlDI6SMvM dqiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=tCg29i+B; 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 o18si9973884edz.265.2020.12.08.01.07.44; Tue, 08 Dec 2020 01:07:44 -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=tCg29i+B; 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 S1728709AbgLHJFh (ORCPT + 6 others); Tue, 8 Dec 2020 04:05:37 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:51920 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728736AbgLHJFh (ORCPT ); Tue, 8 Dec 2020 04:05:37 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0B894gnS130535; Tue, 8 Dec 2020 03:04:42 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1607418282; bh=r6BZcfFspKekPk2CsVfLnHhDTFjI4u11uU/6NZJdVNU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=tCg29i+B8UJwV3Pfq2s0qvVYpTkxPJEGk5ifz25EHCOxFMzmyiyjpXSirFejLLuty qSpmK1QiKBYleYnjYb2aY/7bAK4qG8BXSwCoCx8rhv8m6eiVEK9lhlbUO2woDTBehf SFVdYfBPkAMbMiANtfxWRXlRh/p3TZtvb8pYVxG8= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0B894gO1057170 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 8 Dec 2020 03:04:42 -0600 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE115.ent.ti.com (10.64.6.36) 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:04:41 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE100.ent.ti.com (10.64.6.21) 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:04:41 -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 0B893dcK120112; Tue, 8 Dec 2020 03:04:38 -0600 From: Peter Ujfalusi To: , , , CC: , , , , , , , Subject: [PATCH v3 15/20] dmaengine: ti: Add support for k3 event routers Date: Tue, 8 Dec 2020 11:04:35 +0200 Message-ID: <20201208090440.31792-16-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 In k3 architecture a DMA channel (in TR momde) can be triggered by global events, origination from different modules. The events for triggers can be sent from any module which is connected to PSI-L fabric, but the event number to be sent is DMA channel specific, it is only known after the channel itself is requested. The router operation needs to be split up: - route_allocate: configure the dma_spec for the DMA and store the configuration which is needed for the router's input - set_event: callback used by the DMA driver to set the event number for the channel and enable the routing Signed-off-by: Peter Ujfalusi --- include/linux/dma/k3-event-router.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 include/linux/dma/k3-event-router.h -- 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-event-router.h b/include/linux/dma/k3-event-router.h new file mode 100644 index 000000000000..e3f88b2f87be --- /dev/null +++ b/include/linux/dma/k3-event-router.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2020 Texas Instruments Incorporated - https://www.ti.com + */ + +#ifndef K3_EVENT_ROUTER_ +#define K3_EVENT_ROUTER_ + +#include + +struct k3_event_route_data { + void *priv; + int (*set_event)(void *priv, u32 event); +}; + +#endif /* K3_EVENT_ROUTER_ */