Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp5944109ybx; Mon, 11 Nov 2019 01:04:48 -0800 (PST) X-Google-Smtp-Source: APXvYqyDTRR3QGfEPUCcV2BclQz9cvTLIuooD/mYvEpTwoTtJpMo435uM+jZD4u/EnsUEmrwYp2l X-Received: by 2002:a50:cc42:: with SMTP id n2mr25044106edi.289.1573463088757; Mon, 11 Nov 2019 01:04:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573463088; cv=none; d=google.com; s=arc-20160816; b=Iwj6hTnp6nRQn5a8bDCuklsaL1p7aFU/s7vl29XgACUOUpkRoMhIPXNFjXzMgK8X8J PTJ4R8Shr9USu/kiE24zG2wj0qaIMDYerVwFyUGjedYpV4S62gJQljor5KrjFvYAGXD0 37GU+1aovoicIkfhckcH9RWFoIZY4funXrnqGJDJc4e+PSHtzeyZwDmVvsE1Pvc+AD85 Sk5rQrGMGY+A409NtdDifFaZi2OZM19yKixQgzBj+Vkzk+FCYLDjbblEXM0qBJCf2qKM zpqyC1wuTPOCWLaq1XK24WiWvdrmFxNiE2wxGwrHa1r8K18s/7yWuVe/SMDxiram3Wjn Yreg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=WNxI5L67OGag0dqTvc5fT/CKgvA3c/Mugj7Bk3zOlas=; b=rgJ62jxNI+OcPiwtXUkRJttXDQGwjrTsBcKEzIgR5v8jFY/TZhgVcY36yr9pzgML36 CmD0SMDFLAAq2qy6kYYKXBDPdYqiZvyCm09hUgAXcV1c9eLyZzim8+cjY/qjL9KOG2aY 562ZaQ62oGfi0bDPr7gNbE6Ik6ymBQulkxeVyK3zev4vi7sTGDBkuEZcyXGBUZ/Xy5m8 wxXGA2fADQ97JMARLac608nFQLKc/Aq1raWduvwIsIEGlVeb6NitKfxsRfX/6ULdlXkg sZ1Ls2J2GccTZ6Bu/l/mdtWc03mL2OP9RU1cjjGmFvEcSPOz4aHa/EeZG005krr8WUI1 Pplg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="e69J39U/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t18si8917371ejx.354.2019.11.11.01.04.25; Mon, 11 Nov 2019 01:04:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="e69J39U/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726981AbfKKJBF (ORCPT + 99 others); Mon, 11 Nov 2019 04:01:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:43026 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726768AbfKKJBE (ORCPT ); Mon, 11 Nov 2019 04:01:04 -0500 Received: from localhost (unknown [106.201.42.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 60B34206BA; Mon, 11 Nov 2019 09:01:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573462864; bh=z/j9crcHsk7S4aU9B2I6s0jBvYdfKN9sp40Q4ClK9J4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=e69J39U/DZqIZdafDyLMGrY+J4YYs6R8wCZts1udWAxa3Xhh2I/nPeAbcxehxjL/F IlHNETuf6ciTeHdl4WU+En9BixkF7hVwiHh8IFPPhLOrfJAlgJNT8lmZaw7kmMydY9 CTHYUhLs399fKoWZGmHus2OLDQB3QXS1NUL58kPc= Date: Mon, 11 Nov 2019 14:30:57 +0530 From: Vinod Koul To: Peter Ujfalusi Cc: robh+dt@kernel.org, nm@ti.com, ssantosh@kernel.org, dan.j.williams@intel.com, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, grygorii.strashko@ti.com, lokeshvutla@ti.com, t-kristo@ti.com, tony@atomide.com, j-keerthy@ti.com Subject: Re: [PATCH v4 09/15] dmaengine: ti: New driver for K3 UDMA - split#1: defines, structs, io func Message-ID: <20191111090057.GT952516@vkoul-mobl> References: <20191101084135.14811-1-peter.ujfalusi@ti.com> <20191101084135.14811-10-peter.ujfalusi@ti.com> <20191111052828.GN952516@vkoul-mobl> <00777586-a3ac-2404-5226-e8c887936a32@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00777586-a3ac-2404-5226-e8c887936a32@ti.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11-11-19, 10:33, Peter Ujfalusi wrote: > On 11/11/2019 7.28, Vinod Koul wrote: > > On 01-11-19, 10:41, Peter Ujfalusi wrote: > >> + struct udma_static_tr static_tr; > >> + char *name; > >> + > >> + struct udma_tchan *tchan; > >> + struct udma_rchan *rchan; > >> + struct udma_rflow *rflow; > >> + > >> + bool psil_paired; > >> + > >> + int irq_num_ring; > >> + int irq_num_udma; > >> + > >> + bool cyclic; > >> + bool paused; > >> + > >> + enum udma_chan_state state; > >> + struct completion teardown_completed; > >> + > >> + u32 bcnt; /* number of bytes completed since the start of the channel */ > >> + u32 in_ring_cnt; /* number of descriptors in flight */ > >> + > >> + bool pkt_mode; /* TR or packet */ > >> + bool needs_epib; /* EPIB is needed for the communication or not */ > >> + u32 psd_size; /* size of Protocol Specific Data */ > >> + u32 metadata_size; /* (needs_epib ? 16:0) + psd_size */ > >> + u32 hdesc_size; /* Size of a packet descriptor in packet mode */ > >> + bool notdpkt; /* Suppress sending TDC packet */ > >> + int remote_thread_id; > >> + u32 src_thread; > >> + u32 dst_thread; > >> + enum psil_endpoint_type ep_type; > >> + bool enable_acc32; > >> + bool enable_burst; > >> + enum udma_tp_level channel_tpl; /* Channel Throughput Level */ > >> + > >> + /* dmapool for packet mode descriptors */ > >> + bool use_dma_pool; > >> + struct dma_pool *hdesc_pool; > >> + > >> + u32 id; > >> + enum dma_transfer_direction dir; > > > > why does channel have this, it already exists in descriptor > > The channel can not change role, it is set when it was requested. In the how do you do this on set? The channel is requested, we do not know the direction. When prep_ is invoked we know it.. -- ~Vinod