From: manjugk@ti.com (G, Manjunath Kondaiah)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 10/14] OMAP: DMA: Use DMA device attributes
Date: Thu, 2 Dec 2010 23:02:11 +0530 [thread overview]
Message-ID: <20101202173211.GA25943@manju-desktop> (raw)
In-Reply-To: <20101202170724.GQ17222@atomide.com>
On Thu, Dec 02, 2010 at 09:07:25AM -0800, Tony Lindgren wrote:
> * G, Manjunath Kondaiah <manjugk@ti.com> [101124 04:43]:
> > Existing DMA API's are using cpu_*is_* checks for differentiating
> > omap1 and omap2+ code and handle cpu_*is_* checks with DMA device
> > attributes.
> >
> > Also, move OMAP1 and OMAP2+ specific API's into respective mach-omap
> > dma driver files.
>
> This patch is unreadable and needs to be split.
I can split this patch as:
1. all chaining related API movement in one patch.
2. Rest of the changes in second patch.
>
> Also, why are you making duplicate copies of the same generic
> functions?
>
> Now you've copied these into mach-omap1/dma.c:
>
> > +set_src_params(int lch, unsigned long src_start, int src_ei, int src_fi)
> > +{
> > + dma_write(src_start, CSSA, lch);
> > +
> > + dma_write(src_ei, CSEI, lch);
> > + dma_write(src_fi, CSFI, lch);
> > +}
> > +
> > +static void set_dest_params(int lch, unsigned long dest_start, int dst_ei,
> > + int dst_fi)
> > +{
> > + dma_write(dest_start, CDSA, lch);
> > +
> > + dma_write(dst_ei, CDEI, lch);
> > + dma_write(dst_fi, CDFI, lch);
> > +}
> ...
>
> And then again the same functions in mach-omap2/dma.c:
Earlier, handling of CSSA and CDSA was different because 16 bit
registers vs 32 bit registers. Now, with latest patch series, all the
registers are handled inside functions, these API's can be retained in
plat-omap.
>
> > +static void omap2_set_src_params(int lch, unsigned long src_start, int src_ei,
> > + int src_fi)
> > +{
> > + dma_write(src_start, CSSA, lch);
> > +
> > + dma_write(src_ei, CSEI, lch);
> > + dma_write(src_fi, CSFI, lch);
> > +}
> > +
> > +static void omap2_set_dest_params(int lch, unsigned long dest_start, int dst_ei,
> > + int dst_fi)
> > +{
> > + dma_write(dest_start, CDSA, lch);
> > +
> > + dma_write(dst_ei, CDEI, lch);
> > + dma_write(dst_fi, CDFI, lch);
> > +}
> ...
>
> All the common functions should stay in plat-omap/dma.c.
I agree.
-Manjunath
next prev parent reply other threads:[~2010-12-02 17:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1290603110-14119-1-git-send-email-manjugk@ti.com>
[not found] ` <20101125112811.GA27574@GLPP-machine>
2010-12-01 19:04 ` [PATCH v5 00/14] OMAP: DMA: hwmod and DMA as platform device G, Manjunath Kondaiah
2010-12-02 2:37 ` Tony Lindgren
[not found] ` <1290603110-14119-11-git-send-email-manjugk@ti.com>
2010-12-02 17:07 ` [PATCH v5 10/14] OMAP: DMA: Use DMA device attributes Tony Lindgren
2010-12-02 17:32 ` G, Manjunath Kondaiah [this message]
[not found] ` <1290603110-14119-10-git-send-email-manjugk@ti.com>
2010-12-02 18:44 ` [PATCH v5 09/14] OMAP: DMA: Convert DMA library into platform driver Tony Lindgren
2010-12-02 18:46 ` Tony Lindgren
2010-12-02 18:49 ` Tony Lindgren
2010-12-02 20:04 ` G, Manjunath Kondaiah
2010-12-02 20:52 ` Tony Lindgren
2010-12-03 16:43 ` G, Manjunath Kondaiah
2010-12-03 23:24 ` Tony Lindgren
2011-01-13 11:20 ` G, Manjunath Kondaiah
2011-01-19 19:04 ` Tony Lindgren
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=20101202173211.GA25943@manju-desktop \
--to=manjugk@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).