Re: [PATCH v2 2/2] OMAP3: DMA: Errata: sDMA FIFO draining does not finish

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

 



On Friday 01 October 2010 14:50:37 David Cohen wrote:
> 
> > +		l = sys_cf = dma_read(OCP_SYSCONFIG);
> 
> Shouldn't it be avoided?

I'm restoring the OCP_SYSCONFIG register later on, and reusing 'l' here to avoid 
confusing expression when moving the sDMA to NoStandby.
I could as well introduce other variable for this...

> 
> Regards,
> 
> David
> 
> > +		l &= ~DMA_SYSCONFIG_MIDLEMODE_MASK;
> > +		l |= DMA_SYSCONFIG_MIDLEMODE(DMA_IDLEMODE_NO_IDLE);
> > +		dma_write(l , OCP_SYSCONFIG);

I could have:
	dma_write((sys_fc & (~DMA_SYSCONFIG_MIDLEMODE_MASK)) |
			 DMA_SYSCONFIG_MIDLEMODE(DMA_IDLEMODE_NO_IDLE), OCP_SYSCONFIG);

Than I do not need the re-read the CCR, but it looks a bit messy.

> > +
> > +		l = dma_read(CCR(lch));
> > +		l &= ~OMAP_DMA_CCR_EN;
> > +		dma_write(l, CCR(lch));
> > +

...

> > +		/* Restore OCP_SYSCONFIG */
> > +		dma_write(sys_cf, OCP_SYSCONFIG);

-- 
Péter
--
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