All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shawn Lin <shawn.lin@rock-chips.com>
To: "Heiko Stübner" <heiko@sntech.de>
Cc: shawn.lin@rock-chips.com, Ulf Hansson <ulf.hansson@linaro.org>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Seungwon Jeon <tgih.jun@samsung.com>,
	dianders@chromium.org, linux-mips@linux-mips.org,
	Arnd Bergmann <arnd@arndb.de>,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	Alexey Brodkin <abrodkin@synopsys.com>,
	Stefan Agner <stefan@agner.ch>,
	Zhou Wang <wangzhou.bry@gmail.com>,
	Kumar Gala <galak@codeaurora.org>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Wang Long <long.wanglong@huawei.com>,
	Rob Herring <robh+dt@kernel.org>,
	Chaotian Jing <chaotian.jing@mediatek.com>,
	Lukasz Majewski <l.majewski@samsung.com>,
	Jun Nie <jun.nie@linaro.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Kevin Hao <haokexin@gmail.com>, Olof Johansson <olof@lixom.net>,
	Ray Jui <rjui@broadcom.com>,
	Govindraj Raja <govindraj.raja@imgtec.com>,
	linux-samsung-soc@vger.kernel.org,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Vin eet Gupta <vgupta@synopsys.com>,
	Scott Branden <sbranden@broadcom.com>,
	Anand Moon <linux.amoon@gmail.com>,
	linux-rockchip@lists.infradead.org,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	Tushar Behera <trblinux@gmail.com>,
	Pawel Moll <pawel.moll@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	Mischa Jonker <mjonker@synopsys.com>,
	Ralf Baechle <ralf@linux-mips.org>,
	Javier Martinez Canillas <javier.martinez@collabora.co.uk>,
	Vincent Yang <vincent.yang.fujitsu@gmail.com>,
	Stephen Warren <swarren@nvidia.com>,
	devicetree@vger.kernel.org, Kukjin Kim <kgene@kernel.org>,
	Tomeu Vizoso <tomeu.vizoso@collabora.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Russell King <linux@arm.linux.org.uk>,
	Joachim Eastwood <manabian@gmail.com>,
	Sjoerd Simons <sjoerd.simons@collabora.co.uk>,
	Weijun Yang <Weijun.Yang@csr.com>,
	Peter Griffin <peter.griffin@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	addy ke <addy.ke@rock-chips.com>,
	Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>,
	Jean Delvare <jdelvare@suse.de>,
	Kevin Hilman <khilman@linaro.org>,
	Andrew Bresticker <abrestic@chromium.org>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Zhangfei Gao <zhangfei.gao@linaro.org>,
	Wei Xu <xuwei5@hisilicon.com>, Andreas Faerber <afaerber@suse.de>,
	Mark Rutland <mark.rutland@arm.com>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Subject: Re: [RFC PATCH v3 1/5] mmc: dw_mmc: Add external dma interface support
Date: Wed, 5 Aug 2015 17:11:50 +0800	[thread overview]
Message-ID: <55C1D356.5030302@rock-chips.com> (raw)
In-Reply-To: <8177347.dLpRuMxaEU@diego>

