Re: [PATCH] mmc: sdhci-esdhc-imx: Enable boot partition access from DT

2014-09-02 Thread Dong Aisheng
mmc_of_parse currently, maybe it's time to convert to it. Regards Dong Aisheng *NOTE* on CD and WP polarity. To use common for all SD/MMC host controllers line polarity properties, we have to fix the meaning of the normal and inverted diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b

Re: [ulf.hansson-mmc:next 62/67] drivers/mmc/host/sdhci.c:1199:4: error: 'mmc' undeclared

2014-09-01 Thread Dong Aisheng
On Mon, Sep 01, 2014 at 09:32:29AM +0200, Ulf Hansson wrote: On 1 September 2014 04:40, Dong Aisheng b29...@freescale.com wrote: Hi Ulf, On Fri, Aug 29, 2014 at 09:27:10PM +0800, kbuild test robot wrote: tree: git://git.linaro.org/people/ulf.hansson/mmc next head

[PATCH V3 2/6] mmc: sdhci-esdhc-imx: fix incorrect max timeout cout for uSDHC

2014-08-27 Thread Dong Aisheng
The default sdhci code use the 1 27 as the max timeout counter to to calculate the max_busy_timeout, however it's not correct for uSDHC since its the max counter is 1 28. Implement esdhc_get_max_timeout_cout to handle it correctly. Reviewed-by: Shawn Guo shawn@linaro.org Signed-off-by: Dong

[PATCH V3 3/6] mmc: sdhci: add platform set_timeout hook

2014-08-27 Thread Dong Aisheng
possible that other platforms has different timeout calculation algorithm. To be flexible, this patch provides a .set_timeout hook for those platforms to set the timeout on their way if they need. Reviewed-by: Shawn Guo shawn@linaro.org Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers

[PATCH V3 1/6] mmc: sdhci: add platfrom get_max_timeout_count hook

2014-08-27 Thread Dong Aisheng
. To be flexible, we add a get_max_timeout_count hook to get the correct maximum timeout value for these platforms. Reviewed-by: Shawn Guo shawn@linaro.org Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers/mmc/host/sdhci.c | 11 --- drivers/mmc/host/sdhci.h |1 + 2 files

[PATCH V3 0/6] mmc: sdhci: a few fixes on timeout and max_discard_to

2014-08-27 Thread Dong Aisheng
changes based on Shawn's comment. 3. patch 6 in v1 is dropped since not need anymore after change 1 Dong Aisheng (6): mmc: sdhci: add platfrom get_max_timeout_count hook mmc: sdhci-esdhc-imx: fix incorrect max timeout cout for uSDHC mmc: sdhci: add platform set_timeout hook mmc: sdhci-esdhc-imx

[PATCH V3 4/6] mmc: sdhci-esdhc-imx: set the correct max timeout value for uSDHC

2014-08-27 Thread Dong Aisheng
and uSDHC. Currently we simply set the max timeout value as before. But in the future, we probably may implement IMX specific timeout setting algorithm and use suitable timeout for different CMDs. Reviewed-by: Shawn Guo shawn@linaro.org Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers

[PATCH V3 5/6] mmc: sdhci: calculate timeout_clk conditionally in sdhci_add_host

2014-08-27 Thread Dong Aisheng
The timeout_clk calculation code in sdhci_add_host is meaningless for SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK. So only execute them with no SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK set. Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers/mmc/host/sdhci.c | 34

Re: [PATCH v2 0/5] mmc: sdhci: a few fixes on timeout and max_discard_to

2014-05-18 Thread Dong Aisheng
On Sat, May 17, 2014 at 10:09 PM, Shawn Guo shawn@linaro.org wrote: On Tue, Dec 17, 2013 at 04:16:26PM +0800, Dong Aisheng wrote: Patch 1~4 mainly fixes the issue that the max timeout counter for uSDHC is 1 28 rather than 1 27. 1~2 fix getting the max timeout counter while 3~4 fix

[PATCH 1/1] mmc: sdhci-esdhc-imx: fix mmc ddr mode regression issue

2014-05-09 Thread Dong Aisheng
caused by the platform driver was still using MMC_TIMING_UHS_DDR50 for MMC DDR mode which needs update too. Reported-by: Fabio Estevam fabio.este...@freescale.com Reported-by: Shawn Guo shawn@freescale.com Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers/mmc/host/sdhci-esdhc-imx.c

Re: [PATCH 1/1] mmc: sdhci-esdhc-imx: fix mmc ddr mode regression issue

2014-05-09 Thread Dong Aisheng
On Fri, May 09, 2014 at 10:42:42AM +0200, Ulf Hansson wrote: On 9 May 2014 08:53, Dong Aisheng b29...@freescale.com wrote: The regression is caused by the following commit ... commit 79f7ae7c45a6ccf04e2908337461dee615f6afb0 Author: Seungwon Jeon tgih@samsung.com Date: Fri Mar 14

Re: Adding esdhc4 eMMC support on mx6sabresd

2014-05-08 Thread Dong Aisheng
missed. Regards Dong Aisheng Lothar Waßmann -- ___ Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10 Geschäftsführer: Matthias Kaussen Handelsregistereintrag: Amtsgericht

Re: Adding esdhc4 eMMC support on mx6sabresd

2014-05-08 Thread Dong Aisheng
On Fri, May 09, 2014 at 11:16:25AM +0800, Shawn Guo wrote: On Thu, May 08, 2014 at 06:17:32PM +0800, Dong Aisheng wrote: I just tested an old Chris/mmc-next tree which is 3.14 rc2 with the top commit is b42b9b. The eMMC works well on SabreSD boards. But it failed and got the same issue

