From mboxrd@z Thu Jan 1 00:00:00 1970 From: viresh.kumar@st.com (Viresh Kumar) Date: Wed, 18 Jan 2012 16:10:51 +0530 Subject: [PATCH 2/8] dmaengine: Add flow controller information to dma_slave_config In-Reply-To: References: <5f9ec59562e86536c4123f61891b95590293030f.1326707233.git.viresh.kumar@st.com> <4F153A3A.7060902@st.com> Message-ID: <4F16A1B3.5000409@st.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 1/18/2012 4:06 PM, Linus Walleij wrote: > On Tue, Jan 17, 2012 at 10:07 AM, Viresh Kumar wrote: >> On 1/17/2012 2:07 PM, Linus Walleij wrote: > Maybe I should say that it's supposed to transfer information from > the driver to the DMA engine that: > > 1) The driver naturally "knows", like which physical register address > the FIFO is in or burst width etc and the DMA engine has no > business knowing. > > 2) That needs to change at runtime, like for example how the PL022 > driver request 32, 16 or 8 bit wide transfers depending on bus > width. > > I think master mode could very well be under (1). So the driver knows > if this hardware expects the DMA engine to drive the transaction or > if it's the device itself that should drive it. > > So I'm starting to think like you :-) :) >> One more thing. I missed few things in this patch: >> - Need to update all instances of struct dma_slave_config with >> .device_fc = false > > All statically defined structs contain zero == false by default > so it's not needed. > > Make sure any dynamic allocations (I don't know of any!) > are kzalloc() though. > I already fixed these in V2. Most of the drivers created inside routines. They are not getting initialized to _zero_ , so i had to fix it. There are few though, who used kzalloc. I didn't touch them. -- viresh From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753312Ab2ARKlN (ORCPT ); Wed, 18 Jan 2012 05:41:13 -0500 Received: from eu1sys200aog120.obsmtp.com ([207.126.144.149]:39609 "EHLO eu1sys200aog120.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752790Ab2ARKlM (ORCPT ); Wed, 18 Jan 2012 05:41:12 -0500 Message-ID: <4F16A1B3.5000409@st.com> Date: Wed, 18 Jan 2012 16:10:51 +0530 From: Viresh Kumar User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20110812 Thunderbird/6.0 MIME-Version: 1.0 To: Linus Walleij Cc: "vinod.koul@intel.com" , "dan.j.williams@intel.com" , "linux@arm.linux.org.uk" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Armando VISCONTI , Shiraz HASHIM , Vipin KUMAR , Rajeev KUMAR , Deepak SIKRI , Vipul Kumar SAMAR , Amit VIRDI , Pratyush ANAND , Bhupesh SHARMA , "viresh.linux@gmail.com" , Bhavna YADAV , Vincenzo FRASCINO , Mirko GARDI Subject: Re: [PATCH 2/8] dmaengine: Add flow controller information to dma_slave_config References: <5f9ec59562e86536c4123f61891b95590293030f.1326707233.git.viresh.kumar@st.com> <4F153A3A.7060902@st.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/18/2012 4:06 PM, Linus Walleij wrote: > On Tue, Jan 17, 2012 at 10:07 AM, Viresh Kumar wrote: >> On 1/17/2012 2:07 PM, Linus Walleij wrote: > Maybe I should say that it's supposed to transfer information from > the driver to the DMA engine that: > > 1) The driver naturally "knows", like which physical register address > the FIFO is in or burst width etc and the DMA engine has no > business knowing. > > 2) That needs to change at runtime, like for example how the PL022 > driver request 32, 16 or 8 bit wide transfers depending on bus > width. > > I think master mode could very well be under (1). So the driver knows > if this hardware expects the DMA engine to drive the transaction or > if it's the device itself that should drive it. > > So I'm starting to think like you :-) :) >> One more thing. I missed few things in this patch: >> - Need to update all instances of struct dma_slave_config with >> .device_fc = false > > All statically defined structs contain zero == false by default > so it's not needed. > > Make sure any dynamic allocations (I don't know of any!) > are kzalloc() though. > I already fixed these in V2. Most of the drivers created inside routines. They are not getting initialized to _zero_ , so i had to fix it. There are few though, who used kzalloc. I didn't touch them. -- viresh