lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 03 Aug 2015 13:17:25 +0200
From:	Heiko Stübner <heiko@...ech.de>
To:	linux-rockchip@...ts.infradead.org
Cc:	Shawn Lin <shawn.lin@...k-chips.com>,
	Ulf Hansson <ulf.hansson@...aro.org>,
	Jaehoon Chung <jh80.chung@...sung.com>,
	Seungwon Jeon <tgih.jun@...sung.com>,
	addy ke <addy.ke@...k-chips.com>,
	Weijun Yang <Weijun.Yang@....com>,
	Kevin Hao <haokexin@...il.com>,
	Scott Branden <sbranden@...adcom.com>,
	Andrew Bresticker <abrestic@...omium.org>,
	Vincent Yang <vincent.yang.fujitsu@...il.com>,
	Stephen Boyd <sboyd@...eaurora.org>, dianders@...omium.org,
	linux-kernel@...r.kernel.org,
	Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
	Alim Akhtar <alim.akhtar@...sung.com>,
	linux-mmc@...r.kernel.org, Jean Delvare <jdelvare@...e.de>
Subject: Re: [PATCH v2] mmc: dw_mmc: Add external dma interface support

Hi Shawn,

Am Montag, 3. August 2015, 11:27:19 schrieb Shawn Lin:
> DesignWare MMC Controller can support two types of DMA
> mode: external dma and internal dma. We get a RK312x platform
> integrated dw_mmc and ARM pl330 dma controller. This patch add
> edmac ops to suuport these platforms. I've tested it on RK312x
> platform with edmac mode and RK3288 platform with idmac mode.
> 
> Patch is based on next of git://git.linaro.org/people/ulf.hansson/mmc
> 
> Signed-off-by: Shawn Lin <shawn.lin@...k-chips.com>
> 
> ---
> 
> Changes in v2:
> - Fix typo of dev_info msg
> - remove unused dmach from declaration of dw_mci_dma_slave
> 
>  drivers/mmc/host/Kconfig        |  24 +++++-
>  drivers/mmc/host/dw_mmc-pltfm.c |   4 +
>  drivers/mmc/host/dw_mmc.c       | 169
> ++++++++++++++++++++++++++++++++++++++-- include/linux/mmc/dw_mmc.h      | 
> 18 ++++-
>  4 files changed, 205 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> index 6a0f9c7..2a66b08 100644
> --- a/drivers/mmc/host/Kconfig
> +++ b/drivers/mmc/host/Kconfig
> @@ -607,16 +607,36 @@ config MMC_DW
>  	help
>  	  This selects support for the Synopsys DesignWare Mobile Storage IP
>  	  block, this provides host support for SD and MMC interfaces, in both
> -	  PIO and external DMA modes.
> +	  PIO, internal DMA mode and external DMA modes.
> +
> +choice
> +	prompt "DesignWare MMC transfer mode"
> +	depends on MMC_DW
> +
> +config MMC_DW_PIO
> +	bool "Use PIO transfers only"
> +	help
> +	  Use PIO to transfer data between memory and the hardware.
> +	  PIO is slower than DMA as it requires CPU instructions to
> +	  move the data. This has been the traditional default for
> +	  the DW MCI driver.
> 
>  config MMC_DW_IDMAC
>  	bool "Internal DMAC interface"
> -	depends on MMC_DW
>  	help
>  	  This selects support for the internal DMAC block within the Synopsys
>  	  Designware Mobile Storage IP block. This disables the external DMA
>  	  interface.
> 
> +config MMC_DW_EDMAC
> +	bool "External DMAC interface"
> +	help
> +	  This selects support for the external DMAC block outside the Synopsys
> +	  Designware Mobile Storage IP block. This disables the internal DMA
> +	  interface.
> +
> +endchoice
> +

more a drive-by comment:

This should definitly not be a "choice". We're in multiplatform times, where 
you can have support for a multitude of socs using dw_mmc in one kernel. And 
one might want to use pio, one might want to use the internal dma while 
another one might want to use the external dma.

So which dma to use should definitly be decided at runtime and not at compile-
time.


Heiko

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