[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <129600E5E5FB004392DDC3FB599660D790F8C3EB@irsmsx504.ger.corp.intel.com>
Date: Tue, 31 Mar 2009 15:01:49 +0100
From: "Sosnowski, Maciej" <maciej.sosnowski@...el.com>
To: Hans-Christian Egtvedt <hans-christian.egtvedt@...el.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Williams, Dan J" <dan.j.williams@...el.com>
Subject: RE: [PATCH 1/2] dw_dmac: set CAP_PRIVATE capability for DW DMA
controller
Hans-Christian Egtvedt wrote:
> This patch adds the private capability for the DW DMA controller. This
> allows the DMA controller to do other DMA transfers than
> memory-to-memory. For example when the DMA controller is used by
> peripherals to transfer data between memory and peripheral.
>
> Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@...el.com>
> ---
> drivers/dma/dw_dmac.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
> index a97c07e..1c5e31d 100644
> --- a/drivers/dma/dw_dmac.c
> +++ b/drivers/dma/dw_dmac.c
> @@ -994,6 +994,7 @@ static int __init dw_probe(struct platform_device *pdev)
> channel_clear_bit(dw, MASK.DST_TRAN, dw->all_chan_mask);
> channel_clear_bit(dw, MASK.ERROR, dw->all_chan_mask);
>
> + dma_cap_set(DMA_PRIVATE, dw->dma.cap_mask);
> dma_cap_set(DMA_MEMCPY, dw->dma.cap_mask);
> dma_cap_set(DMA_SLAVE, dw->dma.cap_mask);
> dw->dma.dev = &pdev->dev;
Hi Hans,
Adding Dan...
Please note that this way you permenently exclude the device from public use.
If that's your intent that's fine.
Remember however that you can leave the device generally non-private
and attempt as needed to allocate a channel for exclusive usage by dma_request_channel()
- it would set DMA_PRIVATE flag if private channel candidate has been found.
With this note:
Acked-by: Maciej Sosnowski <maciej.sosnowski@...el.com>
Regards,
Maciej--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists