Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3023664pxu; Tue, 8 Dec 2020 01:08:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJx0JtkBdyMQkmb8F5mxUUY7ZiyTjRFicLqRv4JUUfJwF9NMFOvZjRTXW2TMjvraJySckekP X-Received: by 2002:a05:6402:1d18:: with SMTP id dg24mr23271268edb.221.1607418525100; Tue, 08 Dec 2020 01:08:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607418525; cv=none; d=google.com; s=arc-20160816; b=fYsUCm8DY+S8EpiHYOrwjyVYPn2HDQMdCydQIklS6F2QG/f0bJM8S7DuX9Pr1PlGxh hvCI0ZlygZk9sKd+G7OvDx98y8dtd3BbhQQmAdhLnRG2FZP056+zd7OtZTCSptnOqiNS pkHDMLKuwk2NPqx2qr52gtbrzQbkhjOv4p/91JCX9nIC++ONP+Q3kM/gpdBUkvKtqTAV Ec5572Sv1Uu6QbXPbrnSAVriu7hycw6AL/CmeMSbC65EJx1cbxwIkUqglKhiTvRLbpWQ kRdso847IApy1HBGWJz5R/ppeyk20W4klUdgHCSyYC4dln7ZZbkkjV+G+x/bUvxwDard ZpWQ== 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=t8iD1r7I3ycByTeMdK24ntZOp4lvVK73Srod2s5/9ODTRuPwvDu329ExjmP9io7Kt4 Kk9m6FXlaMolqTJlOmykrEnWXpf1rzcAc26OZMb6N9p/oOVilA+ghM15mo+1vXhijurC H8rGP5XtH4bCR7SgxxRX8CLNj+GnWiU4OduUFjqEc+eRKZSmc5v8iAlQFC2mTZz98jXl n2+7qNmbpu0jCdvRWXZroaL21Xq7s6F+d9nq2E11/ScUYQ5Ix/5mFiRdP05wMsx+4T3j uDzQ4gmgTHOzJoJyTJdDy0W0Bn/YMtcgz+0u+DYGq98el8OpcRdFJqpjTjr9sCOe49jT gsVg== 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 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 c1si9584065edx.275.2020.12.08.01.08.22; Tue, 08 Dec 2020 01:08:45 -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=tCg29i+B; 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 S1728745AbgLHJFi (ORCPT + 99 others); Tue, 8 Dec 2020 04:05:38 -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 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 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 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_ */ -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki