public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Ulf Hansson <ulf.hansson@linaro.org>
Cc: Magnus Damm <magnus.damm@gmail.com>,
	linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	Dirk Behme <dirk.behme@de.bosch.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Subject: Re: [PATCH mmc/next v2 3/4] mmc: renesas-sdhi: add support for R-Car Gen3 SDHI DMAC
Date: Wed, 21 Jun 2017 11:01:31 +0200	[thread overview]
Message-ID: <20170621090129.GA27507@verge.net.au> (raw)
In-Reply-To: <20170617205547.GA12971@verge.net.au>

On Sat, Jun 17, 2017 at 10:55:50PM +0200, Simon Horman wrote:
> On Fri, Jun 16, 2017 at 11:58:53AM +0200, Simon Horman wrote:
> > Add a new variant of the SDHI driver to support R-Car Gen3 with DMA via
> > on-chip bus mastering.  Since the DMAC is in a part of the SDHI module it
> > is not suitable to be used via DMA Engine.
> > 
> > Clearing of DM_CM_INFO1 after DMA thanks to Dirk Behme
> > 
> > Cc: Dirk Behme <dirk.behme@de.bosch.com>
> > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> > Signed-off-by: Ai Kyuse <ai.kyuse.uw@renesas.com>
> > ---
> > v2
> > * Enhanced help text and changelog
> > ---
> >  drivers/mmc/host/Kconfig                      |  19 ++
> >  drivers/mmc/host/Makefile                     |   8 +-
> >  drivers/mmc/host/renesas_sdhi_internal_dmac.c | 275 ++++++++++++++++++++++++++
> >  drivers/mmc/host/renesas_sdhi_sys_dmac.c      |   2 +-
> >  drivers/mmc/host/tmio_mmc.h                   |   1 +
> >  5 files changed, 303 insertions(+), 2 deletions(-)
> >  create mode 100644 drivers/mmc/host/renesas_sdhi_internal_dmac.c
> > 
> > diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> > index 5755b69f2f72..81c81ed19735 100644
> > --- a/drivers/mmc/host/Kconfig
> > +++ b/drivers/mmc/host/Kconfig
> > @@ -575,10 +575,29 @@ config MMC_SDHI
> >  	depends on SUPERH || ARM || ARM64
> >  	depends on SUPERH || ARCH_RENESAS || COMPILE_TEST
> >  	select MMC_TMIO_CORE
> > +	select MMC_SDHI_SYS_DMAC if (SUPERH || ARM)
> > +	select MMC_SDHI_INTERNAL_DMAC if ARM64
> >  	help
> >  	  This provides support for the SDHI SD/SDIO controller found in
> >  	  Renesas SuperH, ARM and ARM64 based SoCs
> >  
> > +config MMC_SDHI_SYS_DMAC
> > +	tristate "DMA for SDHI SD/SDIO controllers using SYS-DMAC"
> > +	depends on MMC_SDHI
> > +	help
> > +	  This provides DMA support for SDHI SD/SDIO controllers
> > +	  using SYS-DMAC via DMA Engine. This supports the controllers
> > +	  found in SuperH and Renesas ARM based SoCs.
> > +
> > +config MMC_SDHI_INTERNAL_DMAC
> > +	tristate "DMA for SDHI SD/SDIO controllers using on-chip bus mastering"
> 
> 0-day tells me that building fails on arm/allmodconfig due to
> writeq not being defined. I believe this is because it only exists on
> 64bit systems. My proposed fix for v3 is:
> 
> 	depends on 64BIT

New proposal:

	#include <linux/io-64-nonatomic-hi-lo.h>

> > +	depends on ARM64 || COMPILE_TEST
> > +	depends on MMC_SDHI
> > +	help
> > +	  This provides DMA support for SDHI SD/SDIO controllers
> > +	  using on-chip bus mastering. This supports the controllers
> > +	  found in arm64 based SoCs.
> > +
> >  config MMC_CB710
> >  	tristate "ENE CB710 MMC/SD Interface support"
> >  	depends on PCI
> 
> > diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile
> > index 4d4547116311..8c46766c000c 100644
> > --- a/drivers/mmc/host/Makefile
> > +++ b/drivers/mmc/host/Makefile
> 
> ...
> 
> > +static void
> > +renesas_sdhi_internal_dmac_dm_write(struct tmio_mmc_host *host,
> > +				    int addr, u64 val)
> > +{
> > +	writeq(val, host->ctl + addr);
> > +}
> 
> ...
> 

  reply	other threads:[~2017-06-21  9:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-16  9:58 [PATCH mmc/next v2 0/4] mmc: renesas_sdhi: add support for R-Car Gen3 SDHI DMAC Simon Horman
2017-06-16  9:58 ` [PATCH mmc/next v2 1/4] mmc: tmio, renesas-sdhi: add max_{segs,blk_count} to tmio_mmc_data Simon Horman
2017-06-17 15:01   ` Wolfram Sang
2017-06-16  9:58 ` [PATCH mmc/next v2 2/4] mmc: tmio, renesas-sdhi: add complete to DMA ops Simon Horman
2017-06-17 15:01   ` Wolfram Sang
2017-06-19 11:58     ` Simon Horman
2017-06-16  9:58 ` [PATCH mmc/next v2 3/4] mmc: renesas-sdhi: add support for R-Car Gen3 SDHI DMAC Simon Horman
2017-06-17 15:00   ` Wolfram Sang
2017-06-21  9:10     ` Simon Horman
2017-06-17 20:55   ` Simon Horman
2017-06-21  9:01     ` Simon Horman [this message]
2017-06-16  9:58 ` [PATCH mmc/next v2 4/4] mmc: renesas-sdhi: remove gen3 support from SYS-DMAC driver Simon Horman
2017-06-17 15:01   ` Wolfram Sang
2017-06-17 15:03 ` [PATCH mmc/next v2 0/4] mmc: renesas_sdhi: add support for R-Car Gen3 SDHI DMAC Wolfram Sang
2017-06-19 11:59   ` Simon Horman

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=20170621090129.GA27507@verge.net.au \
    --to=horms@verge.net.au \
    --cc=dirk.behme@de.bosch.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=ulf.hansson@linaro.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=yoshihiro.shimoda.uh@renesas.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