Re: [PATCH v2] dmaengine: add CSR SiRFprimaII DMAC driver

From: Barry Song
Date: Tue Sep 20 2011 - 01:25:45 EST


2011/9/20 Jassi Brar <jaswinder.singh@xxxxxxxxxx>:
> On 19 September 2011 16:55, Barry Song <21cnbao@xxxxxxxxx> wrote:
>> 2011/9/19 Vinod Koul <vinod.koul@xxxxxxxxx>:
>>> On Mon, 2011-09-19 at 09:56 +0000, Barry Song wrote:
>>>> > > > Not sure why you support this, there seem to be no DMA_SLAVE
>>>> support in
>>>> > > > this version ate least
>>>> > >
>>>> > > Not. I support dma_slave. But I have no prep_slave_sg function
>>>> since I can
>>>> > use the gen xfer to replace it.
>>>> > Yes thats okay...
>>>> >
>>>> > Then I have questions on genxfer function...
>>>> > where are you copying either src or dstn_start address, you seem to
>>>> > completely ignore them?
>>>>
>>>> Since I only support memory->device or device ->memory, and channel
>>>> number is fixed to every device. Then I actually don't care device
>>>> address at all. Either src or dst is fixed to the device's address.
>>> peripheral address can be fixed, not the memory, where do you copy the
>>> memory address?
>>
>> +static int sirfsoc_dma_slave_config(struct sirfsoc_dma_chan *schan,
>> + Â Â Â struct dma_slave_config *config)
>> +{
>> + Â Â Â u32 addr, direction;
>> + Â Â Â unsigned long flags;
>> +
>> + Â Â Â switch (config->direction) {
>> + Â Â Â case DMA_FROM_DEVICE:
>> + Â Â Â Â Â Â Â direction = 0;
>> + Â Â Â Â Â Â Â addr = config->dst_addr;
>> + Â Â Â Â Â Â Â break;
>> +
>> + Â Â Â case DMA_TO_DEVICE:
>> + Â Â Â Â Â Â Â direction = 1;
>> + Â Â Â Â Â Â Â addr = config->src_addr;
>> + Â Â Â Â Â Â Â break;
>> +
>> + Â Â Â default:
>> + Â Â Â Â Â Â Â return -EINVAL;
>> + Â Â Â }
>> + Â...
> I repeat
> {
> Pass addresses using dmaxfer_template.src_start and dmaxfer_template.dst_start
> instead of dma_slave_config.dst_addr and dma_slave_config.src_addr
> }

agree.

-barry
--
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/