Re: [PATCH] mmc: dw_mmc: dw_mci_get_cd check MMC_CAP_NONREMOVABLE

2015-05-05 Thread zhangfei
On 05/06/2015 09:39 AM, Jaehoon Chung wrote: Hi, On 05/06/2015 10:33 AM, zhangfei wrote: On 05/06/2015 09:26 AM, Jaehoon Chung wrote: Hi, On 05/06/2015 10:14 AM, Zhangfei Gao wrote: On 6 May 2015 at 08:36, Jaehoon Chung jh80.ch...@samsung.com wrote: Hi, Zhangfei. If you want to check

[PATCH] mmc: dw_mmc: dw_mci_get_cd check MMC_CAP_NONREMOVABLE

2015-05-05 Thread Zhangfei Gao
When non-removable is used for emmc, MMC_CAP_NONREMOVABLE should also be checked, otherwise detection fail since present=0 Signed-off-by: Zhangfei Gao zhangfei@linaro.org --- drivers/mmc/host/dw_mmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host

Re: [PATCH v2] mmc: dw_mmc: fix dw_mci_get_cd

2014-01-16 Thread zhangfei
On 01/16/2014 06:50 PM, Arnd Bergmann wrote: On Thursday 16 January 2014, Zhangfei Gao wrote: --- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt +++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt @@ -73,6 +73,8 @@ Optional properties: * caps2-mmc-hs200-1_2v

[PATCH] mmc: dw_mmc: fix dw_mci_get_cd

2014-01-16 Thread Zhangfei Gao
-by: Zhangfei Gao zhangfei@linaro.org Reported-by: Kevin Hilman khil...@linaro.org Reviewed-by: Sachin Kamat sachin.ka...@linaro.org Tested-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/mmc/host/dw_mmc.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git

Re: [PATCH 1/1] mmc: dw_mmc: Fix card detection regression

2014-01-15 Thread zhangfei
Kamat sachin.ka...@linaro.org Cc: Zhangfei Gao zhangfei@linaro.org Cc: Jaehoon Chung jh80.ch...@samsung.com Cc: Arnd Bergmann a...@arndb.de --- Thanks for the patch I just submitted one patch to fix the issue, in case you missed it. Also spin_lock is required for atomic accessing

Re: [PATCH 1/1] mmc: dw_mmc: Fix card detection regression

2014-01-15 Thread zhangfei
On 01/15/2014 05:39 PM, Sachin Kamat wrote: Thanks for the patch I just submitted one patch to fix the issue, in case you missed it. Yes I did as I am not subscribed to mmc list. Also spin_lock is required for atomic accessing DW_MMC_CARD_PRESENT. Otherwise sd detect may be failed

[PATCH] mmc: dw_mmc: fix dw_mci_get_cd

2014-01-15 Thread Zhangfei Gao
-by: Zhangfei Gao zhangfei@linaro.org Reported-by: Kevin Hilman khil...@linaro.org Reviewed-by: Sachin Kamat sachin.ka...@linaro.org Tested-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/mmc/host/dw_mmc.c |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers

Re: [PATCH] mmc: dw_mmc: fix dw_mci_get_cd

2014-01-15 Thread zhangfei
On 01/15/2014 07:58 PM, Seungwon Jeon wrote: On Wed, January 15, 2014, Zhangfei Gao wrote: Introduced from commit bf626e5550f24aec24975a0e85ad8e572ca76a6b CDETECT is ignored since negated return value of mmc_gpio_get_cd(mmc) can not be checked by IS_ERR_VALUE. Add spin_lock_bh(host-lock

Re: [PATCH] mmc: dw_mmc: fix dw_mci_get_cd

2014-01-15 Thread zhangfei
On 01/15/2014 08:26 PM, Seungwon Jeon wrote: @@ -1033,7 +1033,8 @@ static int dw_mci_get_cd(struct mmc_host *mmc) int present; struct dw_mci_slot *slot = mmc_priv(mmc); struct dw_mci_board *brd = slot-host-pdata; - int gpio_cd = !mmc_gpio_get_cd(mmc); +

Re: [PATCH] mmc: dw_mmc: fix dw_mci_get_cd

2014-01-15 Thread zhangfei
On 01/15/2014 10:38 PM, Seungwon Jeon wrote: Hmm, looks you are right. Though not see clearly mmc_gpio_get_cd declaratoin, other drivers directly set get_cd as mmc_gpio_get_cd. .get_cd = mmc_gpio_get_cd However, in our board cd =0 when card is deteced while cd=1 when card is removed.

Re: [PATCH] mmc: dw_mmc: fix dw_mci_get_cd

2014-01-15 Thread zhangfei
On 01/15/2014 10:20 PM, Arnd Bergmann wrote: On Wednesday 15 January 2014 14:59:59 Arnd Bergmann wrote: On Wednesday 15 January 2014 21:56:26 zhangfei wrote: However, in our board cd =0 when card is deteced while cd=1 when card is removed. In order to mmc_gpio_get_cd return 1

[PATCH] mmc: dw_mmc: fix dw_mci_get_cd

2014-01-15 Thread Zhangfei Gao
-by: Zhangfei Gao zhangfei@linaro.org Reported-by: Kevin Hilman khil...@linaro.org Reviewed-by: Sachin Kamat sachin.ka...@linaro.org Tested-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/mmc/host/dw_mmc.c | 12 +--- include/linux/mmc/dw_mmc.h |1 + 2 files changed, 10

Re: [PATCH] mmc: dw_mmc: fix dw_mci_get_cd

2014-01-15 Thread zhangfei
On 01/16/2014 12:22 AM, Russell King - ARM Linux wrote: Well, having this in the gpio level as well as in subsystems like MMC is going to create confusion - and from the results of this patch _IS_ causing confusion. You've just encouraged one implementation to have things setup such that

Re: [PATCH 2/3] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2014-01-14 Thread zhangfei
Dear Seungwon On 01/14/2014 05:38 PM, Seungwon Jeon wrote: Looks like you dislike the clk_table very much :) Oh, I just want to remove dependency as I mentioned. Double checked with the silicon guy, currently it is said the limitation in HS200 and SDR104 can be replaced by the max_rate,

