From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Williams Subject: Re: [PATCH 00/11] ARM: PrimeCell DMA Interface v5 Date: Sat, 1 May 2010 16:28:59 -0700 Message-ID: References: <1270681920-4461-1-git-send-email-linus.walleij@stericsson.com> <20100422110025.GC20008@n2100.arm.linux.org.uk> <20100501224429.GA17693@n2100.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Linus Walleij Cc: Russell King - ARM Linux , Linus WALLEIJ , "akpm@linux-foundation.org" , Grant Likely , "linux-arm-kernel@lists.infradead.org" , "linux-mmc@vger.kernel.org" , STEricsson_nomadik_linux , "linux-kernel@vger.kernel.org" List-Id: linux-mmc@vger.kernel.org On Sat, May 1, 2010 at 4:04 PM, Linus Walleij wrote: > 2010/5/2 Russell King - ARM Linux : > >> Versatile has some MUXing on three of the DMA signals, so (eg) we >> really don't want UARTs claiming DMAs just because they're in existe= nce >> and not in use - that would prevent DMAs from being used for (eg) AA= CI >> or MMC. > > As long as Versatile doesn't specify any filter function or > data for the channel allocation function (it currently doesn't and de= faults > to NULL) it won't even try to call the DMA engine to allocate a chann= el > for say the UART. > > There is nothing blocking some other peripheral from grabbing a > muxed channel in that case. > > But the implementation of the DMA engine would be better of > handling the muxing dynamically I believe, so when the PL011 > driver (say) requests a DMA channel, it doesn't mean it requests the > *physical* channel and holds it (unless the driver is very na=C4=8Fve= ly > implemented) it nominally means it reserves a placeholder in the > DMA engine. > > When the driver issues a request to perform a DMA transfer, it will p= ull > out a physical channel and use that, then return it. If there is too > much combat about the physical channels, you configure out DMA > for the least wanted PrimeCells. > Could you simulate this by publishing more struct dma_chans than are physically present, and then handle the muxing internal to the driver? Or am I misunderstanding the usage model?