[PATCH 3/7] SAMSUNG: PL330: DMA API: Add S3C DMA API driver for PL330

jassi brar jassisinghbrar at gmail.com
Fri Apr 23 22:06:39 EDT 2010


On Wed, Apr 21, 2010 at 4:40 PM,  <jassisinghbrar at gmail.com> wrote:
> From: Jassi Brar <jassi.brar at samsung.com>
....
> +int s3c2410_dma_ctrl(enum dma_ch id, enum s3c2410_chan_op op)
> +{
> +       struct s3c_pl330_chan *ch;
> +       unsigned long flags;
> +       enum pl330_chan_op pl330op;
> +       int idx, ret;
> +
> +       spin_lock_irqsave(&res_lock, flags);
> +
> +       ch = id_to_chan(id);
> +
> +       if (!ch || chan_free(ch)) {
> +               ret = -EINVAL;
> +               goto ctrl_exit;
> +       }
> +
> +       switch (op) {
> +       case S3C2410_DMAOP_START:
> +               pl330op = PL330_OP_START;
> +               break;
> +
> +       case S3C2410_DMAOP_STOP:
> +               pl330op = PL330_OP_ABORT;
> +               break;
> +
> +       case S3C2410_DMAOP_FLUSH:
> +               pl330op = PL330_OP_FLUSH;
> +               break;

Seems the NOP cases S3C2410_DMAOP_PAUSE, RESUME, TIMEOUT and
STARTED went missing. Those are needed here just for the sake of
completeness and have no effect on the overall functioning.



More information about the linux-arm-kernel mailing list