Manjunatha GK <[email protected]> writes:

> Existing DMA API's are using cpu_is_xxxx checks for differenciating
> omap1 and omap2plus code.
>
> This patch replaces cpu_is_xxxx checks with DMA device attributes and
> also moves API's which are OMAP1 and OMAP2plus specific into respective
> mach-omap dma driver files.
>
> Signed-off-by: Manjunatha GK <[email protected]>
> Cc: Benoit Cousson <[email protected]>
> Cc: Kevin Hilman <[email protected]>
> Cc: Santosh Shilimkar <[email protected]>

[...]

>  int omap_request_dma(int dev_id, const char *dev_name,
>                    void (*callback)(int lch, u16 ch_status, void *data),
>                    void *data, int *dma_ch_out)
> @@ -754,14 +459,12 @@ int omap_request_dma(int dev_id, const char *dev_name,
>       chan = dma_chan + free_ch;
>       chan->dev_id = dev_id;
>  
> -     pm_runtime_get_sync(&ddev->dev);
> -
> -     if (cpu_class_is_omap1())
> -             clear_lch_regs(free_ch);
> -
> -     if (cpu_class_is_omap2())
> +     if (p->clear_lch_regs)
> +             p->clear_lch_regs(free_ch);
> +     else
>               omap_clear_dma(free_ch);

You access HW registers here.

> +     pm_runtime_get_sync(&ddev->dev);

But don't actually enable HW until here.  

IOW, you need to have the 'get' before you access the HW.

Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to