From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Likely Subject: Re: Is there a binding for IORESOURCE_DMA population? Date: Fri, 15 Jul 2011 17:49:56 -0600 Message-ID: <20110715234956.GP2833@ponder.secretlab.ca> References: <20110715163254.GG1840@S2100-06.ap.freescale.net> <201107152011.41546.arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <201107152011.41546.arnd-r2nGTMty4D4@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: Arnd Bergmann Cc: Guo Shawn-R65073 , devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Tabi Timur-B04825 List-Id: devicetree@vger.kernel.org On Fri, Jul 15, 2011 at 08:11:41PM +0200, Arnd Bergmann wrote: > On Friday 15 July 2011 18:45:38 Tabi Timur-B04825 wrote: > > > > On Fri, Jul 15, 2011 at 11:32 AM, Shawn Guo wrote: > > > > > First of all, using powerpc dma-channel binding on such dma event > > > seems not reflecting the hardware facts. Secondly, the binding in > > > this case (below) looks silly. Thirdly, device driver need to make > > > code change for simply getting a dma event number. > > > > Take a look at p1022ds.dts or mpc8610hpcd.dts. We create separate DMA > > channel nodes on Freescale PowerPC parts because the channels really > > are independent. On these two boards, some of the DMA channels are > > used by the async DMA driver, and two of the channels are used by the > > audio driver. > > I think this is much better than using IORESOURCE_DMA fields, which > basically are only well-defined for PC-style i8237 DMA controllers > used in stuff like floppy drives and ISA sound cards. > > However, we should find a way to standardize finding the dma_chan > for an platform_device based on a phandle. Maybe a little helper > that will scan a well-known property (dma-channels?) for phandles > to a device_node that is backing a struct dma_chan. That sounds appropriate. g.