Re: brcm 4329 problems

2014-02-11 Thread Dong Aisheng
On Tue, Feb 11, 2014 at 5:00 PM, Ulf Hansson ulf.hans...@linaro.org wrote: On 11 February 2014 08:33, Dong Aisheng donga...@gmail.com wrote: On Mon, Feb 10, 2014 at 10:03 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Mon, Feb 10, 2014 at 02:50:42PM +0800, Dong Aisheng wrote

Re: brcm 4329 problems

2014-02-11 Thread Dong Aisheng
On Tue, Feb 11, 2014 at 6:27 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Tue, Feb 11, 2014 at 03:33:09PM +0800, Dong Aisheng wrote: It depends on both host and card that 1) if host is able to detect SDIO interrupts without clock and 2) if the card is able to send interrupt

Re: brcm 4329 problems

2014-02-11 Thread Dong Aisheng
On Tue, Feb 11, 2014 at 5:46 PM, Ulf Hansson ulf.hans...@linaro.org wrote: On 11 February 2014 08:38, Dong Aisheng donga...@gmail.com wrote: On Mon, Feb 10, 2014 at 11:25 PM, Ulf Hansson ulf.hans...@linaro.org wrote: On 10 February 2014 15:03, Russell King - ARM Linux li...@arm.linux.org.uk

Re: UHS-1 cards with iMX6Q

2014-02-10 Thread Dong Aisheng
On Mon, Feb 10, 2014 at 6:33 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Mon, Feb 10, 2014 at 11:31:40AM +0800, Dong Aisheng wrote: On Sun, Feb 9, 2014 at 11:14 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: Okay, I have this working now - there was a hardware

Re: brcm 4329 problems

2014-02-10 Thread Dong Aisheng
On Mon, Feb 10, 2014 at 10:03 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Mon, Feb 10, 2014 at 02:50:42PM +0800, Dong Aisheng wrote: On Mon, Feb 10, 2014 at 7:27 AM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Sun, Feb 09, 2014 at 08:59:17PM +, Russell King

Re: brcm 4329 problems

2014-02-10 Thread Dong Aisheng
On Mon, Feb 10, 2014 at 11:25 PM, Ulf Hansson ulf.hans...@linaro.org wrote: On 10 February 2014 15:03, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Mon, Feb 10, 2014 at 02:50:42PM +0800, Dong Aisheng wrote: On Mon, Feb 10, 2014 at 7:27 AM, Russell King - ARM Linux li

Re: UHS-1 cards with iMX6Q

2014-02-09 Thread Dong Aisheng
); - enable_irq(host-irq); + spin_unlock_irqrestore(host-lock, flags); wait_for_completion(mrq.completion); Regards Dong Aisheng [2.290584] = [2.308140] [ INFO: inconsistent lock state ] [2.308146] 3.14.0-rc1+ #490 Not tainted [2.308148

Re: brcm 4329 problems

2014-02-09 Thread Dong Aisheng
issue is caused by runtime pm disabling the interrupt clocks as you said. Can you try the patch i mentioned here: http://www.spinics.net/lists/linux-mmc/msg24764.html That will prevent the host to do runtime pm for SDIO devices. Regards Dong Aisheng -- FTTC broadband for 0.8mile line

Re: [Regression: mmc: sdhci-esdhc-imx: add runtime pm support]

2014-02-08 Thread Dong Aisheng
Hi Martin, On Fri, Feb 7, 2014 at 5:25 PM, Martin Fuzzey mfuz...@parkeon.com wrote: Hi Dong, thank you for your rapid response. On 07/02/14 09:03, Dong Aisheng wrote: Some SDIO cards may not be able to work well without clock. Originally it is handled by the mmc clock gate framework

Re: UHS-1 cards with iMX6Q

2014-02-08 Thread Dong Aisheng
to if it works well. I just tried a Toshiba SD3.0 cards and a Sandisk SD3.0 cards, both works well on imx6q sabreauto boards. Regards Dong Aisheng -- FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up. Estimation in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad

Re: [Regression: mmc: sdhci-esdhc-imx: add runtime pm support]

2014-02-07 Thread Dong Aisheng
On Fri, Feb 7, 2014 at 3:56 PM, Dong Aisheng donga...@gmail.com wrote: Hi Martin, On Thu, Feb 6, 2014 at 10:55 PM, Martin Fuzzey mfuz...@parkeon.com wrote: Hello all, since commit 89d7e5c131228a8f0d8b0cb48b459c62152bf620 Author: Dong Aisheng b29...@freescale.com Date: Mon Nov 4 16:38

Re: [Regression: mmc: sdhci-esdhc-imx: add runtime pm support]

2014-02-06 Thread Dong Aisheng
Hi Martin, On Thu, Feb 6, 2014 at 10:55 PM, Martin Fuzzey mfuz...@parkeon.com wrote: Hello all, since commit 89d7e5c131228a8f0d8b0cb48b459c62152bf620 Author: Dong Aisheng b29...@freescale.com Date: Mon Nov 4 16:38:29 2013 +0800 mmc: sdhci-esdhc-imx: add runtime pm support My

Re: [PATCH v2 0/5] mmc: sdhci: a few fixes on timeout and max_discard_to

