From mboxrd@z Thu Jan 1 00:00:00 1970 From: viresh kumar Subject: Re: [QUERY] amba/pl022: DMA channel allocation always fail. Date: Mon, 16 May 2011 10:15:36 +0530 Message-ID: <4DD0ABF0.3020707@st.com> References: <4DCD1D80.7060409@st.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Armando VISCONTI , "spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org" , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" , Shiraz HASHIM To: Linus Walleij Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org On 05/13/2011 08:01 PM, Linus Walleij wrote: > 2011/5/13 viresh kumar : > >> amba/pl022 and my dma driver dw_dmac.c, both have registered init() routines >> with subsys_initcall(). Now at bootup, spi boots up before DMA and so DMA >> channels are never available at spi probe. >> >> What should be done to solve this issue? > > If you check drivers/dma/ste_dma40.c you can see that our solution was to > simply move the DMA engine to arch_initcall(). > > Which sort of makes sense for a DMA engine. > > Does this work for dw_dmac.c? Yes, it worked here too.. -- viresh ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay