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

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

 



On Mon, Jul 25, 2011 at 6:58 AM, Boojin Kim <boojin.kim@xxxxxxxxxxx> 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.
��.n��������+%������w��{.n�����{��Ʀ����)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥



[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