2014-01-19 Thread Dong Aisheng
Ping... On Mon, Jan 13, 2014 at 6:55 PM, Dong Aisheng donga...@gmail.com wrote: Hi Chris, On Tue, Dec 17, 2013 at 10:30 PM, Shawn Guo shawn@linaro.org wrote: On Tue, Dec 17, 2013 at 04:16:26PM +0800, Dong Aisheng wrote: Dong Aisheng (5): mmc: sdhci: add platfrom get_max_timeout_count

Re: [PATCH 1/1] mmc: sdhci: fix lockdep error on tunning routine

2014-01-15 Thread Dong Aisheng
On Wed, Jan 15, 2014 at 3:46 PM, Lothar Waßmann l...@karo-electronics.de wrote: Hi, Dong Aisheng wrote: On Mon, Jan 13, 2014 at 8:04 PM, Peter Zijlstra pet...@infradead.org wrote: On Thu, Dec 26, 2013 at 03:58:20PM +0800, Dong Aisheng wrote: It's strange that this issue did not happen

Re: [PATCH 1/1] mmc: sdhci: fix lockdep error on tunning routine

2014-01-15 Thread Dong Aisheng
On Wed, Jan 15, 2014 at 6:09 PM, Peter Zijlstra pet...@infradead.org wrote: On Wed, Jan 15, 2014 at 03:19:27PM +0800, Dong Aisheng wrote: On Mon, Jan 13, 2014 at 8:04 PM, Peter Zijlstra pet...@infradead.org wrote: On Thu, Dec 26, 2013 at 03:58:20PM +0800, Dong Aisheng wrote: It's strange

Re: [PATCH v2 0/5] mmc: sdhci: a few fixes on timeout and max_discard_to

2014-01-14 Thread Dong Aisheng
Hi Ulf, On Mon, Jan 13, 2014 at 9:01 PM, Ulf Hansson ulf.hans...@linaro.org wrote: On 17 December 2013 09:16, Dong Aisheng b29...@freescale.com wrote: Patch 1~4 mainly fixes the issue that the max timeout counter for uSDHC is 1 28 rather than 1 27. 1~2 fix getting the max timeout counter

Re: [PATCH 1/1] mmc: sdhci: fix lockdep error on tunning routine

2014-01-14 Thread Dong Aisheng
On Mon, Jan 13, 2014 at 8:04 PM, Peter Zijlstra pet...@infradead.org wrote: On Thu, Dec 26, 2013 at 03:58:20PM +0800, Dong Aisheng wrote: It's strange that this issue did not happen on kernel 3.10.17 with the same code. And looking at the code, before call spin_lock we already disable

Re: [PATCH 1/1] mmc: sdhci: fix lockdep error on tunning routine

2014-01-13 Thread Dong Aisheng
Ping On Thu, Dec 26, 2013 at 3:58 PM, Dong Aisheng donga...@gmail.com wrote: Hi Peter, On Mon, Dec 23, 2013 at 7:13 PM, Dong Aisheng b29...@freescale.com wrote: The sdhci_execute_tuning routine gets lock separately by disable_irq(host-irq); spin_lock(host-lock); It will cause

Re: [PATCH V2 1/2] mmc: sdhci-esdhc-imx: fix access hardirq-unsafe lock in atomic context

2014-01-13 Thread Dong Aisheng
Hi Chris, On Tue, Dec 31, 2013 at 1:24 PM, Shawn Guo shawn@linaro.org wrote: On Thu, Dec 26, 2013 at 03:23:53PM +0800, Dong Aisheng wrote: Sometimes we may meet the following lockdep issue. The root cause is .set_clock callback is executed with spin_lock_irqsave in sdhci_do_set_ios

Re: [PATCH v2 0/5] mmc: sdhci: a few fixes on timeout and max_discard_to

2014-01-13 Thread Dong Aisheng
Hi Chris, On Tue, Dec 17, 2013 at 10:30 PM, Shawn Guo shawn@linaro.org wrote: On Tue, Dec 17, 2013 at 04:16:26PM +0800, Dong Aisheng wrote: Dong Aisheng (5): mmc: sdhci: add platfrom get_max_timeout_count hook mmc: sdhci-esdhc-imx: fix incorrect max_discard_to for uSDHC mmc: sdhci

[PATCH V2 1/2] mmc: sdhci-esdhc-imx: fix access hardirq-unsafe lock in atomic context

2013-12-25 Thread Dong Aisheng
: r6: r5:80044d0c r4:bf9e7f00 Cc: Chris Ball c...@laptop.org Cc: Fabio Estevam fabio.este...@freescale.com Cc: Shawn Guo shawn@linaro.org Fixes: 0ddf03c mmc: esdhc-imx: parse max-frequency from devicetree Signed-off-by: Dong Aisheng b29...@freescale.com --- ChangeLog: no changes

Re: [PATCH 1/1] mmc: sdhci: fix lockdep error on tunning routine

2013-12-25 Thread Dong Aisheng
Hi Peter, On Mon, Dec 23, 2013 at 7:13 PM, Dong Aisheng b29...@freescale.com wrote: The sdhci_execute_tuning routine gets lock separately by disable_irq(host-irq); spin_lock(host-lock); It will cause the following lockdep error message since the host-lock could also be got in irq context

[PATCH 2/2] mmc: sdhci-esdhc-imx: fix warning during module remove function

2013-12-23 Thread Dong Aisheng
---[ end trace a0897d268e6233b2 ]--- Cc: Chris Ball c...@laptop.org Cc: Shawn Guo shawn@linaro.org Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers/mmc/host/sdhci-esdhc-imx.c |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c

[PATCH 1/2] mmc: sdhci-esdhc-imx: fix access hardirq-unsafe lock in atomic context

2013-12-23 Thread Dong Aisheng
: r6: r5:80044d0c r4:bf9e7f00 Cc: Chris Ball c...@laptop.org Cc: Fabio Estevam fabio.este...@freescale.com Cc: Shawn Guo shawn@linaro.org Fixes: 0ddf03c mmc: esdhc-imx: parse max-frequency from devicetree Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers/mmc/host/sdhci

[PATCH 1/1] mmc: sdhci: fix lockdep error on tunning routine

2013-12-23 Thread Dong Aisheng
] (worker_thread+0x0/0x3e0) from [80044de0] (kthread+0xd4/0xf0) [80044d0c] (kthread+0x0/0xf0) from [8000e9c8] (ret_from_fork+0x14/0x2c) r7: r6: r5:80044d0c r4:bfb37b40 Cc: Peter Zijlstra pet...@infradead.org Cc: Chris Ball c...@laptop.org Cc: Shawn Guo shawn@linaro.org Signed-off-by: Dong

Re: [PATCH 1/1] mmc: sdhci: fix lockdep error on tunning routine

2013-12-23 Thread Dong Aisheng
On Mon, Dec 23, 2013 at 08:23:17PM +0800, Shawn Guo wrote: On Mon, Dec 23, 2013 at 07:13:04PM +0800, Dong Aisheng wrote: It's strange that this issue did not happen on kernel 3.10.17 with the same code. Probably just because you did not turn on CONFIG_PROVE_LOCKING on your 3.10.17 kennel

Re: [PATCH 1/2] mmc: sdhci-esdhc-imx: fix access hardirq-unsafe lock in atomic context

2013-12-23 Thread Dong Aisheng
On Mon, Dec 23, 2013 at 08:47:01PM +0800, Shawn Guo wrote: On Mon, Dec 23, 2013 at 07:02:23PM +0800, Dong Aisheng wrote: Sometimes we may meet the following lockdep issue. The root cause is .set_clock callback is executed with spin_lock_irqsave in sdhci_do_set_ios. However, the IMX

Re: [PATCH 2/2] mmc: sdhci-esdhc-imx: fix warning during module remove function

2013-12-23 Thread Dong Aisheng
On Mon, Dec 23, 2013 at 10:06:15PM +0800, Shawn Guo wrote: On Mon, Dec 23, 2013 at 07:02:24PM +0800, Dong Aisheng wrote: @@ -1160,8 +1160,6 @@ free_sdhci: static int sdhci_esdhc_imx_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev

Re: [PATCH] mmc: core: don't return 1 for max_discard

2013-12-19 Thread Dong Aisheng
slow. With this patch in place, discard operates a single erase block at a time, which is reasonably fast. Cc: Adrian Hunter adrian.hun...@intel.com Cc: Dong Aisheng donga...@gmail.com Cc: Ulf Hansson ulf.hans...@linaro.org Cc: Vladimir Zapolskiy v...@mleia.com Fixes: e056a1b5b67b (mmc: queue

Re: [PATCH] mmc: core: don't return 1 for max_discard

2013-12-19 Thread Dong Aisheng
? It actually does not change the max_discard_to/max_discard_bytes. It still discards only one sector one time if it does as before Regards Dong Aisheng -- 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

Re: [PATCH] mmc: core: don't return 1 for max_discard

2013-12-19 Thread Dong Aisheng
a proper size of data in case it affects the system a lot(e.g. two partitions on the same card, discard one partition may cause the code on another partition has no chance to run, it may be serious if the file system is in it.). Regards Dong Aisheng Would be very interesting to know what option

Re: [RFC/PATCH 0/2] mmc: sdhci: Workaround Intel Merrifield issue for HS200

2013-12-19 Thread Dong Aisheng
? IMX also needs this quirk for imx6q/dl since it can not meet HS200 timing requirement. David, Is the unkonwn hw issue in your patch #2 resolved now? If yes, you may not need this quirk. I could resend it with your sign-off with IMX patches. Regards Dong Aisheng Br, David Cohen

Re: [RFC/PATCH 0/2] mmc: sdhci: Workaround Intel Merrifield issue for HS200

2013-12-19 Thread Dong Aisheng
On Fri, Dec 20, 2013 at 11:25 AM, David Cohen david.a.co...@linux.intel.com wrote: On Fri, Dec 20, 2013 at 11:00:23AM +0800, Dong Aisheng wrote: On Wed, Nov 13, 2013 at 5:49 AM, David Cohen david.a.co...@linux.intel.com wrote: On 10/29/2013 10:58 AM, David Cohen wrote: Hi, SDHCI used

Re: [PATCH] mmc: sdhci: Avoid HARDIRQ-unsafe lock

2013-12-19 Thread Dong Aisheng
. The right approach should be avoid accessing hardirq-unsafe lock in IMX .set_clock funcion. I will push a correct fix with you CCed. Regards Dong Aisheng == [ INFO: HARDIRQ-safe - HARDIRQ-unsafe lock order detected ] fec 2188000.ethernet eth0

[PATCH v2 1/5] mmc: sdhci: add platfrom get_max_timeout_count hook

2013-12-17 Thread Dong Aisheng
platforms may have different problems. To be flexible, we add a get_max_timeout_count hook to get the correct maximum timeout value for these platforms. Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers/mmc/host/sdhci.c |4 +++- drivers/mmc/host/sdhci.h |1 + 2 files changed, 4

[PATCH v2 0/5] mmc: sdhci: a few fixes on timeout and max_discard_to

2013-12-17 Thread Dong Aisheng
to .get_max_timeout_count to reuse some code 2. some other minor changes based on Shawn's comment. 3. patch 6 in v1 is dropped since not need anymore after change 1 Dong Aisheng (5): mmc: sdhci: add platfrom get_max_timeout_count hook mmc: sdhci-esdhc-imx: fix incorrect max_discard_to

[PATCH v2 5/5] mmc: sdhci: calculate max_discard_to dynamically for SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK

2013-12-17 Thread Dong Aisheng
a lot which will also improve discard performance a lot. The one known limitation of this approach is that it does not cover the special case for user changes the clock via sysfs, since the max_discard_to is only initialised for one time during the mmc queue init. Signed-off-by: Dong Aisheng b29

[PATCH v2 3/5] mmc: sdhci: add platform set_timeout hook

2013-12-17 Thread Dong Aisheng
possible that other platforms has different timeout calculation algorithm. To be flexible, this patch provides a .set_timeout hook for those platforms to set the timeout on their way if they need. Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers/mmc/host/sdhci.c | 19

[PATCH v2 2/5] mmc: sdhci-esdhc-imx: fix incorrect max_discard_to for uSDHC

2013-12-17 Thread Dong Aisheng
The default sdhci code use the 1 27 as the max timeout counter to to calculate the max_discard_to, however it's not correct for uSDHC since its the max counter is 1 28. Implement esdhc_get_max_timeout to handle it correctly. Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers/mmc/host

[PATCH v2 4/5] mmc: sdhci-esdhc-imx: set the correct max timeout value for uSDHC

2013-12-17 Thread Dong Aisheng
and uSDHC. Currently we simply set the max timeout value as before. But in the future, we probably may implement IMX specific timeout setting algorithm and use suitable timeout for different CMDs. Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers/mmc/host/sdhci-esdhc-imx.c | 11

Re: max_discard anomaly on certain Sandisk eMMC

2013-12-17 Thread Dong Aisheng
. I submitted the fix patches: http://www.spinics.net/lists/arm-kernel/msg294924.html Please see if it helps for you, especially patch #5. It could increase the max_discard_to if Tegra has same problem. Regards Dong Aisheng For almost all my other eMMC devices, either: * Both arguments

Re: max_discard anomaly on certain Sandisk eMMC

2013-12-17 Thread Dong Aisheng
of using HW timeout machanism. And actuall the mmc core already has some base code to support it. The timeout is 10 seconds. See mmc_do_erase function and /* If the device is not responding */ #define MMC_CORE_TIMEOUT_MS (10 * 60 * 1000) /* 10 minute timeout */ Regards Dong Aisheng c

Re: max_discard anomaly on certain Sandisk eMMC

2013-12-17 Thread Dong Aisheng
in the same system? Regards Dong Aisheng Kind regards Ulf Hansson -- 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 -- To unsubscribe from this list

Re: [BUG/RFC] SDHCI_QUIRK_NO_MULTIBLOCK for i.MX35/25

2013-12-17 Thread Dong Aisheng
and over the top. or 3. something better. There's an .init_card callback which is called in mmc_sdio_init_card. That means we can know current card is SDIO, then you can try to update the max_blk_count there. Regards Dong Aisheng Regards, Steffen -- Pengutronix e.K

Re: max_discard anomaly on certain Sandisk eMMC

2013-12-17 Thread Dong Aisheng
On Wed, Dec 18, 2013 at 1:27 AM, Stephen Warren swar...@wwwdotorg.org wrote: On 12/17/2013 02:25 AM, Dong Aisheng wrote: Hi Stephen, On Sat, Dec 14, 2013 at 6:43 AM, Stephen Warren swar...@wwwdotorg.org wrote: On one of my eMMC devices, I see the following results from calling

Re: [PATCH 1/6] mmc: sdhci: add platfrom get_max_timeout hook

2013-12-16 Thread Dong Aisheng
On Wed, Dec 11, 2013 at 1:55 PM, Shawn Guo shawn@linaro.org wrote: On Wed, Dec 11, 2013 at 12:59:55PM +0800, Dong Aisheng wrote: On Wed, Dec 11, 2013 at 11:56 AM, Shawn Guo shawn@linaro.org wrote: On Wed, Dec 11, 2013 at 11:20:59AM +0800, Dong Aisheng wrote: No, the max_to is the max

Re: [PATCH 3/6] mmc: sdhci: add platform set_timeout hook

2013-12-16 Thread Dong Aisheng
On Wed, Dec 11, 2013 at 2:04 PM, Shawn Guo shawn@linaro.org wrote: On Wed, Dec 11, 2013 at 01:03:43PM +0800, Dong Aisheng wrote: On Wed, Dec 11, 2013 at 11:48 AM, Shawn Guo shawn@linaro.org wrote: On Wed, Dec 11, 2013 at 11:35:17AM +0800, Dong Aisheng wrote: This actually

Re: sdhci-esdhc-imx - power management supported

2013-12-16 Thread Dong Aisheng
for iMX6?. Chris' tree already has imx rpm patches for uSDHC. git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc.git You can refer to it. Regards Dong Aisheng Regards, john ___ linux-arm-kernel mailing list linux-arm-ker

[PATCH 0/6] mmc: sdhci: a few fixes on timeout and max_discard_to

2013-12-10 Thread Dong Aisheng
. There's also discussion about remove max_discard_to limit here: http://www.spinics.net/lists/linux-mmc/msg23395.html But it does not help for uSDHC since we can observe data timeout on a Toshiba SD3.0 cards if we do not disable data timeout interrupt. Dong Aisheng (6): mmc: sdhci: add platfrom

[PATCH 3/6] mmc: sdhci: add platform set_timeout hook

2013-12-10 Thread Dong Aisheng
timeout value, then the 0xE becomes meaningless. To be flexible, this patch provides another approach for platforms to set the correct timeout on their way. Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers/mmc/host/sdhci.c | 19 ++- drivers/mmc/host/sdhci.h |2

[PATCH 4/6] mmc: sdhci-esdhc-imx: set the correct max timeout value for uSDHC

2013-12-10 Thread Dong Aisheng
and uSDHC. Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers/mmc/host/sdhci-esdhc-imx.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 97b35e1..c24cb23 100644 --- a/drivers/mmc

[PATCH 5/6] mmc: sdhci: calculate max_discard_to dynamically for SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK

2013-12-10 Thread Dong Aisheng
a lot which will also improve discard performance a lot. The one known limitation of this approach is that it does not cover the special case for user changes the clock via sysfs, since the max_discard_to is only initialised for one time during the mmc queue init. Signed-off-by: Dong Aisheng b29

[PATCH 6/6] mmc: sdhci-esdhc-imx: use actual_clock to calculate timeout

2013-12-10 Thread Dong Aisheng
The timeout clock for uSDHC is SDCLK, so it's reasonable to use the actual_clock to calculate the max timeout. Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers/mmc/host/sdhci-esdhc-imx.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/host/sdhci

[PATCH 1/6] mmc: sdhci: add platfrom get_max_timeout hook

2013-12-10 Thread Dong Aisheng
platforms may have different problems. To be flexible, we add a get_max_timeout hook to get the correct maximum timeout value for these platforms. Signed-off-by: Dong Aisheng b29...@freescale.com Reported-by: Ed Sutter ed.sut...@alcatel-lucent.com --- drivers/mmc/host/sdhci.c |5 - drivers

[PATCH 2/6] mmc: sdhci-esdhc-imx: fix incorrect max_discard_to for uSDHC

2013-12-10 Thread Dong Aisheng
The default sdhci code use the 1 27 as the max timeout counter to to calculate the max_discard_to, however it's not correct for uSDHC since its the max counter is 1 28. Implement esdhc_get_max_timeout to handle it correctly. Signed-off-by: Dong Aisheng b29...@freescale.com Reported-by: Ed

Re: [PATCH 1/6] mmc: sdhci: add platfrom get_max_timeout hook

2013-12-10 Thread Dong Aisheng
On Wed, Dec 11, 2013 at 9:56 AM, Shawn Guo shawn@linaro.org wrote: On Tue, Dec 10, 2013 at 08:56:03PM +0800, Dong Aisheng wrote: Currently the max_discard_to is simply got by (1 27) / host-timeout_clk which is assumed to be the maximum timeout value, however, some platforms maximum

Re: [PATCH 3/6] mmc: sdhci: add platform set_timeout hook

2013-12-10 Thread Dong Aisheng
On Wed, Dec 11, 2013 at 10:16 AM, Shawn Guo shawn@linaro.org wrote: On Tue, Dec 10, 2013 at 08:56:05PM +0800, Dong Aisheng wrote: Currently the common code assume 0xE is the maximum timeout counter value and use it to write into the timeout counter register. However, it's fairly possible

Re: [PATCH 4/6] mmc: sdhci-esdhc-imx: set the correct max timeout value for uSDHC

2013-12-10 Thread Dong Aisheng
On Wed, Dec 11, 2013 at 10:17 AM, Shawn Guo shawn@linaro.org wrote: On Tue, Dec 10, 2013 at 08:56:06PM +0800, Dong Aisheng wrote: The default sdhci driver write 0xE into timeout counter register to set the maximum timeout. The value is not correct for uSDHC since the max counter value

Re: [PATCH 5/6] mmc: sdhci: calculate max_discard_to dynamically for SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK

2013-12-10 Thread Dong Aisheng
On Wed, Dec 11, 2013 at 11:01 AM, Shawn Guo shawn@linaro.org wrote: On Tue, Dec 10, 2013 at 08:56:07PM +0800, Dong Aisheng wrote: For host controllers using SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK, since the card clock is changed dynamically for different cards, it does not make sense to use

Re: [PATCH 1/6] mmc: sdhci: add platfrom get_max_timeout hook

2013-12-10 Thread Dong Aisheng
On Wed, Dec 11, 2013 at 11:12 AM, Shawn Guo shawn@linaro.org wrote: On Wed, Dec 11, 2013 at 11:00:03AM +0800, Dong Aisheng wrote: @@ -2930,7 +2930,10 @@ int sdhci_add_host(struct sdhci_host *host) if (host-quirks SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK) host-timeout_clk

Re: [PATCH 1/6] mmc: sdhci: add platfrom get_max_timeout hook

2013-12-10 Thread Dong Aisheng
On Wed, Dec 11, 2013 at 11:56 AM, Shawn Guo shawn@linaro.org wrote: On Wed, Dec 11, 2013 at 11:20:59AM +0800, Dong Aisheng wrote: No, the max_to is the max timeout counter value, you need to divide it by the timeout clock to get the timeout time. The defined of this API is return the max

Re: [PATCH 3/6] mmc: sdhci: add platform set_timeout hook

2013-12-10 Thread Dong Aisheng
On Wed, Dec 11, 2013 at 11:48 AM, Shawn Guo shawn@linaro.org wrote: On Wed, Dec 11, 2013 at 11:35:17AM +0800, Dong Aisheng wrote: This actually is the register value, not the max timeout counter value. Then you may want define the API as: unsigned int(*get_max_timeout_val)(struct

Re: [PATCH 5/6] mmc: sdhci: calculate max_discard_to dynamically for SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK

2013-12-10 Thread Dong Aisheng
On Wed, Dec 11, 2013 at 12:05 PM, Shawn Guo shawn@linaro.org wrote: On Tue, Dec 10, 2013 at 08:56:07PM +0800, Dong Aisheng wrote: static inline void sdhci_update_clock(struct sdhci_host *host) @@ -2939,10 +2952,12 @@ int sdhci_add_host(struct sdhci_host *host) if (host-quirks

Re: imx6 emmc issue

2013-11-21 Thread Dong Aisheng
interrupt: 0x0001 mmc2: req done (CMD38): 0: 0800 mmc2: starting CMD13 arg 0001 flags 0015 sdhci [sdhci_irq()]: *** mmc2 got interrupt: 0x0001 mmc2: req done (CMD13): 0: 0900 Regards Dong Aisheng Thanks

Re: [PATCH V2] sdhci: only reprogram retuning timer when flag is set

2013-11-13 Thread Dong Aisheng
Hi Arend, On Wed, Nov 13, 2013 at 6:21 PM, Arend van Spriel ar...@broadcom.com wrote: On 11/13/2013 06:02 AM, Dong Aisheng wrote: Hi Arend, On Mon, Nov 11, 2013 at 5:49 PM, Arend van Spriel ar...@broadcom.com wrote: When the host-tuning_count is zero it means that the retuning

Re: [PATCH v2 0/6] mmc: sdhci-esdhc-imx: fix acmd23 unwork and ddr not supported on sabresd issues

2013-11-13 Thread Dong Aisheng
Hi Chris, On Thu, Oct 31, 2013 at 3:04 PM, Shawn Guo shawn@linaro.org wrote: On Wed, Oct 30, 2013 at 10:09:47PM +0800, Dong Aisheng wrote: Dong Aisheng (6): mmc: sdhci: clear auto cmd setting bits for no data cmds mmc: sdhci-esdhc-imx: add SDHCI_TRANSFER_MODE read function ARM: dts

Re: [PATCH 2/2] mmc: sdhci-esdhc-imx: add eMMC HS200 mode support

2013-11-13 Thread Dong Aisheng
Hi Chris, On Thu, Oct 31, 2013 at 3:18 PM, Shawn Guo shawn@linaro.org wrote: On Wed, Oct 30, 2013 at 10:10:42PM +0800, Dong Aisheng wrote: Add support for eMMC 4.5 cards to work on hs200 mode. Signed-off-by: Dong Aisheng b29...@freescale.com Acked-by: Shawn Guo shawn@linaro.org

Re: [PATCH v2 0/5] mmc: sdhci-esdhc-imx: add runtime pm support

2013-11-13 Thread Dong Aisheng
Hi Chris, On Tue, Nov 5, 2013 at 10:03 AM, Shawn Guo shawn@linaro.org wrote: On Mon, Nov 04, 2013 at 04:38:24PM +0800, Dong Aisheng wrote: We disable root clock in runtime pm to save power. Patch 2~4 are some fixes needed for enable runtime pm or it may break the UHS cards(SD3.0/eMMC4.5

Re: [PATCH V2] sdhci: only reprogram retuning timer when flag is set

2013-11-13 Thread Dong Aisheng
On Wed, Nov 13, 2013 at 7:18 PM, Arend van Spriel ar...@broadcom.com wrote: On 11/13/2013 12:12 PM, Dong Aisheng wrote: Hi Arend, On Wed, Nov 13, 2013 at 6:21 PM, Arend van Spriel ar...@broadcom.com wrote: On 11/13/2013 06:02 AM, Dong Aisheng wrote: Hi Arend, On Mon, Nov 11, 2013 at 5

Re: [PATCH V2] sdhci: only reprogram retuning timer when flag is set

2013-11-12 Thread Dong Aisheng
also remove this line? It looks to me it's not neccesary to check the tuning_mode again since we already check the flag above and SDHCI_TUNING_MODE_1 seems like the prerequisite of SDHCI_USING_RETUNING_TIMER. Regards Dong Aisheng -- 1.7.10.4 -- To unsubscribe from this list: send the line

Re: [PATCH] Avoid needless loop in sdhci_irq()

2013-11-05 Thread Dong Aisheng
and doing nothing. Signed-off-by: Alexey Neyman sti...@att.net You need improve the patch title a bit, like: mmc: sdhci: avoid needless loop for handle SDIO interrupts in sdhci_irq Otherwise, Acked-by: Dong Aisheng b29...@freescale.com You could resend with my ack. Regards Dong Aisheng

[PATCH v2 2/5] mmc: sdhci-esdhc-imx: tuning bits should not be cleared during reset

2013-11-04 Thread Dong Aisheng
We should not clear tuning bits during reset or the SD3.0/eMMC4.5 card working on UHS mode may not work after reset since the former tuning settings was lost. Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers/mmc/host/sdhci-esdhc-imx.c |7 ++- 1 files changed, 6 insertions

[PATCH v2 0/5] mmc: sdhci-esdhc-imx: add runtime pm support

2013-11-04 Thread Dong Aisheng
on imx6sl evk eMMC DDR on imx6q sabresd SDHC on imx6q sabresd ChangeLog: v1-v2: only patch 5 changed. Add pm_runtime_set_active based on Ulf's comments. Dong Aisheng (5): mmc: sdhci-pltfm: export pltfm suspend/resume api mmc: sdhci-esdhc-imx: tuning bits should not be cleared during reset

[PATCH v2 1/5] mmc: sdhci-pltfm: export pltfm suspend/resume api

2013-11-04 Thread Dong Aisheng
It is helpful for platforms code to use to elimiate duplicated code. Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers/mmc/host/sdhci-pltfm.c |6 -- drivers/mmc/host/sdhci-pltfm.h |2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci

[PATCH v2 4/5] mmc: sdhci-esdhc-imx: fix runtime pm unblance issue

2013-11-04 Thread Dong Aisheng
Since we're using common esdhc_send_command for tuning commands and the core code will call pm_runtime_put after command is finished. So we add a pm_runtime_get_sync here to get the blance. Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers/mmc/host/sdhci-esdhc-imx.c |1 + 1 files

[PATCH v2 5/5] mmc: sdhci-esdhc-imx: add runtime pm support

2013-11-04 Thread Dong Aisheng
The root clock will be disabled in runtime pm which can be used to save power. Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers/mmc/host/sdhci-esdhc-imx.c | 49 +++- 1 files changed, 48 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/host

[PATCH v2 3/5] mmc: sdhci-esdhc-imx: clear SDHCI_CTRL_EXEC_TUNING should not affect other bits

2013-11-04 Thread Dong Aisheng
card. After that, SDHCI_CTRL_EXEC_TUNING will only affect ESDHC_MIX_CTRL_EXE_TUNE. Clearing it does not affect the turned card to remain working on UHS mode. Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers/mmc/host/sdhci-esdhc-imx.c | 24 +--- 1 files changed

Re: Avoid needless loop in sdhci_irq() for Card Interrupt

2013-11-04 Thread Dong Aisheng
to me. But as following community working way, you need send out patches formerly, not attach a diff file. You can refer to 'git send-email' or try with gmail. BTW, please enrich your patch commit message. Regards Dong Aisheng -- To unsubscribe from this list: send the line unsubscribe linux-mmc

Re: [PATCH v2] mmc: core: Remove MMC_CLKGATE

2013-11-04 Thread Dong Aisheng
in runtime PM. Regards Dong Aisheng --- Documentation/mmc/mmc-dev-attrs.txt | 10 -- drivers/mmc/core/Kconfig| 10 -- drivers/mmc/core/core.c | 114 +--- drivers/mmc/core/core.h |3 - drivers/mmc/core/debugfs.c |5 - drivers

Re: [PATCH 5/5] mmc: sdhci-esdhc-imx: add runtime pm support

2013-11-01 Thread Dong Aisheng
On Wed, Oct 30, 2013 at 11:49:19PM +0100, Ulf Hansson wrote: On 30 October 2013 15:12, Dong Aisheng b29...@freescale.com wrote: The root clock will be disabled in runtime pm which can be used to save power. Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers/mmc/host/sdhci

[PATCH v2 0/6] mmc: sdhci-esdhc-imx: fix acmd23 unwork and ddr not supported on sabresd issues

2013-10-30 Thread Dong Aisheng
broken issue in latest Chris' tree. Dong Aisheng (6): mmc: sdhci: clear auto cmd setting bits for no data cmds mmc: sdhci-esdhc-imx: add SDHCI_TRANSFER_MODE read function ARM: dts: sabresd: add usdhc4 support mmc: sdhci-esdhc-imx: fix cpas over write issue mmc: sdhci-esdhc-imx: add

[PATCH v2 1/6] mmc: sdhci: clear auto cmd setting bits for no data cmds

2013-10-30 Thread Dong Aisheng
: unknown partition table mmc2: Timeout waiting for hardware interrupt. mmcblk1boot0: unknown partition table Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers/mmc/host/sdhci.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers

[PATCH v2 6/6] mmc: core: mmc DDR mode should not depend on UHS_DDR50

2013-10-30 Thread Dong Aisheng
The MMC_CAP_UHS_DDR50 must work on 1.8v. However, the eMMC DDR mode can work on either 1.8v or 3.3v and should not depend on UHS_DDR50. So get rid of this limitation to let controller without 1.8v signal voltage support can also work for eMMC DDR mode if it claims. Signed-off-by: Dong Aisheng b29

[PATCH v2 5/6] mmc: sdhci-esdhc-imx: add MMC_CAP_1_8V_DDR for mx6

2013-10-30 Thread Dong Aisheng
The i.MX6 supports 1.8v/3.3v eMMC DDR mode, so add this flag. Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers/mmc/host/sdhci-esdhc-imx.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c

[PATCH v2 3/6] ARM: dts: sabresd: add usdhc4 support

2013-10-30 Thread Dong Aisheng
Add usdhc4 support which has an eMMC card mounted on board. Signed-off-by: Dong Aisheng b29...@freescale.com --- arch/arm/boot/dts/imx6qdl-sabresd.dtsi |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts

[PATCH v2 4/6] mmc: sdhci-esdhc-imx: fix cpas over write issue

2013-10-30 Thread Dong Aisheng
We should use '|=' instead '=', or it may over write the original caps assigned before this line. Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers/mmc/host/sdhci-esdhc-imx.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c

[PATCH v2 2/6] mmc: sdhci-esdhc-imx: add SDHCI_TRANSFER_MODE read function

2013-10-30 Thread Dong Aisheng
Used to read out the correct value of SDHCI_TRANSFER_MODE register for upper layer. Signed-off-by: Dong Aisheng b29...@freescale.com --- drivers/mmc/host/sdhci-esdhc-imx.c | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c

<    1   2   3   4   >