[PATCH V4 02/14] DMA: PL330: Update PL330 DMA API driver

Boojin Kim boojin.kim at samsung.com
Mon Jul 25 05:48:42 EDT 2011



> -----Original Message-----
> From: Jassi Brar [mailto:jassisinghbrar at gmail.com]
> Sent: Monday, July 25, 2011 5:58 PM
> To: Boojin Kim
> Cc: linux-arm-kernel at lists.infradead.org; linux-samsung-soc at vger.kernel.org;
> Vinod Koul; Dan Williams; Kukjin Kim; Grant Likely; Mark Brown
> Subject: Re: [PATCH V4 02/14] DMA: PL330: Update PL330 DMA API driver
>
> On Mon, Jul 25, 2011 at 6:58 AM, Boojin Kim <boojin.kim at samsung.com> wrote:
>
> > diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
> > index b7ecf47..586ab39 100644
> > --- a/drivers/dma/pl330.c
> > +++ b/drivers/dma/pl330.c
> > @@ -455,7 +455,7 @@ static struct dma_pl330_desc *pl330_get_desc(struct
> dma_pl330_chan *pch)
> >        async_tx_ack(&desc->txd);
> >
> >        desc->req.rqtype = peri->rqtype;
> > -       desc->req.peri = peri->peri_id;
> > +       desc->req.peri = pch->chan.chan_id;
> Btw, I plan to revert this if my patch is accepted that proposes
> to free chan_id solely for use by DMAC drivers(which we should
> employ to pass paltform assigned channel ID to client drivers)
>
> > @@ -748,17 +747,19 @@ pl330_probe(struct amba_device *adev, const struct
> amba_id *id)
> >                struct dma_pl330_peri *peri = &pdat->peri[i];
> >                pch = &pdmac->peripherals[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);
> > -                       break;
> > -               default:
> > -                       dev_err(&adev->dev, "DEVTODEV Not Supported\n");
> > -                       continue;
> > +               if (peri) {
> > +                       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);
> > +                               break;
> > +                       default:
> > +                               dev_err(&adev->dev, "DEVTODEV Not
> Supported\n");
> > +                               continue;
> > +                       }
> >                }
> If you pass platform data correctly, you don't need to check against NULL
> peri.

Ok, It may be excessive error check. I will remove this point.





More information about the linux-arm-kernel mailing list