From: Dan Williams <dan.j.williams@intel.com>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] DMA: TXx9 Soc DMA Controller driver (v2)
Date: Sat, 18 Apr 2009 13:05:15 -0700 [thread overview]
Message-ID: <e9c3a7c20904181305l5a7ea5dcy881b7faec8e447bf@mail.gmail.com> (raw)
In-Reply-To: <1239033288-3086-1-git-send-email-anemo@mba.ocn.ne.jp>
On Mon, Apr 6, 2009 at 8:54 AM, Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:
> This patch adds support for the integrated DMAC of the TXx9 family.
>
> Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
> ---
Not quite "ackable" yet...
> +#ifdef CONFIG_MACH_TX49XX
> +#define TXX9_DMA_MAY_HAVE_64BIT_REGS
> +#define TXX9_DMA_HAVE_CCR_LE
> +#define TXX9_DMA_HAVE_SMPCHN
> +#define TXX9_DMA_HAVE_IRQ_PER_CHAN
> +#endif
> +
> +#ifdef TXX9_DMA_HAVE_SMPCHN
> +#define TXX9_DMA_USE_SIMPLE_CHAIN
> +#endif
> +
There seems to be a lot of ifdef magic in the code based on these
defines. Can we move this magic and some of the pure definitions to
drivers/dma/txx9dmac.h? (See the "#ifdefs are ugly" section of
Documentation/SubmittingPatches)
> +static struct dma_async_tx_descriptor *
> +txx9dmac_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
> + size_t len, unsigned long flags)
[..]
> + if (!first) {
> + first = desc;
> + } else {
> + desc_write_CHAR(dc, prev, desc->txd.phys);
> + dma_sync_single_for_device(chan2parent(&dc->chan),
> + prev->txd.phys, ddev->descsize,
> + DMA_TO_DEVICE);
> + list_add_tail(&desc->desc_node,
> + &first->txd.tx_list);
> + }
Is there a reason to keep f'irst' off of the tx_list? It seems like
you could simplify this logic and get rid of the scary looking
list_splice followed by list_add in txx9dmac_desc_put. It also seems
odd that the descriptors on tx_list are not reachable from the
dc->queue list after a submit... but maybe I am missing a subtle
detail?
Regards,
Dan
next prev parent reply other threads:[~2009-04-18 20:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-06 15:54 Atsushi Nemoto
2009-04-17 1:23 ` Dan Williams
2009-04-17 14:32 ` Atsushi Nemoto
2009-04-18 20:05 ` Dan Williams [this message]
2009-04-19 18:34 ` Atsushi Nemoto
2009-04-20 21:59 ` Dan Williams
2009-04-21 0:34 ` Atsushi Nemoto
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=e9c3a7c20904181305l5a7ea5dcy881b7faec8e447bf@mail.gmail.com \
--to=dan.j.williams@intel.com \
--cc=anemo@mba.ocn.ne.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.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
all inboxes | Powered by JetHome®