Re: [PATCH mmc/next v2 3/4] mmc: renesas-sdhi: add support for R-Car Gen3 SDHI DMAC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>
> > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>
> > Signed-off-by: Ai Kyuse <ai.kyuse.uw@xxxxxxxxxxx>
> > ---
> > 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);
> > +}
> 
> ...
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux