From: Peter Ujfalusi <peter.ujfalusi@nokia.com>
To: David Cohen <david.cohen@nokia.com>
Cc: Tony Lindgren <tony@atomide.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
Jarkko Nikula <jhnikula@gmail.com>,
Liam Girdwood <lrg@slimlogic.co.uk>, Nishanth Menon <nm@ti.com>
Subject: Re: [PATCH v2 2/2] OMAP3: DMA: Errata: sDMA FIFO draining does not finish
Date: Fri, 1 Oct 2010 15:16:53 +0300 [thread overview]
Message-ID: <201010011516.54190.peter.ujfalusi@nokia.com> (raw)
In-Reply-To: <20101001115037.GA12614@esdhcp036161.research.nokia.com>
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-10-01 12:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-01 11:04 [PATCH v2 0/2] OMAP2/3: DMA: FIFO drain errata fixes Peter Ujfalusi
2010-10-01 11:04 ` [PATCH v2 1/2] omap: dma: Fix buffering disable bit setting for omap24xx Peter Ujfalusi
2010-10-01 11:04 ` [PATCH v2 2/2] OMAP3: DMA: Errata: sDMA FIFO draining does not finish Peter Ujfalusi
2010-10-01 11:50 ` David Cohen
2010-10-01 12:16 ` Peter Ujfalusi [this message]
2010-10-01 12:17 ` David Cohen
2010-10-01 12:43 ` Peter Ujfalusi
2010-10-01 12:24 ` Felipe Balbi
2010-10-01 12:30 ` Peter Ujfalusi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201010011516.54190.peter.ujfalusi@nokia.com \
--to=peter.ujfalusi@nokia.com \
--cc=david.cohen@nokia.com \
--cc=jhnikula@gmail.com \
--cc=linux-omap@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
--cc=nm@ti.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox