From patchwork Wed Sep 30 09:14:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 313861 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:1081:0:0:0:0 with SMTP id r1csp21510ilj; Wed, 30 Sep 2020 02:14:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDjU4VERtiLv5kG4EKizeKJ5uc3uihr062SfhBm+Ko/PNbwVKDI+1MBxjVNgV/ot6EDOHx X-Received: by 2002:a17:906:488d:: with SMTP id v13mr1786886ejq.524.1601457297080; Wed, 30 Sep 2020 02:14:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601457297; cv=none; d=google.com; s=arc-20160816; b=UdrsoS4rKuc38aLDvQIxFUaMP8I6hr163VbQTq+ykfRCPPLOGohClMjnKrtO06d0L6 zNirea1ZjRKlhga5pX45TM1bVmHcNErx/vhefF2KcfHhOpnroEz5yYAetxOdU6DOiMri zd11pD0AXY43tRykYf8Bo60PuY1KZzH0VXupz6TGpZ2uQKPUhxjdxgnTys0C1WKoq0by 7M56amZcMlw/hzcOQBikHRtFyEbJ7a/CQicKFhYgRT9um3Kj0RYViWn43g0Q9dT80hDt sVq57rzGf7U/IRW3B12ChYsA21YYdIgArQqydNglxFTnspjx1Ye9kRw+z0gewBlKJt9E 47tA== 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=O/+i69YVPWfeF7L2jn48hreDwkBTumXorl+j0hk45YNsiXstqZwGbwqYZctTQaR2yC AlRBg2jLYLWVMoOQpsePdcF1XKzdCTz6WhAyyavdlyg2G6zEZ68i2EJW2U0bk/A3agnf dLMNmnhHAgD0YhmIqaj0h4abZSSaLMytUWDwLLoQDNEVMUyYsDtBLid21WGvD27ho79p QKbCbkCFJOWqBh1Ypqm36e3XBHRzomX2/JxfPtE2jlQCz9Y/rYQQbnRCl8p+V0089D0N umPkByiQXC43fu62RqeUirDUv9/i8hhhb2dLvC9teQoEwu8TD8cfQPd2Bo2ILsZdSoIu 2yxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=CBQ9P5Si; 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 z5si781646ejj.403.2020.09.30.02.14.56; Wed, 30 Sep 2020 02:14:57 -0700 (PDT) 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=CBQ9P5Si; 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 S1728399AbgI3JOs (ORCPT + 6 others); Wed, 30 Sep 2020 05:14:48 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:35202 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729178AbgI3JOm (ORCPT ); Wed, 30 Sep 2020 05:14:42 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 08U9EcHp035112; Wed, 30 Sep 2020 04:14:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1601457278; bh=r6BZcfFspKekPk2CsVfLnHhDTFjI4u11uU/6NZJdVNU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=CBQ9P5SiEzy0dcX4PJlIBgutt2z55EpzRhTyLcms2dWr3JLZGLb7ISDOMupMQ0Mpz JOuon+dme+rPUNTGYiLUQpiu9IQXXj6iY0pSheclceNaqLnGlCe6ggpl5rzUqfhumz 5VSOWaijk4BzjJYEvGqcn8ZKsJH4cp8rE4kkssHc= Received: from DLEE106.ent.ti.com (dlee106.ent.ti.com [157.170.170.36]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 08U9EcHJ100066 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 30 Sep 2020 04:14:38 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Wed, 30 Sep 2020 04:14:37 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE106.ent.ti.com (157.170.170.36) 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; Wed, 30 Sep 2020 04:14:37 -0500 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 08U9DuJk116385; Wed, 30 Sep 2020 04:14:35 -0500 From: Peter Ujfalusi To: , , , , CC: , , , , , , Subject: [PATCH 13/18] dmaengine: ti: Add support for k3 event routers Date: Wed, 30 Sep 2020 12:14:07 +0300 Message-ID: <20200930091412.8020-14-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200930091412.8020-1-peter.ujfalusi@ti.com> References: <20200930091412.8020-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_ */