Re: [PATCH v2 10/11] OMAP: DMA: Use DMA device attributes

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

 



Manjunatha GK <manjugk@xxxxxx> 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 <manjugk@xxxxxx>
> Cc: Benoit Cousson <b-cousson@xxxxxx>
> Cc: Kevin Hilman <khilman@xxxxxxxxxxxxxxxxxxx>
> Cc: Santosh Shilimkar <santosh.shilimkar@xxxxxx>

[...]

>  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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux