Re: [PATCH 1/3] DMA: PL330: Infer transfer direction from transfer request instead of platform data

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

 



Hi Boojin,

On 24 August 2011 06:51, Boojin Kim <boojin.kim@xxxxxxxxxxx> wrote:
> Thomas Abraham wrote:
>> Sent: Tuesday, August 23, 2011 7:00 AM
>> To: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
>> Cc: linux-samsung-soc@xxxxxxxxxxxxxxx; kgene.kim@xxxxxxxxxxx;
>> vinod.koul@xxxxxxxxx; Jassi Brar; Boojin Kim
>> Subject: [PATCH 1/3] DMA: PL330: Infer transfer direction from
>> transfer request instead of platform data
>>
>> The transfer direction for a channel can be inferred from the transfer
>> request and the need for specifying transfer direction in platfrom
>> data
>> can be eliminated. So the structure definition 'struct dma_pl330_peri'
>> is no longer required.
>>
>> With the 'struct dma_pl330_peri' removed, the dma controller transfer
>> capabilities cannot be inferred any longer. Hence, the dma controller
>> capabilities is specified using platforme data.
>>
>> Cc: Jassi Brar <jassisinghbrar@xxxxxxxxx>
>> Cc: Boojin Kim <boojin.kim@xxxxxxxxxxx>
>> Signed-off-by: Thomas Abraham <thomas.abraham@xxxxxxxxxx>
>> ---
>>  drivers/dma/pl330.c        |   56 ++++++++------------------------------
>> ------
>>  include/linux/amba/pl330.h |   14 +++--------
>>  2 files changed, 14 insertions(+), 56 deletions(-)
>>

[...]

>>       for (i = 0; i < num_chan; i++) {
>>               pch = &pdmac->peripherals[i];
>> -             if (pdat) {
>> -                     struct dma_pl330_peri *peri = &pdat->peri[i];
>> -
>> -                     switch (peri->rqtype) {
>> -                     case MEMTOMEM:
>> -                             dma_cap_set(DMA_MEMCPY, pd->cap_mask);
>> -                             break;
>> -                     case MEMTODEV:
>> -                     case DEVTOMEM:
>> -                             dma_cap_set(DMA_SLAVE, pd->cap_mask);
>> -                             dma_cap_set(DMA_CYCLIC, pd->cap_mask);
>> -                             break;
> If remove capabilities setting, dmaengine() doesn't search the channel that
> client requests with specific capability.
> So, I think dma_request_channel() would fail.

The capabilities is now supplied using platform data. There is a new
member 'cap_mask' added to the pl330 driver platform data structure.
The capabilities for a pl330 controller can be specified using
cap_mask. For exynos4, the capabilities is set up in the
exynos4_dma_init function. These changes are part of the third patch
in this patchset.

Thanks for your review.

Regards,
Thomas.

[...]
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux