From: Vikram Narayanan <vikram186@gmail.com>
To: Bastian Hecht <hechtb@googlemail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH 2/2] mtd: sh_flctl: Use DMA for data fifo FLTDFIFO when available
Date: Sun, 23 Sep 2012 20:02:18 +0530 [thread overview]
Message-ID: <505F1D72.6020306@gmail.com> (raw)
In-Reply-To: <1348401683-15698-2-git-send-email-hechtb@gmail.com>
On 9/23/2012 5:31 PM, Bastian Hecht wrote:
> Map and unmap DMA buffers, trigger the DMA and wait for the completion.
> On failure we fallback to PIO mode.
>
> Signed-off-by: Bastian Hecht<hechtb@gmail.com>
> ---
> drivers/mtd/nand/sh_flctl.c | 99 +++++++++++++++++++++++++++++++++++++++++-
> include/linux/mtd/sh_flctl.h | 1 +
> 2 files changed, 98 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c
> index 2cf6871..00211f9 100644
> --- a/drivers/mtd/nand/sh_flctl.c
> +++ b/drivers/mtd/nand/sh_flctl.c
> @@ -24,6 +24,8 @@
> #include<linux/module.h>
> #include<linux/kernel.h>
> #include<linux/delay.h>
> +#include<linux/dmaengine.h>
> +#include<linux/dma-mapping.h>
> #include<linux/interrupt.h>
> #include<linux/io.h>
> #include<linux/platform_device.h>
> @@ -106,6 +108,13 @@ static void wait_completion(struct sh_flctl *flctl)
> writeb(0x0, FLTRCR(flctl));
> }
>
> +static void flctl_dma_complete(void *param)
> +{
> + struct sh_flctl *flctl = param;
> +
> + complete(&flctl->dma_complete);
> +}
> +
> static void set_addr(struct mtd_info *mtd, int column, int page_addr)
> {
> struct sh_flctl *flctl = mtd_to_flctl(mtd);
> @@ -261,6 +270,71 @@ static void wait_wecfifo_ready(struct sh_flctl *flctl)
> timeout_error(flctl, __func__);
> }
>
> +static void flctl_release_dma(struct sh_flctl *flctl);
I don't think the above statement is required.
~Vikram
next prev parent reply other threads:[~2012-09-23 14:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-23 12:01 [PATCH 1/2] mtd: sh_flctl: Setup and release DMA channels Bastian Hecht
2012-09-23 12:01 ` [PATCH 2/2] mtd: sh_flctl: Use DMA for data fifo FLTDFIFO when available Bastian Hecht
2012-09-23 14:32 ` Vikram Narayanan [this message]
2012-09-24 9:07 ` Bastian Hecht
2012-09-23 14:31 ` [PATCH 1/2] mtd: sh_flctl: Setup and release DMA channels Vikram Narayanan
2012-09-24 9:05 ` Bastian Hecht
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=505F1D72.6020306@gmail.com \
--to=vikram186@gmail.com \
--cc=hechtb@googlemail.com \
--cc=linux-mtd@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