在 2015/8/5 16:49, Heiko Stübner 写道:
> Am Mittwoch, 5. August 2015, 16:17:28 schrieb Shawn Lin:
>> DesignWare MMC Controller can supports 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 support these platforms. I've tested it on RK312x
>> platform with edmac mode and RK3288 platform with idmac mode.
>>
>> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
>>
>> ---
> [...]
>
>> diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
>> index 5be9767..6c1c7ea 100644
>> --- a/include/linux/mmc/dw_mmc.h
>> +++ b/include/linux/mmc/dw_mmc.h
>> @@ -16,6 +16,7 @@
>>
>>   #include <linux/scatterlist.h>
>>   #include <linux/mmc/core.h>
>> +#include <linux/dmaengine.h>
>>
>>   #define MAX_MCI_SLOTS	2
>>
>> @@ -40,6 +41,17 @@ enum {
>>
>>   struct mmc_data;
>>
>> +enum {
>> +	TRANS_MODE_PIO = 0,
>> +	TRANS_MODE_IDMAC,
>> +	TRANS_MODE_EDMAC
>> +};
>> +
>> +struct dw_mci_dma_slave {
>> +	struct dma_chan *ch;
>> +	enum dma_transfer_direction direction;
>> +};
>> +
>>   /**
>>    * struct dw_mci - MMC controller state shared between all slots
>>    * @lock: Spinlock protecting the queue and associated data.
>> @@ -147,17 +159,23 @@ struct dw_mci {
>>
>>   	/* DMA interface members*/
>>   	int			use_dma;
>> +	int			trans_mode;
> you're introducing this new trans_mode, but we have "use_dma" already.
>
> So you could just define
>
> enum {
> 	TRANS_DMA_PIO = 0,
> 	TRANS_DMA_IDMAC,
> 	TRANS_DMA_EDMAC
> };
>
> and fill use_dma appropriately. "0" is meaning PIO already, which I also did fix
> up some days ago in "[PATCH] mmc: dw_mmc: fix pio mode when internal dmac is
> enabled" [0].
    I  agree.  "trans_mode" is redundant here since it does the same 
work as "use_dma" to some degree.
    Thanks.
>
> Heiko
>
> [0] https://lkml.org/lkml/2015/8/3/407
>
>
>


-- 
Shawn Lin

WARNING: multiple messages have this Message-ID (diff)
From: Shawn Lin <shawn.lin@rock-chips.com>
To: "Heiko Stübner" <heiko@sntech.de>
Cc: shawn.lin@rock-chips.com, Ulf Hansson <ulf.hansson@linaro.org>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Seungwon Jeon <tgih.jun@samsung.com>,
	dianders@chromium.org, linux-mips@linux-mips.org,
	Arnd Bergmann <arnd@arndb.de>,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	Alexey Brodkin <abrodkin@synopsys.com>,
	Stefan Agner <stefan@agner.ch>,
	Zhou Wang <wangzhou.bry@gmail.com>,
	Kumar Gala <galak@codeaurora.org>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Wang Long <long.wanglong@huawei.com>,
	Rob Herring <robh+dt@kernel.org>,
	Chaotian Jing <chaotian.jing@mediatek.com>,
	Lukasz Majewski <l.majewski@samsung.com>,
	Jun Nie <jun.nie@linaro.org>,
	Catalin Marinas <catalin.marinas@arm.com>, Kevin Hao <haokexin@>
Subject: Re: [RFC PATCH v3 1/5] mmc: dw_mmc: Add external dma interface support
Date: Wed, 5 Aug 2015 17:11:50 +0800	[thread overview]
Message-ID: <55C1D356.5030302@rock-chips.com> (raw)
In-Reply-To: <8177347.dLpRuMxaEU@diego>

在 2015/8/5 16:49, Heiko Stübner 写道:
> Am Mittwoch, 5. August 2015, 16:17:28 schrieb Shawn Lin:
>> DesignWare MMC Controller can supports 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 support these platforms. I've tested it on RK312x
>> platform with edmac mode and RK3288 platform with idmac mode.
>>
>> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
>>
>> ---
> [...]
>
>> diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
>> index 5be9767..6c1c7ea 100644
>> --- a/include/linux/mmc/dw_mmc.h
>> +++ b/include/linux/mmc/dw_mmc.h
>> @@ -16,6 +16,7 @@
>>
>>   #include <linux/scatterlist.h>
>>   #include <linux/mmc/core.h>
>> +#include <linux/dmaengine.h>
>>
>>   #define MAX_MCI_SLOTS	2
>>
>> @@ -40,6 +41,17 @@ enum {
>>
>>   struct mmc_data;
>>
>> +enum {
>> +	TRANS_MODE_PIO = 0,
>> +	TRANS_MODE_IDMAC,
>> +	TRANS_MODE_EDMAC
>> +};
>> +
>> +struct dw_mci_dma_slave {
>> +	struct dma_chan *ch;
>> +	enum dma_transfer_direction direction;
>> +};
>> +
>>   /**
>>    * struct dw_mci - MMC controller state shared between all slots
>>    * @lock: Spinlock protecting the queue and associated data.
>> @@ -147,17 +159,23 @@ struct dw_mci {
>>
>>   	/* DMA interface members*/
>>   	int			use_dma;
>> +	int			trans_mode;
> you're introducing this new trans_mode, but we have "use_dma" already.
>
> So you could just define
>
> enum {
> 	TRANS_DMA_PIO = 0,
> 	TRANS_DMA_IDMAC,
> 	TRANS_DMA_EDMAC
> };
>
> and fill use_dma appropriately. "0" is meaning PIO already, which I also did fix
> up some days ago in "[PATCH] mmc: dw_mmc: fix pio mode when internal dmac is
> enabled" [0].
    I  agree.  "trans_mode" is redundant here since it does the same 
work as "use_dma" to some degree.
    Thanks.
>
> Heiko
>
> [0] https://lkml.org/lkml/2015/8/3/407
>
>
>


-- 
Shawn Lin

  reply	other threads:[~2015-08-05  9:12 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-05  8:16 [RFC PATCH v3 0/5] Shawn Lin
2015-08-05  8:16 ` Shawn Lin
2015-08-05  8:17 ` [RFC PATCH v3 1/5] mmc: dw_mmc: Add external dma interface support Shawn Lin
2015-08-05  8:17   ` Shawn Lin
2015-08-05  8:49   ` Heiko Stübner
2015-08-05  8:49     ` Heiko Stübner
2015-08-05  9:11     ` Shawn Lin [this message]
2015-08-05  9:11       ` Shawn Lin
2015-08-06  2:27   ` Jaehoon Chung
2015-08-06  2:27     ` Jaehoon Chung
2015-08-06  3:35     ` Shawn Lin
2015-08-06  3:35       ` Shawn Lin
2015-08-05  8:17 ` [RFC PATCH v3 2/5] Documentation: synopsys-dw-mshc: add bindings for idmac and edmac Shawn Lin
2015-08-05  8:17   ` Shawn Lin
2015-08-05  8:27   ` Krzysztof Kozlowski
2015-08-05  8:27     ` Krzysztof Kozlowski
2015-08-05  8:43     ` Shawn Lin
2015-08-05  8:43       ` Shawn Lin
2015-08-05  8:45       ` Heiko Stübner
2015-08-05  8:45         ` Heiko Stübner
2015-08-05  8:56         ` Shawn Lin
2015-08-05  8:56           ` Shawn Lin
2015-08-06  2:16   ` Doug Anderson
2015-08-06  2:16     ` Doug Anderson
2015-08-06  2:20     ` Jaehoon Chung
2015-08-06  2:20       ` Jaehoon Chung
2015-08-06  3:13       ` Shawn Lin
2015-08-06  3:13         ` Shawn Lin
2015-08-05  8:18 ` [RFC PATCH v3 3/5] arm: configs: remove CONFIG_MMC_DW_IDMAC Shawn Lin
2015-08-05  8:18   ` Shawn Lin
2015-08-05  8:34   ` Vineet Gupta
2015-08-05  8:34     ` Vineet Gupta
2015-08-05  8:34     ` Vineet Gupta
2015-08-05  8:48     ` Shawn Lin
2015-08-05  8:48       ` Shawn Lin
2015-08-05  8:18 ` [RFC PATCH v3 4/5] mips: " Shawn Lin
2015-08-05  8:18   ` Shawn Lin
2015-08-05  8:18 ` [RFC PATCH v3 5/5] ARM: dts: add supports-idmac property Shawn Lin
2015-08-05  8:18   ` Shawn Lin
2015-08-05  8:52   ` Alexey Brodkin
2015-08-05  8:52     ` Alexey Brodkin
2015-08-05  8:52     ` Alexey Brodkin
2015-08-05  9:25     ` Shawn Lin
2015-08-05  9:25       ` Shawn Lin
2015-08-05 23:45 ` [RFC PATCH v3 0/5] Krzysztof Kozlowski
2015-08-05 23:45   ` Krzysztof Kozlowski
2015-08-06  0:45   ` Shawn Lin
2015-08-06  0:45     ` Shawn Lin
2015-08-06  1:47     ` Jaehoon Chung
2015-08-06  1:47       ` Jaehoon Chung

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=55C1D356.5030302@rock-chips.com \
    --to=shawn.lin@rock-chips.com \
    --cc=Weijun.Yang@csr.com \
    --cc=abrestic@chromium.org \
    --cc=abrodkin@synopsys.com \
    --cc=addy.ke@rock-chips.com \
    --cc=afaerber@suse.de \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=alim.akhtar@samsung.com \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=chaotian.jing@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=galak@codeaurora.org \
    --cc=geert+renesas@glider.be \
    --cc=govindraj.raja@imgtec.com \
    --cc=haokexin@gmail.com \
    --cc=heiko@sntech.de \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=javier.martinez@collabora.co.uk \
    --cc=jdelvare@suse.de \
    --cc=jh80.chung@samsung.com \
    --cc=jun.nie@linaro.org \
    --cc=k.kozlowski@samsung.com \
    --cc=kgene@kernel.org \
    --cc=khilman@linaro.org \
    --cc=l.majewski@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux.amoon@gmail.com \
    --cc=linux@arm.linux.org.uk \
    --cc=long.wanglong@huawei.com \
    --cc=manabian@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=mjonker@synopsys.com \
    --cc=olof@lixom.net \
    --cc=pawel.moll@arm.com \
    --cc=peter.griffin@linaro.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=ralf@linux-mips.org \
    --cc=rjui@broadcom.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=sbranden@broadcom.com \
    --cc=sjoerd.simons@collabora.co.uk \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=stefan@agner.ch \
    --cc=swarren@nvidia.com \
    --cc=tgih.jun@samsung.com \
    --cc=tomeu.vizoso@collabora.com \
    --cc=trblinux@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=ulf.hansson@linaro.org \
    --cc=vgupta@synopsys.com \
    --cc=vincent.yang.fujitsu@gmail.com \
    --cc=wangzhou.bry@gmail.com \
    --cc=will.deacon@arm.com \
    --cc=xuwei5@hisilicon.com \
    --cc=zhangfei.gao@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.