RE: [PATCH 3/7] DMA: PL330: Add DMA capabilities

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

 



Jassi Brar Wrote:
> On Thu, Jul 14, 2011 at 6:27 AM, boojin <boojin.kim@xxxxxxxxxxx> wrote:
> > Jassi Brar wrote:
> >
> >> On Tue, Jul 5, 2011 at 12:03 PM, Chanho Park <parkch98@xxxxxxxxx> wrote:
> >> > Kukjin Kim <kgene.kim <at> samsung.com> writes:
> >> >
> >> > (snip)
> >> >
> >> >> +             if (slave_config->direction == DMA_TO_DEVICE) {
> >> >> +                     if (slave_config->dst_addr)
> >> >> +                             peri->fifo_addr = slave_config->dst_addr;
> >> >> +                     if (slave_config->dst_addr_width) {
> >> >> +                             i = 0;
> >> >> +                             while (slave_config->dst_addr_width != (1
> <<
> >> > i))
> >> >> +                                     i++;
> >> >> +                             peri->burst_sz = i;
> >> >> +                     }
> >> >> +             } else if (slave_config->direction == DMA_FROM_DEVICE)
> {
> >> >> +                     if (slave_config->src_addr)
> >> >> +                             peri->fifo_addr = slave_config->src_addr;
> >> >> +                     if (slave_config->src_addr_width) {
> >> >> +                             i = 0;
> >> >> +                             while (slave_config->src_addr_width != (1
> <<
> >> > i))
> >> >> +                                     i++;
> >> >> +                             peri->burst_sz = i;
> >> >
> >> > Re-send including cc and mailing lists
> >> > --
> >> > pl330 dmac only supports 1/2/4/8/16 bytes burst size.
> >> > If some bad D/D doesn't use powers of 2 width,
> >> > dmaengine is going to infinite loop.
> >> > You'd better check it instead of running loop.
> >> >
> >> It might be even better to start with max possible width and
> >> keep decreasing 'i' in the loop.
> > I will addressed your comment on next release.
> 
> Actually, best would be to simply do
>     peri->burst_sz =  __ffs(slave_config->src_addr_width);
> 
> And sorry I haven't yet reviewed the patches because I have been
> very busy lately. Will be more active in a few days.

Thanks for good information. Please give me your feedback.
I will release next version after gathering and reflecting all comments.

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