Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp2201071pxu; Fri, 9 Oct 2020 10:17:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyylVOlK0uEOniZFFPPme/ygV1Xwb9Ne9N3oS3cjjCK2EphfvDNatlP5CIY1VEhUn4R1wb X-Received: by 2002:aa7:d4c6:: with SMTP id t6mr195022edr.372.1602263876140; Fri, 09 Oct 2020 10:17:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602263876; cv=none; d=google.com; s=arc-20160816; b=KfbuobvyCxmttoXXYUaMfQEigRbwTDuJ9tBVhoPJDTYYqkH7kG0dSkMMF9BuyTvXzJ RKmiSQnHlmfI+nRTdq0Yp4CATrdePZf2Cvty4yhUMPoNBFoq+x1CkW9Mmry/Yfk2hRt1 2GRx8XpQY54AhWfg8iEY9GiSi2ZwuzkeaZoZKr7xcdArIHSLTRO8v9i8NHFdqUR4AMMe lMR4Hv/koWl9MstycWdBrxvSKrELoW9fdH3ZBwYORLwO7JLp4sU5ROYvLfY02F2Mi600 L1jdvgheN4R+m5FewmPaW9PDLvsgFM1ssLuuhLAGuuMYIdAbcwOI9WZmSA21HpZfJILW +I2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kK6IWDVWckwut5sY9WmTmxs4AK2p/B/uEXlFOHgGEOM=; b=HzEWKenwqknc47vGgt525UwmIPMdxNqAYFZubLMuOMjIqunbr5k3tWhoTa6uXwvoXV FQHPrjC9qTkQEW9GgVh5JIqdzws4uWRNVtytqZ7fdOV6V699xN2RIlnEpqAuYF/JiCUV TkzAYpRZ91WnYurzcDuh0XzseZvmRowZP4dMvKlqwlOBUR9rRf7eLGgTx2qE9Gjm5A5w 8vsIYdnT19PGVsDM8OrpGx3Kxk6lx4Qf76r01ENlaPDN3v6M6OonUrSZrquIHBOa49FX vmHdimL361uRjWJlVrfTBVNSVx0GlQavdaq+1I5KWUshimVQZgDbVKqwrQx5PdokXeDj T3qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="ws/Iqsc0"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i3si6352191ejd.424.2020.10.09.10.17.28; Fri, 09 Oct 2020 10:17:56 -0700 (PDT) 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=@kernel.org header.s=default header.b="ws/Iqsc0"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387668AbgJIKaZ (ORCPT + 99 others); Fri, 9 Oct 2020 06:30:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:49354 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387661AbgJIKaY (ORCPT ); Fri, 9 Oct 2020 06:30:24 -0400 Received: from localhost (unknown [122.182.251.219]) (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 0C5192226B; Fri, 9 Oct 2020 10:30:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602239423; bh=2S5cTsiaGUTnL4qYAUGa56y6UyS/LmE34JmfxGcQ1cI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ws/Iqsc0keJOJ4dffz7XEfkOTlv2bWVqrWRRcbvydc1+adsdkeKel5MAWcBuDqoTx ecTxhwGKjS8SDcsrTDq4zg4i3Fjly892qD7bo2q/1+/DPxpaR9Sw9zqzhQOPe24puQ B0xH1diT7tVjHj27BpXRKGNqjvfy2Ih+vVr0urW8= Date: Fri, 9 Oct 2020 16:00:19 +0530 From: Vinod Koul To: Peter Ujfalusi Cc: dmaengine@vger.kernel.org, Rob Herring , Bjorn Andersson , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 2/3] dmaengine: add peripheral configuration Message-ID: <20201009103019.GD2968@vkoul-mobl> References: <20201008123151.764238-1-vkoul@kernel.org> <20201008123151.764238-3-vkoul@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, On 09-10-20, 12:04, Peter Ujfalusi wrote: > On 08/10/2020 15.31, Vinod Koul wrote: > > Some complex dmaengine controllers have capability to program the > > peripheral device, so pass on the peripheral configuration as part of > > dma_slave_config > > > > Signed-off-by: Vinod Koul > > --- > > include/linux/dmaengine.h | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h > > index 6fbd5c99e30c..a15dc2960f6d 100644 > > --- a/include/linux/dmaengine.h > > +++ b/include/linux/dmaengine.h > > @@ -418,6 +418,9 @@ enum dma_slave_buswidth { > > * @slave_id: Slave requester id. Only valid for slave channels. The dma > > * slave peripheral will have unique id as dma requester which need to be > > * pass as slave config. > > + * @peripheral_config: peripheral configuration for programming peripheral > > + * for dmaengine transfer > > + * @peripheral_size: peripheral configuration buffer size > > * > > * This struct is passed in as configuration data to a DMA engine > > * in order to set up a certain channel for DMA transport at runtime. > > @@ -443,6 +446,8 @@ struct dma_slave_config { > > u32 dst_port_window_size; > > bool device_fc; > > unsigned int slave_id; > > + void *peripheral_config; > > + size_t peripheral_size; > > Do you foresee a need of src/dst pair of these? > If we do DEV_TO_DEV with different type of peripherals it is going to > cause issues. Not really as the channel already has direction and this is per channel. If for any any reason subsequent txn is for different direction, I would expect that parameters are set again before prep_ calls -- ~Vinod