Re: dmaengine.c: question about device_alloc_chan_resources
From: linux-os (Dick Johnson)
Date: Fri Sep 19 2008 - 10:50:58 EST
On Fri, 19 Sep 2008, Timur Tabi wrote:
> Haavard Skinnemoen wrote:
>
>> Yes, or maybe provide an interface for simply requesting a channel
>> without having to register any callbacks.
>
> I could use this feature. The sound drivers for our MPC8610 processor use DMA,
> but the drivers need to control the DMA hardware directly, so I can't use
> dmaengine. I would like to be able to just reserve the channels and program
> them as I see fit.
>
> --
> Timur Tabi
> Linux kernel developer at Freescale
The hardware on the PC/AT machines won't allow you to
reserve a specific channel and program it as you see fit,
because there are two devices, one for the low DMA
channels and another for the high ones. Even the low
DMA device has a channel in use as a cascade so, if
you were to touch any of its registers while a DMA
was in progress, the result will be undefined. That's
why there needs to be a central procedure to handle
this shared resource and why drivers need to interface
through it and not touch the hardware. Bus Master
DMA from PCI boards is an entirely different matter.
Nobody but the driver for the board is going to muck
with its DMA so it does not need to be protected as a
shared resource.
Cheers,
Dick Johnson
Penguin : Linux version 2.6.25.17 on an i686 machine (4786.70 BogoMips).
My book : http://www.AbominableFirebug.com/
_
****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@xxxxxxxxxxxx - and destroy all copies of this information, including any attachments, without reading or disclosing them.
Thank you.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/