Re: [PATCH 1/2] clk: hisilicon: add hi3620_mmc_clks

2014-01-14 Thread Zhangfei Gao
+static long mmc_clk_determine_rate(struct clk_hw *hw, unsigned long rate, + unsigned long *best_parent_rate, + struct clk **best_parent_p) +{ + struct clk_mmc *mclk = to_mmc(hw); + unsigned long best = 0; + + if ((rate =

Re: [PATCH 1/2] clk: hisilicon: add hi3620_mmc_clks

2014-01-14 Thread zhangfei
On 01/14/2014 06:40 PM, Seungwon Jeon wrote: On Mon, January 13, 2014, Zhangfei Gao wrote: Suggest by Arnd: abstract mmc tuning as clock behavior, also because different soc have different tuning method and registers. hi3620_mmc_clks is added to handle mmc clock specifically on hi3620

Re: [PATCH 1/3] mmc: dw_mmc: use slot-gpio to handle cd pin

2014-01-14 Thread zhangfei
On 01/15/2014 01:23 AM, Olof Johansson wrote: On Tue, Jan 14, 2014 at 7:58 AM, Kevin Hilman khil...@linaro.org wrote: On Thu, Jan 9, 2014 at 6:35 AM, Zhangfei Gao zhangfei@linaro.org wrote: Suggested by Jaehoon: Use slot-gpio to handle cd-gpio Add function dw_mci_of_get_cd_gpio to check

Re: [PATCH 1/2] clk: hisilicon: add hi3620_mmc_clks

2014-01-14 Thread zhangfei
Dear Mike On 01/15/2014 04:17 AM, Mike Turquette wrote: Quoting Zhangfei Gao (2014-01-13 01:14:28) Suggest by Arnd: abstract mmc tuning as clock behavior, also because different soc have different tuning method and registers. hi3620_mmc_clks is added to handle mmc clock specifically on hi3620

Re: [PATCH 1/3] mmc: dw_mmc: use slot-gpio to handle cd pin

2014-01-14 Thread zhangfei
Dear Kevin On 01/15/2014 09:09 AM, zhangfei wrote: On 01/15/2014 01:23 AM, Olof Johansson wrote: On Tue, Jan 14, 2014 at 7:58 AM, Kevin Hilman khil...@linaro.org wrote: On Thu, Jan 9, 2014 at 6:35 AM, Zhangfei Gao zhangfei@linaro.org wrote: Suggested by Jaehoon: Use slot-gpio to handle

[PATCH] mmc: dw_mmc: fix dw_mci_get_cd

2014-01-14 Thread Zhangfei Gao
Introdeced from commit b7db86adfa58b CDETECT is ingored since IS_ERR_VALUE(!mmc_gpio_get_cd(mmc)) does not work Add spin_lock_bh(host-lock) for atomic accessing DW_MMC_CARD_PRESENT Signed-off-by: Zhangfei Gao zhangfei@linaro.org Reported-by: Kevin Hilman khil...@linaro.org --- drivers/mmc

Re: [PATCH] mmc: dw_mmc: fix dw_mci_get_cd

2014-01-14 Thread zhangfei
Hi Kevin Would you mind check whehter this patch solve the issue of The Samsung Arndale board started failing boot from MMC. I am sorry about that. On 01/15/2014 03:15 PM, Zhangfei Gao wrote: Introdeced from commit b7db86adfa58b commit should be bf626e5550f24aec24975a0e85ad8e572ca76a6b

Re: [PATCH 2/3] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2014-01-13 Thread zhangfei
Dear Seungwon On 01/13/2014 01:32 PM, Seungwon Jeon wrote: +static void dw_mci_k3_set_ios(struct dw_mci *host, struct mmc_ios *ios) +{ +struct dw_mci_k3_priv_data *priv = host-priv; +u32 rate = priv-clk_table[ios-timing]; The function mmc_clk_determine_rate() will need the

[PATCH 1/2] clk: hisilicon: add hi3620_mmc_clks

2014-01-13 Thread Zhangfei Gao
Suggest by Arnd: abstract mmc tuning as clock behavior, also because different soc have different tuning method and registers. hi3620_mmc_clks is added to handle mmc clock specifically on hi3620. Signed-off-by: Zhangfei Gao zhangfei@linaro.org Acked-by: Arnd Bergmann a...@arndb.de Acked

[PATCH 2/2] mmc: dw_mmc: k3: remove clk_table

2014-01-13 Thread Zhangfei Gao
Remove clk_table and directly use ios-clock as clock source rate. Abstract init clock rate and max clock limitation in clk.c Signed-off-by: Zhangfei Gao zhangfei@linaro.org --- .../devicetree/bindings/mmc/k3-dw-mshc.txt | 14 --- drivers/mmc/host/dw_mmc-k3.c

[PATCH 0/2] mmc: dw_mmc: k3 remove clk_table

2014-01-13 Thread Zhangfei Gao
clk_table is used to set clock source in each mode, as well as limitation, max_rate and init rate. It concerned many experts though, and Seungwon recommended some limitation can be hide in clk.c. Also soc is updated as the limitation now same as max_rate, so directly using ios-clock. Zhangfei

[PATCH] clk: hisilicon: add hi3620_mmc_clks

2014-01-13 Thread Zhangfei Gao
Suggest by Arnd: abstract mmc tuning as clock behavior, also because different soc have different tuning method and registers. hi3620_mmc_clks is added to handle mmc clock specifically on hi3620. Signed-off-by: Zhangfei Gao zhangfei@linaro.org Acked-by: Arnd Bergmann a...@arndb.de Acked

Re: [PATCH -next] mmc: dw_mmc: fix sparse non static symbol warning

2014-01-13 Thread zhangfei
On 01/14/2014 10:03 AM, Wei Yongjun wrote: From: Wei Yongjun yongjun_...@trendmicro.com.cn Fixes the following sparse warning: drivers/mmc/host/dw_mmc-k3.c:116:1: warning: symbol 'dw_mci_k3_pmops' was not declared. Should it be static? Thanks for catching up, my mistake. -- To

Re: [PATCH v7 0/3] mmc: dw_mmc: add dw_mmc-k3

2014-01-12 Thread Zhangfei Gao
On Mon, Jan 13, 2014 at 12:35 AM, Chris Ball ch...@printf.net wrote: Hi, I've pushed patches 1 and 2 to mmc-next for 3.14, with Arnd and Jaehoon's ACK -- since patch 3 depends on files that aren't in my tree, please can you push that one through arm-soc? Great, thanks Chris. The 3rd patch

Re: [PATCH 2/3] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2014-01-12 Thread zhangfei
On 01/13/2014 10:09 AM, Seungwon Jeon wrote: On Fri, January 10, 2014, Zhangfei Gao wrote: On 01/10/2014 09:39 PM, Seungwon Jeon wrote: +static void dw_mci_k3_set_ios(struct dw_mci *host, struct mmc_ios *ios) +{ + struct dw_mci_k3_priv_data *priv = host-priv; + u32 rate = priv-clk_table

[PATCH v7 0/3] mmc: dw_mmc: add dw_mmc-k3

2014-01-09 Thread Zhangfei Gao
Zhangfei Gao (3): mmc: dw_mmc: use slot-gpio to handle cd pin mmc: dw_mmc: add dw_mmc-k3 for k3 platform clk: hisilicon: add hi3620_mmc_clks .../bindings/arm/hisilicon/hisilicon.txt | 14 ++ .../devicetree/bindings/clock/hi3620-clock.txt |1 + .../devicetree/bindings/mmc/k3-dw

[PATCH 2/3] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2014-01-09 Thread Zhangfei Gao
Add dw_mmc-k3.c for k3v2, support sd/emmc Signed-off-by: Zhangfei Gao zhangfei@linaro.org Signed-off-by: Zhigang Wang brooke.wangzhig...@huawei.com --- .../devicetree/bindings/mmc/k3-dw-mshc.txt | 60 + drivers/mmc/host/Kconfig | 10 ++ drivers

[PATCH 3/3] clk: hisilicon: add hi3620_mmc_clks

2014-01-09 Thread Zhangfei Gao
Suggest by Arnd: abstract mmc tuning as clock behavior, also because different soc have different tuning method and registers. hi3620_mmc_clks is added to handle mmc clock specifically on hi3620. Signed-off-by: Zhangfei Gao zhangfei@linaro.org --- .../bindings/arm/hisilicon/hisilicon.txt

Re: [PATCH 2/3] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2014-01-01 Thread zhangfei
On 12/31/2013 09:20 PM, Gerhard Sittig wrote: On Sun, Dec 29, 2013 at 22:05 +0100, Arnd Bergmann wrote: On Saturday 28 December 2013, Zhangfei Gao wrote: +static void dw_mci_k3_set_ios(struct dw_mci *host, struct mmc_ios *ios) +{ + struct dw_mci_k3_priv_data *priv = host-priv

[PATCH 2/3] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2014-01-01 Thread Zhangfei Gao
Add dw_mmc-k3.c for k3v2, support sd/emmc Signed-off-by: Zhangfei Gao zhangfei@linaro.org Signed-off-by: Zhigang Wang brooke.wangzhig...@huawei.com --- .../devicetree/bindings/mmc/k3-dw-mshc.txt | 60 + drivers/mmc/host/Kconfig | 10 ++ drivers

Re: [PATCH 2/3] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-12-30 Thread zhangfei
On 12/30/2013 10:32 AM, Zhangfei Gao wrote: On Mon, Dec 30, 2013 at 7:55 AM, Jaehoon Chung jh80.ch...@samsung.com wrote: On 12/30/2013 06:05 AM, Arnd Bergmann wrote: On Saturday 28 December 2013, Zhangfei Gao wrote: Add dw_mmc-k3.c for k3v2, support sd/emmc Signed-off-by: Zhangfei Gao

Re: [PATCH 2/3] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-12-30 Thread zhangfei
Dear Arnd, On 12/31/2013 04:27 AM, Arnd Bergmann wrote: On Monday 30 December 2013, zhangfei wrote: +static int dw_mci_k3_suspend(struct device *dev) +{ +struct dw_mci *host = dev_get_drvdata(dev); +int ret = 0; + +ret = dw_mci_suspend(host); You should never initialize local

Re: [PATCH 2/3] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-12-29 Thread Zhangfei Gao
On Mon, Dec 30, 2013 at 7:55 AM, Jaehoon Chung jh80.ch...@samsung.com wrote: On 12/30/2013 06:05 AM, Arnd Bergmann wrote: On Saturday 28 December 2013, Zhangfei Gao wrote: Add dw_mmc-k3.c for k3v2, support sd/emmc Signed-off-by: Zhangfei Gao zhangfei@linaro.org Signed-off-by: Zhigang

[PATCH v6 0/3] mmc: dw_mmc: add dw_mmc-k3

2013-12-28 Thread Zhangfei Gao
sending cmd 0002: Follow suggestion from Chris, Kumar and Seungwon Sync to latest mmc-next, which is 3.12-rc2 Remove enum dw_mci_k3_type etc v2: Follow Jaehoon's suggestion Use slot-gpio.c handle cd pin Move table out to dts other suggestion Zhangfei Gao (3): mmc: dw_mmc: use slot-gpio to handle cd

[PATCH 2/3] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-12-28 Thread Zhangfei Gao
Add dw_mmc-k3.c for k3v2, support sd/emmc Signed-off-by: Zhangfei Gao zhangfei@linaro.org Signed-off-by: Zhigang Wang brooke.wangzhig...@huawei.com --- .../devicetree/bindings/mmc/k3-dw-mshc.txt | 60 ++ drivers/mmc/host/Kconfig | 10 ++ drivers

[PATCH 3/3] clk: hisilicon: add hi3620_mmc_clks

2013-12-28 Thread Zhangfei Gao
Suggest by Arnd: abstract mmc tuning as clock behavior, also because different soc have different tuning method and registers. hi3620_mmc_clks is added to handle mmc clock specifically on hi3620. Signed-off-by: Zhangfei Gao zhangfei@linaro.org --- .../bindings/arm/hisilicon/hisilicon.txt

[PATCH 1/3] mmc: dw_mmc: use slot-gpio to handle cd pin

2013-12-28 Thread Zhangfei Gao
Suggested by Jaehoon: Use slot-gpio to handle cd-gpio Add function dw_mci_of_get_cd_gpio to check cd-gpios from dts. mmc_gpio_request_cd and mmc_gpio_get_cd are used to handle cd pin Signed-off-by: Zhangfei Gao zhangfei@linaro.org Acked-by: Jaehoon Chung jh80.ch...@samsung.com --- drivers

Re: [PATCH 2/3] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-12-26 Thread zhangfei
Dear Jaehoon Thanks for the reviewing. On 12/26/2013 12:33 PM, Jaehoon Chung wrote: +config MMC_DW_K3 + tristate K3 specific extensions for Synopsys DW Memory Card Interface + depends on MMC_DW + select MMC_DW_PLTFM + select MMC_DW_IDMAC Only use the IDMAC? IDMAC

Re: [PATCH 2/3] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-12-19 Thread zhangfei
On 12/16/2013 09:12 PM, Zhangfei Gao wrote: Add dw_mmc-k3.c for k3v2, support sd/emmc Signed-off-by: Zhangfei Gao zhangfei@linaro.org Signed-off-by: Zhigang Wang brooke.wangzhig...@huawei.com --- .../devicetree/bindings/mmc/k3-dw-mshc.txt | 60 + drivers/mmc/host

Re: [PATCHv4] mmc: dw_mmc: Enable the hold reg for certain speed modes

2013-12-17 Thread zhangfei
On 12/17/2013 01:01 AM, dingu...@altera.com wrote: From: Dinh Nguyen dingu...@altera.com This patch will enable the SDMMC_CMD_USE_HOLD_REG bit when the slot is operating all timing modes, except for SDR50, DDR50, SDR104, and MMC_HS200. According to the Synopsys databook :To meet the

Re: [RESEND LIST PATCHv7 1/4] clk: socfpga: Add a clk-phase property to the altr,socfpga-gate-clk

2013-12-17 Thread zhangfei
On 12/17/2013 09:44 PM, Dinh Nguyen wrote: Hi Zhangfei, On 12/17/13 1:46 AM, zhangfei wrote: On 12/17/2013 01:04 AM, dingu...@altera.com wrote: From: Dinh Nguyen dingu...@altera.com +static int socfpga_clk_prepare(struct clk_hw *hwclk) +{ +struct socfpga_clk *socfpgaclk

Re: [PATCHv4] mmc: dw_mmc: Enable the hold reg for certain speed modes

2013-12-17 Thread zhangfei
On 12/17/2013 10:03 PM, Dinh Nguyen wrote: Hi Zhangfei, On 12/17/13 2:11 AM, zhangfei wrote: On 12/17/2013 01:01 AM, dingu...@altera.com wrote: From: Dinh Nguyen dingu...@altera.com This patch will enable the SDMMC_CMD_USE_HOLD_REG bit when the slot is operating all timing modes, except

Re: [PATCH 2/3] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-12-16 Thread zhangfei
On 12/16/2013 03:29 PM, Seungwon Jeon wrote: On Mon, December 16, 2013, Zhangfei Gao wrote: Dear Seungwon On 12/16/2013 11:50 AM, Seungwon Jeon wrote: On Sat, December 14, 2013, Zhangfei Gao wrote: + /* SoC portion */ + dwmmc_0: dwmmc0@fcd03000 { + compatible = hisilicon

Re: [PATCH 2/3] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-12-16 Thread zhangfei
On 12/16/2013 05:18 PM, Seungwon Jeon wrote: On Mon, December 16, 2013, Zhangfei Gao wrote: On 12/16/2013 03:29 PM, Seungwon Jeon wrote: On Mon, December 16, 2013, Zhangfei Gao wrote: Dear Seungwon On 12/16/2013 11:50 AM, Seungwon Jeon wrote: On Sat, December 14, 2013, Zhangfei Gao wrote

[PATCH 2/3] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-12-16 Thread Zhangfei Gao
Add dw_mmc-k3.c for k3v2, support sd/emmc Signed-off-by: Zhangfei Gao zhangfei@linaro.org Signed-off-by: Zhigang Wang brooke.wangzhig...@huawei.com --- .../devicetree/bindings/mmc/k3-dw-mshc.txt | 60 + drivers/mmc/host/Kconfig | 10 ++ drivers

Re: [RESEND LIST PATCHv7 1/4] clk: socfpga: Add a clk-phase property to the altr,socfpga-gate-clk

2013-12-16 Thread zhangfei
On 12/17/2013 01:04 AM, dingu...@altera.com wrote: From: Dinh Nguyen dingu...@altera.com +static int socfpga_clk_prepare(struct clk_hw *hwclk) +{ + struct socfpga_clk *socfpgaclk = to_socfpga_clk(hwclk); + struct regmap *sys_mgr_base_addr; + u32 hs_timing; + + if

Re: [PATCHv6 1/5] mmc: dw_mmc: Add support to set the SDR and DDR timing through clock framework

2013-12-15 Thread Zhangfei Gao
On 16 December 2013 11:24, Dinh Nguyen dinh.li...@gmail.com wrote: @@ -2478,6 +2480,27 @@ int dw_mci_probe(struct dw_mci *host) dev_dbg(host-dev, ciu clock not available\n); host-bus_hz = host-pdata-bus_hz; } else { +/* If the CIU clk is available, we

Re: [PATCH 2/3] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-12-15 Thread zhangfei
Dear Seungwon On 12/16/2013 11:50 AM, Seungwon Jeon wrote: On Sat, December 14, 2013, Zhangfei Gao wrote: +/* SoC portion */ +dwmmc_0: dwmmc0@fcd03000 { +compatible = hisilicon,hi4511-dw-mshc; +reg = 0xfcd03000 0x1000; +interrupts = 0 16 4

Re: [PATCHv6 1/5] mmc: dw_mmc: Add support to set the SDR and DDR timing through clock framework

2013-12-14 Thread zhangfei
; /* Single data rate timing setting. */ + u32 ddr_timing; /* Double data rate timing setting. */ Are they fixed or not? Thanks Zhangfei -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [PATCHv6 2/5] clk: socfpga: Add a clock type for the SD/MMC driver

2013-12-14 Thread zhangfei
like to get buy-in from Zhangfei Gao, since he is working on the same thing. Please coordinate with him to make sure whatever one of you comes up with works for the other one too. At the moment, patches are flying so fast without much discussion inbetween that I'd prefer Chris to hold off from merging

Re: [PATCHv6 1/5] mmc: dw_mmc: Add support to set the SDR and DDR timing through clock framework

2013-12-14 Thread zhangfei
On 12/15/2013 11:16 AM, Dinh Nguyen wrote: Hi Zhangfei, @@ -2478,6 +2480,27 @@ int dw_mci_probe(struct dw_mci *host) dev_dbg(host-dev, ciu clock not available\n); host-bus_hz = host-pdata-bus_hz; } else { +/* If the CIU clk is available, we check for SDR

[PATCH 3/3] clk: hisilicon: add hi3620_mmc_clks

2013-12-13 Thread Zhangfei Gao
Suggest by Arnd: abstract mmc tuning as clock behavior, also because different soc have different tuning method and registers. hi3620_mmc_clks is added to handle mmc clock specifically on hi3620. Signed-off-by: Zhangfei Gao zhangfei@linaro.org --- .../bindings/arm/hisilicon/hisilicon.txt

[PATCH v5 0/3] mmc: dw_mmc: add dw_mmc-k3

2013-12-13 Thread Zhangfei Gao
slot-gpio.c handle cd pin Move table out to dts other suggestion Zhangfei Gao (3): mmc: dw_mmc: use slot-gpio to handle cd pin mmc: dw_mmc: add dw_mmc-k3 for k3 platform clk: hisilicon: add hi3620_mmc_clks .../bindings/arm/hisilicon/hisilicon.txt | 14 ++ .../devicetree/bindings

[PATCH 1/3] mmc: dw_mmc: use slot-gpio to handle cd pin

2013-12-13 Thread Zhangfei Gao
Suggested by Jaehoon: Use slot-gpio to handle cd-gpio Add function dw_mci_of_get_cd_gpio to check cd-gpios from dts. mmc_gpio_request_cd and mmc_gpio_get_cd are used to handle cd pin Signed-off-by: Zhangfei Gao zhangfei@linaro.org Acked-by: Jaehoon Chung jh80.ch...@samsung.com --- drivers

[PATCH 2/3] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-12-13 Thread Zhangfei Gao
Add dw_mmc-k3.c for k3v2, support sd/emmc Signed-off-by: Zhangfei Gao zhangfei@linaro.org Signed-off-by: Zhigang Wang brooke.wangzhig...@huawei.com --- .../devicetree/bindings/mmc/k3-dw-mshc.txt | 60 + drivers/mmc/host/Kconfig | 10 ++ drivers

Re: [PATCH 2/3] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-12-12 Thread zhangfei
Dear Arnd On 12/12/2013 04:12 AM, Arnd Bergmann wrote: On Wednesday 11 December 2013, zhangfei wrote: I have not seen clk-table and clk-table-num before. Are these standard properties? What are the units that are used here, what does the index mean? clk-table and clk-table-num are private

[PATCH 2/3] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-12-12 Thread Zhangfei Gao
Add dw_mmc-k3.c for k3v2, support sd/emmc Signed-off-by: Zhangfei Gao zhangfei@linaro.org Signed-off-by: Zhigang Wang brooke.wangzhig...@huawei.com --- .../devicetree/bindings/mmc/k3-dw-mshc.txt | 59 + drivers/mmc/host/Kconfig | 10 ++ drivers

Re: [PATCH 2/3] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-12-12 Thread zhangfei
On 12/13/2013 04:40 AM, Arnd Bergmann wrote: On Thursday 12 December 2013, zhangfei wrote: On 12/12/2013 04:12 AM, Arnd Bergmann wrote: On Wednesday 11 December 2013, zhangfei wrote: But aren't the times fixed for each mode? Why do you need to specify them in the DT? I would expect

[PATCH 3/3] clk: hisilicon: add hi3620_mmc_clks

2013-12-11 Thread Zhangfei Gao
hi3620_mmc_clks is added to handle mmc clock specifically on hi3620 Signed-off-by: Zhangfei Gao zhangfei@linaro.org --- .../bindings/arm/hisilicon/hisilicon.txt | 14 ++ .../devicetree/bindings/clock/hi3620-clock.txt |1 + drivers/clk/hisilicon/clk-hi3620.c

[PATCH v4 0/3] mmc: dw_mmc: add dw_mmc-k3

2013-12-11 Thread Zhangfei Gao
before sending cmd 0002: Follow suggestion from Chris, Kumar and Seungwon Sync to latest mmc-next, which is 3.12-rc2 Remove enum dw_mci_k3_type etc v2: Follow Jaehoon's suggestion Use slot-gpio.c handle cd pin Move table out to dts other suggestion Zhangfei Gao (3): mmc: dw_mmc: use slot-gpio

[PATCH 1/3] mmc: dw_mmc: use slot-gpio to handle cd pin

2013-12-11 Thread Zhangfei Gao
Suggested by Jaehoon: Use slot-gpio to handle cd-gpio Add function dw_mci_of_get_cd_gpio to check cd-gpios from dts. mmc_gpio_request_cd and mmc_gpio_get_cd are used to handle cd pin Signed-off-by: Zhangfei Gao zhangfei@linaro.org Acked-by: Jaehoon Chung jh80.ch...@samsung.com --- drivers

[PATCH 2/3] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-12-11 Thread Zhangfei Gao
Add dw_mmc-k3.c for k3v2, support sd/emmc Signed-off-by: Zhangfei Gao zhangfei@linaro.org Tested-by: Zhigang Wang brooke.wangzhig...@huawei.com --- .../devicetree/bindings/mmc/k3-dw-mshc.txt | 51 drivers/mmc/host/Kconfig | 10 ++ drivers/mmc

Re: [PATCH 2/3] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-12-11 Thread zhangfei
On 12/11/2013 10:49 PM, Arnd Bergmann wrote: On Wednesday 11 December 2013, Zhangfei Gao wrote: +Required Properties: + +* compatible: should be one of the following. + - hisilicon,hi4511-dw-mshc: for controllers with hi4511 specific extentions. +* clk-table-num: should be number of clks

Re: [PATCH 3/3] clk: hisilicon: add hi3620_mmc_clks

2013-12-11 Thread zhangfei
On 12/11/2013 10:44 PM, Arnd Bergmann wrote: On Wednesday 11 December 2013, Zhangfei Gao wrote: +PCTRL: Peripheral misc control register + +Required Properties: +- compatible: hisilicon,pctrl +- reg: Address and size of pctrl. + +Example: + + /* for Hi3620 */ + pctrl: pctrl

Re: [PATCH 2/2] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-12-10 Thread Zhangfei Gao
Dear Arnd On Fri, Dec 6, 2013 at 9:39 AM, Arnd Bergmann a...@arndb.de wrote: On Friday 08 November 2013, Zhangfei Gao wrote: Add dw_mmc-k3.c for k3v2, support sd/emmc Signed-off-by: Zhangfei Gao zhangfei@linaro.org Tested-by: Zhigang Wang brooke.wangzhig...@huawei.com We are currently

Re: [PATCH 2/2] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-12-10 Thread Zhangfei Gao
Dear Seungwon On Thu, Dec 5, 2013 at 10:00 PM, Seungwon Jeon tgih@samsung.com wrote: +static DEFINE_SPINLOCK(mmc_tuning_lock); Can the above variables be involved in dw_mci_k3_priv_data instead of global declaration? Unfortunately, this can be be put in priv_data, which is different

Re: [PATCH 2/2] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-12-10 Thread Zhangfei Gao
Dear Rob On Thu, Dec 5, 2013 at 10:29 PM, Rob Herring robherri...@gmail.com wrote: On Thu, Nov 7, 2013 at 11:38 PM, Zhangfei Gao zhangfei@linaro.org wrote: +++ b/Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt @@ -0,0 +1,83 @@ +* Hisilicon specific extensions to the Synopsys

[PATCH 1/2] mmc: dw_mmc: add dw_mci_of_get_cd_gpio to handle cd pin

2013-12-02 Thread Zhangfei Gao
Change function dw_mci_of_get_cd_gpio type to void suggested by Jaehoon And check any other comments Thanks Add function dw_mci_of_get_cd_gpio to check cd-gpios from dts. mmc_gpio_request_cd and mmc_gpio_get_cd are used to handle cd pin Signed-off-by: Zhangfei Gao zhangfei@linaro.org CC

[PATCH 1/2] mmc: dw_mmc: add dw_mci_of_get_cd_gpio to handle cd pin

2013-11-07 Thread Zhangfei Gao
Add function dw_mci_of_get_cd_gpio to check cd-gpios from dts. mmc_gpio_request_cd and mmc_gpio_get_cd are used to handle cd pin Signed-off-by: Zhangfei Gao zhangfei@linaro.org CC: Jaehoon Chung jh80.ch...@samsung.com --- drivers/mmc/host/dw_mmc.c | 52

[PATCH v3 0/2] mmc: dw_mmc: add dw_mmc-k3

2013-11-07 Thread Zhangfei Gao
suggestion Use slot-gpio.c handle cd pin Move table out to dts other suggestion Zhangfei Gao (2): mmc: dw_mmc: add dw_mci_of_get_cd_gpio to handle cd pin mmc: dw_mmc: add dw_mmc-k3 for k3 platform .../devicetree/bindings/mmc/k3-dw-mshc.txt | 83 +++ drivers/mmc/host/Kconfig

[PATCH 2/2] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-11-07 Thread Zhangfei Gao
Add dw_mmc-k3.c for k3v2, support sd/emmc Signed-off-by: Zhangfei Gao zhangfei@linaro.org Tested-by: Zhigang Wang brooke.wangzhig...@huawei.com --- .../devicetree/bindings/mmc/k3-dw-mshc.txt | 83 +++ drivers/mmc/host/Kconfig | 10 + drivers/mmc/host

Re: [PATCH 2/2] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-11-01 Thread zhangfei gao
Dear Seungwon Thanks for giving suggestion. On Thu, Oct 31, 2013 at 11:24 PM, Seungwon Jeon tgih@samsung.com wrote: Hi Zhangfei, +static void dw_mci_k3_set_ios(struct dw_mci *host, struct mmc_ios *ios) +{ + struct dw_mci_k3_priv_data *priv = host-priv; + + if (priv-type

Re: [PATCH 2/2] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-11-01 Thread zhangfei gao
On Fri, Nov 1, 2013 at 1:21 AM, Seungwon Jeon tgih@samsung.com wrote: On Fri, November 01, 2013, zhangfei gao wrote: Dear Seungwon Thanks for giving suggestion. On Thu, Oct 31, 2013 at 11:24 PM, Seungwon Jeon tgih@samsung.com wrote: Hi Zhangfei, +static void dw_mci_k3_set_ios

Re: [PATCH 2/2] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-10-29 Thread zhangfei gao
Dear Kumar Thanks for the careful review. On Sun, Oct 27, 2013 at 11:29 PM, Kumar Gala ga...@codeaurora.org wrote: On Oct 23, 2013, at 8:03 AM, Zhangfei Gao wrote: +Required Properties: + +* compatible: should be + - hisilicon,hi4511-dw-mshc: for controllers with hi4511

[PATCH 2/2] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-10-23 Thread Zhangfei Gao
update: fix typo Add dw_mmc-k3.c for k3v2, support sd/emmc Signed-off-by: Zhangfei Gao zhangfei@linaro.org Tested-by: Zhigang Wang brooke.wangzhig...@huawei.com --- .../devicetree/bindings/mmc/k3-dw-mshc.txt | 77 + drivers/mmc/host/Kconfig | 10

[PATCH 1/2] mmc: dw_mmc: add dw_mci_of_get_cd_gpio to handle cd pin

2013-10-21 Thread Zhangfei Gao
Add function dw_mci_of_get_cd_gpio to check cd-gpios from dts. mmc_gpio_request_cd and mmc_gpio_get_cd are used to handle cd pin Signed-off-by: Zhangfei Gao zhangfei@linaro.org CC: Jaehoon Chung jh80.ch...@samsung.com --- drivers/mmc/host/dw_mmc.c | 34 ++ 1

[v2 PATCH 0/2] mmc: dw_mmc: add dw_mmc-k3

2013-10-21 Thread Zhangfei Gao
v2: Follow Jaehoon's suggestion Use slot-gpio.c handle cd pin Move table out to dts other suggestion Zhangfei Gao (2): mmc: dw_mmc: add dw_mci_of_get_cd_gpio to handle cd pin mmc: dw_mmc: add dw_mmc-k3 for k3 platform .../devicetree/bindings/mmc/k3-dw-mshc.txt | 77 + drivers

[PATCH 2/2] mmc: dw_mmc: add dw_mmc-k3 for k3 platform

2013-10-21 Thread Zhangfei Gao
Add dw_mmc-k3.c for k3v2, support sd/emmc Signed-off-by: Zhangfei Gao zhangfei@linaro.org Tested-by: Zhigang Wang brooke.wangzhig...@huawei.com --- .../devicetree/bindings/mmc/k3-dw-mshc.txt | 77 + drivers/mmc/host/Kconfig | 10 + drivers/mmc/host

Re: [PATCH 2/2] mmc: add dw-mmc-k3

2013-10-18 Thread zhangfei gao
the DRIVER_NAME. OK Thanks Zhangfei -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 1/2] mmc: dw_mmc: change definition of get_cd

2013-10-10 Thread Zhangfei Gao
int (*get_cd)(struct dw_mci *host, u32 slot_id) Add host info to pass priv, where contains cd pin Signed-off-by: Zhangfei Gao zhangfei@linaro.org --- drivers/mmc/host/dw_mmc.c |2 +- include/linux/mmc/dw_mmc.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH V3 3/4] mmc: block: Enable runtime pm for mmc blkdevice

2013-05-28 Thread zhangfei gao
Maybe I make misunderstood, or do some mistake. since CONFIG_MMC_UNSAFE_RESUME has to be set, is that mean sd card can not be unpluged with the feature enabled. It can be reproduced here if unplug card in suspend or not. static void mmc_sd_detect(struct mmc_host *host) { err =

Re: [PATCH V4 1/4] mmc: core: Stop bkops for eMMC only from mmc suspend

2013-05-25 Thread zhangfei gao
On Thu, May 2, 2013 at 8:02 PM, Ulf Hansson ulf.hans...@stericsson.com wrote: From: Ulf Hansson ulf.hans...@linaro.org Move mmc suspend specific operations to be executed from the .suspend callback in the mmc bus_ops. This simplifies the mmc_suspend_host function which is supposed to handle

Re: [PATCH v5 07/13] mmc: sdhci-pxav3: controller can't get base clock

2012-09-29 Thread zhangfei gao
-by: Kevin Liu kl...@marvell.com Acked-by: Zhangfei Gao zhangfei@marvell.com -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v5 10/13] mmc: sdhci-pxav3: add quirks2

2012-09-29 Thread zhangfei gao
On Fri, Sep 28, 2012 at 3:56 PM, Kevin Liu keyuan@gmail.com wrote: From: Kevin Liu kl...@marvell.com Signed-off-by: Kevin Liu kl...@marvell.com Acked-by: Zhangfei Gao zhangfei@marvell.com --- drivers/mmc/host/sdhci-pxav3.c |2 ++ include/linux/platform_data

Re: [PATCH v5 13/13] mmc: sdhci-pxav3: remove set_uhs_signaling function

2012-09-29 Thread zhangfei gao
On Fri, Sep 28, 2012 at 3:56 PM, Kevin Liu keyuan@gmail.com wrote: From: Kevin Liu kl...@marvell.com Because sdhci can do the same thing so no need to implement this. Signed-off-by: Kevin Liu kl...@marvell.com Acked-by: Zhangfei Gao zhangfei@marvell.com If so, (*set_uhs_signaling

Re: [PATCH v4 04/15] mmc: sdhci: keep the saved clock var up to date

2012-09-27 Thread zhangfei gao
. If so, how about directly correct ios-clock, and remove actual_clock at all? /Zhangfei -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v4 06/15] mmc: sdhci-pxav3: controller can't get base clock

2012-09-27 Thread zhangfei gao
On Wed, Sep 26, 2012 at 7:38 PM, Kevin Liu keyuan@gmail.com wrote: From: Kevin Liu kl...@marvell.com Enable the quirk SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN since SD_CAPABILITIES_1[15:8](BASE_FREQ) can't get correct base clock value. It return a fixed pre-set value like 200 on some

Re: [PATCH v4 11/15] mmc: sdhci-pxav3: add signal_voltage_switch function

2012-09-27 Thread zhangfei gao
such way. /Zhangfei -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v4 09/15] mmc: sdhci-pxav3: add quirks2

2012-09-27 Thread zhangfei gao
diff --git a/include/linux/platform_data/pxa_sdhci.h b/include/linux/platform_data/pxa_sdhci.h index 59acd98..fdf38d6 100644 --- a/include/linux/platform_data/pxa_sdhci.h +++ b/include/linux/platform_data/pxa_sdhci.h @@ -38,6 +38,7 @@ * @max_speed: the maximum speed supported *

Re: [PATCH v4 01/15] mmc: sdhci: fix transfer mode setting bug for cmds w/o data transfer

2012-09-26 Thread zhangfei gao
cmd18/cmd25 will have timeout error since audo cmd23 has been enabled. Signed-off-by: Jialing Fu j...@marvell.com Signed-off-by: Tim Wang wan...@marvell.com Signed-off-by: Kevin Liu kl...@marvell.com --- Reviewed-by: Zhangfei Gao zhangfei@marvell.com -- To unsubscribe from this list: send

Re: [PATCH] mmc: sdhci-pxav3: Use sdhci_get_of_property for parsing DT quirks

2012-09-19 Thread zhangfei gao
a better idea to discard that patch and use this one instead.) Thanks Chris, it's really better. Acked-by: Zhangfei Gao zhangfei@marvell.com -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [PATCH] mmc: sdhci-pxav3: dt: Support power-gpios property

2012-09-10 Thread zhangfei gao
On Sun, Sep 9, 2012 at 11:06 AM, Chris Ball c...@laptop.org wrote: Tested on OLPC XO-4/MMP3, where the card power for two of the controllers is a sideband GPIO. The third cell in the power-gpios property controls whether the GPIO is active high/active low. (Also, pass host_caps2 through from

Re: [PATCH] mmc: sdhci-pxa: Add device tree support

2012-06-12 Thread zhangfei gao
On Wed, Jun 13, 2012 at 3:05 AM, Chris Ball c...@laptop.org wrote: Tested on an OLPC XO-1.75.  (MMP2, sdhci-pxav3, CONFIG_MACH_MMP2_DT=y) Signed-off-by: Chris Ball c...@laptop.org ---  .../devicetree/bindings/mmc/sdhci-pxa.txt          |   21  drivers/mmc/host/sdhci-pxav2.c          

Re: [PATCH] mmc: sdhci-pxa: Check pdata before using its members

2011-09-14 Thread zhangfei gao
On Wed, Sep 14, 2011 at 1:59 PM, Tanmay Upadhyay tanmay.upadh...@einfochips.com wrote: Signed-off-by: Tanmay Upadhyay tanmay.upadh...@einfochips.com Acked-by: Zhangfei Gao zhangfei@marvell.com Thanks ---  drivers/mmc/host/sdhci-pxav2.c |    4 ++--  1 files changed, 2 insertions(+), 2

[PATCH v3 0/2] mmc add vsdio to dynamically control sdio power

2011-08-25 Thread Zhangfei Gao
v2-v3, change vmmc to vsdio In v2, vmmc is reused, however, sd may be impacted if move vmmc to set_ios. When no card inserted, CD is high, vmmc will be disabled when detect fail, CD will pull low accordingly, controller may treat as card inserted and re-detect. Zhangfei Gao (2): mmc: sdio add

[PATCH v3 1/2] mmc: sdio add regulator vsdio

2011-08-25 Thread Zhangfei Gao
sdio client may be required power on/off dynamically. With regulator vsdio, sdio client power on/off could be executed by mmc_power_up/down CC: Ohad Ben-Cohen o...@wizery.com Signed-off-by: Zhangfei Gao zhangfei@marvell.com --- drivers/mmc/host/sdhci.c | 22

  1   2   3   >