Re: [RFC][PATCH] DMA: Expand dmaengine implementation for more DMACs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/3/07, Peter Pearse <[email protected]> wrote:
Hi,

The existing DMAC used by the dmaengine API (Intel IOAT) assumes all
possible clients can use any available DMA channel.

Some other DMACs restrict particular peripherals to particular DMA channels.

The patch below (against v2.6.22-rc7) extends the dmaengine implementation
to allow such DMACs to differentiate between clients.

Hi Peter,

Have a look at:
http://marc.info/?l=linux-raid&m=118290909528910&w=2
http://marc.info/?l=linux-raid&m=118290909523734&w=2

It seems your requirement could be satisfied by a natural extension of
the 'dma_cap_mask' implementation.  'dma_cap_mask' allows clients to
only be notified of channels that meet a certain capability profile.

However since your driver is pretty much guaranteed to be the only
dmaengine driver in the system you can safely do something like the
following in your client callback:

static enum dma_state_client
my_dma_client_callback(struct dma_client *client,
			struct dma_chan *chan, enum dma_state state)
{
	struct dma_device *dma_dev;
	struct my_platform_specific_dma *plat_dma_dev;
	
	dma_dev = chan->device;
	plat_dma_dev = container_of(dma_dev, struct my_platform_specific_dma, dma_dev);

	if (!plat_dma_dev->platform_specific_capability)
		return DMA_DUP;

	. . .
}

Regards

Peter Pearse


--
Dan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux