From: Magnus Damm <magnus.damm@gmail.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: "linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>,
linux-mmc@vger.kernel.org,
Dan Williams <dan.j.williams@intel.com>,
Ian Molton <ian@mnementh.co.uk>
Subject: Re: [PATCH 4/8] MMC: add DMA support to tmio_mmc driver, when used on
Date: Thu, 22 Apr 2010 00:12:52 +0000 [thread overview]
Message-ID: <n2saec7e5c31004211712t9441f0r50950ec918bea2e3@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1004211733400.5292@axis700.grange>
Hi Guennadi,
On Wed, Apr 21, 2010 at 11:37 AM, Guennadi Liakhovetski
<g.liakhovetski@gmx.de> wrote:
> SDHI controllers on SuperH, served by the tmio_mmc driver, can use slave DMA
> for data transfer. This patch adds support for the dmaengine API to tmio_mmc
> and the necessary interfacing to the sh_mobile_sdhi MFD driver.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
>
> It could be further broken down into MMC and MFD parts if required, I
> think.
>
> drivers/mfd/sh_mobile_sdhi.c | 25 +++-
> drivers/mmc/host/tmio_mmc.c | 346 ++++++++++++++++++++++++++++++++----
> drivers/mmc/host/tmio_mmc.h | 11 ++
> include/linux/mfd/sh_mobile_sdhi.h | 3 +
> include/linux/mfd/tmio.h | 10 +
> 5 files changed, 359 insertions(+), 36 deletions(-)
[snip]
> diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
> index b2b577f..fafd8c9 100644
> --- a/drivers/mmc/host/tmio_mmc.c
> +++ b/drivers/mmc/host/tmio_mmc.c
> @@ -29,12 +29,21 @@
> #include <linux/irq.h>
> #include <linux/device.h>
> #include <linux/delay.h>
> +#include <linux/dmaengine.h>
> #include <linux/mmc/host.h>
> #include <linux/mfd/core.h>
> #include <linux/mfd/tmio.h>
>
> #include "tmio_mmc.h"
>
> +static void tmio_mmc_enable_dma(struct tmio_mmc_host *host, bool enable)
> +{
> +#if defined(CONFIG_SUPERH) || defined(CONFIG_ARCH_SHMOBILE)
> + /* Switch DMA mode on or off - SuperH specific? */
> + sd_ctrl_write16(host, 0xd8, enable ? 2 : 0);
> +#endif
> +}
> +
Uhh.. #ifdefs. =)
Can't this register setting be implented in the SDHI driver?
In general I realize that you need to extend the logic in the tmio_mmc
driver quite a bit to implement DMA support, but I wonder if it is
possible to extend the tmio_mmc driver with callbacks and use them to
hook in the DMA code?
Thanks!
/ magnus
next prev parent reply other threads:[~2010-04-22 0:12 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-21 15:36 [PATCH 0/8] add DMA support to tmio_mmc, using dmaengine API, use Guennadi Liakhovetski
2010-04-21 15:36 ` [PATCH 1/8] SH: constify multiple DMA related objects and references Guennadi Liakhovetski
2010-04-26 7:10 ` [PATCH 1/8] SH: constify multiple DMA related objects and references to them Paul Mundt
2010-04-21 15:36 ` [PATCH 2/8] SH: add DMA slave IDs for two SDHI controllers, add Guennadi Liakhovetski
2010-04-22 0:02 ` Magnus Damm
2010-04-22 6:28 ` Guennadi Liakhovetski
2010-04-22 7:05 ` Magnus Damm
2010-04-22 9:38 ` Guennadi Liakhovetski
2010-04-21 15:36 ` [PATCH 3/8] SH: add DMA slave definitions to sh7724 Guennadi Liakhovetski
2010-04-21 15:37 ` [PATCH 4/8] MMC: add DMA support to tmio_mmc driver, when used on Guennadi Liakhovetski
2010-04-22 0:12 ` Magnus Damm [this message]
2010-04-22 9:51 ` [PATCH 4/8] MMC: add DMA support to tmio_mmc driver, when used Guennadi Liakhovetski
2010-04-21 15:37 ` [PATCH 5/8] SH: Add SDHI DMA support to ecovec Guennadi Liakhovetski
2010-04-22 0:16 ` Magnus Damm
2010-04-21 15:37 ` [PATCH 6/8] SH: Add SDHI DMA support to ms7724se Guennadi Liakhovetski
2010-04-22 0:18 ` Magnus Damm
2010-04-22 6:20 ` Guennadi Liakhovetski
2010-04-21 15:37 ` [PATCH 7/8] SH: Add SDHI DMA support to kfr2r09 Guennadi Liakhovetski
2010-04-21 15:37 ` [PATCH 8/8] SH: Add SDHI DMA support to migor Guennadi Liakhovetski
2010-04-27 10:38 ` [PATCH 0/8] add DMA support to tmio_mmc, using dmaengine API, Guennadi Liakhovetski
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=n2saec7e5c31004211712t9441f0r50950ec918bea2e3@mail.gmail.com \
--to=magnus.damm@gmail.com \
--cc=dan.j.williams@intel.com \
--cc=g.liakhovetski@gmx.de \
--cc=ian@mnementh.co.uk \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-sh@vger.kernel.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).