[PATCH] mmc: core: optimize mmc device power up ramp up time

2014-08-18 Thread Yunpeng Gao
In current kernel mmc driver, it uses two 'msleep(10)' for eMMC/SD card power up ramp up time delay. According to Spec, the ramp up time should be max of 74 eMMC/SD bus clock or 1ms. Take the worst eMMC/SD card I can image as the example - assume it has to work on 32KHz or 16KHz during the card

RE: [PATCH] mmc: core: optimize mmc device power up ramp up time

2014-08-18 Thread Dong, Chuanxiao
-Original Message- From: Gao, Yunpeng Sent: Monday, August 18, 2014 2:17 PM To: linux-mmc@vger.kernel.org Cc: Gao, Yunpeng; Dong, Chuanxiao Subject: [PATCH] mmc: core: optimize mmc device power up ramp up time In current kernel mmc driver, it uses two 'msleep(10)' for eMMC/SD

RE: [PATCH] mmc: core: optimize mmc device power up ramp up time

2014-08-18 Thread Gao, Yunpeng
-Original Message- From: Dong, Chuanxiao Sent: Monday, August 18, 2014 2:19 PM To: Gao, Yunpeng; linux-mmc@vger.kernel.org Subject: RE: [PATCH] mmc: core: optimize mmc device power up ramp up time -Original Message- From: Gao, Yunpeng Sent: Monday, August 18, 2014

[PATCH] mmc: sdhci: enable runtime pm for Intel Merrifield platform

2014-08-18 Thread Yunpeng Gao
Enable runtime pm support on Intel Merrifield platform. Signed-off-by: Yunpeng Gao yunpeng@intel.com --- drivers/mmc/host/sdhci-pci.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index 52c42fc..1b50a4a 100644 ---

[PATCH] mmc: sdhci-pci: disable preset register for Baytrail and Merrifield

2014-08-18 Thread Yunpeng Gao
Due to HW issue, SDHCI host controller on Intel Baytrail/Merrifield platforms can not use preset register. So, disable preset registers for them by quirks. Signed-off-by: Yunpeng Gao yunpeng@intel.com Signed-off-by: Chuanxiao Dong chuanxiao.d...@intel.com --- drivers/mmc/host/sdhci-pci.c |

Re: [PATCH] mmc: au1xmmc: fix error return code in au1xmmc_probe()

2014-08-18 Thread Ulf Hansson
On 14 August 2014 03:00, weiyj...@163.com wrote: From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn Thanks! Applied for

Re: [PATCH] mmc: sdhci: check 1.2v IO capability for SDHC host

2014-08-18 Thread Ulf Hansson
On 14 August 2014 12:05, Chuanxiao Dong chuanxiao.d...@intel.com wrote: Right now enable 1.2v IO voltage for SDHC is by using vqmmc. Thus for the host which doesn't have vqmmc, or its vqmmc does not support 1.2v, directly use MMC_CAP2_HS200 may cause HS200 failure. So needs to check if vqmmc

Re: [PATCH 1/2] mmc: rtsx_pci_sdmmc: fix incorrect last byte in R2 response

2014-08-18 Thread Ulf Hansson
On 15 August 2014 08:06, rogera...@realtek.com wrote: From: Roger Tseng rogera...@realtek.com Current code erroneously fill the last byte of R2 response with an undefined value. In addition, the controller actually 'offloads' the last byte (CRC7, end bit) while receiving R2 response and thus

Re: [PATCH 2/2] mmc: rtsx_usb_sdmmc: fix incorrect last byte in R2 response

2014-08-18 Thread Ulf Hansson
On 15 August 2014 08:06, rogera...@realtek.com wrote: From: Roger Tseng rogera...@realtek.com Current code erroneously fill the last byte of R2 response with an undefined value. In addition, the controller actually 'offloads' the last byte (CRC7, end bit) while receiving R2 response and thus

Re: [PATCH] mmc: core: resolve divded by zero panic

2014-08-18 Thread Ulf Hansson
On 14 August 2014 12:29, Yunpeng Gao yunpeng@intel.com wrote: From: Chuanxiao Dong chuanxiao.d...@intel.com With one special SD card, below divide by zero error observed: ... [2.144300] divide error: [#1] PREEMPT SMP [2.148860] Modules linked in: [2.151898] [

[PATCH] mmc: core: sd: check card write-protect lock while resuming

2014-08-18 Thread Barry Song
From: Minda Chen minda.c...@csr.com After suspending, unplug the sdcard, and set sd WP lock, insert it again, then resume the system. resume codes do not check the the sdcard write-proctect lock. now check it. Signed-off-by: Minda Chen minda.c...@csr.com Signed-off-by: Barry Song

[PATCH v2 0002/0002] mmc: check EXT_CSD_PARTITION_SETTING_COMPLETED before creating partitions

2014-08-18 Thread Grégory Soutadé
Checks EXT_CSD_PARTITION_SETTING_COMPLETED bit before computing enhanced user area and adding mmc partitions (as described in JEDEC standard). Signed-off-by: Grégory Soutadé gsout...@neotion.com --- drivers/mmc/core/mmc.c | 167 +++- 1 file changed,

Re: [RFC PATCH 1/1 v8]mmc: Support-FFU-for-eMMC-v5.0

2014-08-18 Thread Ulf Hansson
On 14 August 2014 14:37, Alex Lemberg alex.lemb...@sandisk.com wrote: Hi Ulf, -Original Message- From: Ulf Hansson [mailto:ulf.hans...@linaro.org] Sent: Wednesday, August 13, 2014 3:47 PM To: Avi Shchislowski; Grant Grundler; Alex Lemberg Cc: linux-mmc@vger.kernel.org;

Re: [PATCH 1/4] mmc: slot-gpio: switch to use flags when getting GPIO

2014-08-18 Thread Ulf Hansson
On 12 August 2014 19:25, Linus Walleij linus.wall...@linaro.org wrote: When the slot GPIO driver gets the GPIO to be used for card detect, it is now possible to specify a flag to have the line set up as input. Get rid of the explicit setup call for input and use the flag. The extra argument

Re: [PATCH 1/2] sdhci : handle busy timeout irq

2014-08-18 Thread Ulf Hansson
On 14 August 2014 16:03, Matthieu CASTET matthieu.cas...@parrot.com wrote: When we wait for busy after sending a command, if there is a timeout, we got SDHCI_INT_DATA_TIMEOUT flags. Before this commit we got the message : Got data interrupt 0x0010 even though no data operation was in

Re: [PATCH 2/2] sdhci : recompute timeout_clk when needed

2014-08-18 Thread Ulf Hansson
On 14 August 2014 16:03, Matthieu CASTET matthieu.cas...@parrot.com wrote: when SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK is set, timeout_clk is sdclk. We need to update it when we change sdclk in sdhci_set_clock. This allow to have a more precisse timeout and max_busy_timeout. This can help for

Re: [PATCH 2/4] mmc: slot-gpio: add gpiod variant to get wp GPIO

2014-08-18 Thread Ulf Hansson
On 12 August 2014 19:25, Linus Walleij linus.wall...@linaro.org wrote: This makes it possible to get the write protect (read only) GPIO line from a GPIO descriptor. Written to exactly mirror the card detect function. Cc: Alexandre Courbot gnu...@gmail.com Signed-off-by: Linus Walleij

Re: [PATCH v2 1/2] mmc: dw_mmc: Add dependency on DMA

2014-08-18 Thread Ulf Hansson
On 14 August 2014 18:45, Andrew Bresticker abres...@chromium.org wrote: The dw_mmc drivers rely on the DMA API, so update the Kconfig entry to depend on HAS_DMA. Since the drivers should build on any platform with DMA, allow the driver to compile tested on non-ARC/ARM platforms.

Re: [PATCH v2 2/2] mmc: dw_mmc: Add support for MIPS

2014-08-18 Thread Ulf Hansson
On 14 August 2014 18:45, Andrew Bresticker abres...@chromium.org wrote: There are upcoming MIPS SoCs with dw_mmc hosts. Signed-off-by: Andrew Bresticker abres...@chromium.org Thanks! Applied for next. Kind regards Uffe --- drivers/mmc/host/Kconfig | 2 +- 1 file changed, 1 insertion(+),

Re: [PATCH] mmc: core: sd: check card write-protect lock while resuming

2014-08-18 Thread Ulf Hansson
On 18 August 2014 12:00, Barry Song barry.s...@csr.com wrote: From: Minda Chen minda.c...@csr.com After suspending, unplug the sdcard, and set sd WP lock, insert it again, then resume the system. resume codes do not check the the sdcard write-proctect lock. now check it. Signed-off-by:

Re: [PATCH] mmc: core: sdio: Fix unconditional wake_up_process() on sdio thread

2014-08-18 Thread Ulf Hansson
On 18 August 2014 05:04, Fu, Zhonghui zhonghui...@linux.intel.com wrote: From 21266249bbbaf9407c1e88cd5950e06ac88aeebf Mon Sep 17 00:00:00 2001 From: Fu Zhonghui zhonghui...@linux.intel.com Date: Mon, 18 Aug 2014 10:48:14 +0800 Subject: [PATCH] mmc: core: sdio: Fix unconditional

Re: [PATCH v2 0002/0002] mmc: check EXT_CSD_PARTITION_SETTING_COMPLETED before creating partitions

2014-08-18 Thread Ulf Hansson
On 18 August 2014 12:50, Grégory Soutadé gsout...@neotion.com wrote: Checks EXT_CSD_PARTITION_SETTING_COMPLETED bit before computing enhanced user area and adding mmc partitions (as described in JEDEC standard). Signed-off-by: Grégory Soutadé gsout...@neotion.com Hi Grégory, First, could

Re: [PATCHv10 3/5] ARM: dts: exynos: unuse the slot-node and deprecate the supports-highspeed for dw-mmc

2014-08-18 Thread Jaehoon Chung
Hi, Kukjin. Socfpga and Rockchip were queued into each SoC tree. I want to know whether this patch is queued or not into Samsung-Soc tree. Do you have any other plan for this patch? Best Regards, Jaehoon Chung On 08/07/2014 04:38 PM, Jaehoon Chung wrote: dw-mmc controller can support multiple

Re: [PATCH] mmc: tmio: Fix hang during suspend

2014-08-18 Thread Geert Uytterhoeven
Hi Ian, On Fri, Aug 15, 2014 at 2:49 PM, Ian Molton ian.mol...@codethink.co.uk wrote: On Thu, 14 Aug 2014 17:23:53 +0200 Geert Uytterhoeven geert+rene...@glider.be wrote: On R-Car Gen 2, the SDHI registers cannot be accessed while the SDHI module clock is disabled. Doing so will cause a

Re: [PATCH 0/5] MMC cleanup of dev_pm_ops and .owner

2014-08-18 Thread Ulf Hansson
On 12 August 2014 18:14, Peter Griffin peter.grif...@linaro.org wrote: This series cleans up a few platform drivers in how they are declaring there dev_pm_ops structs, and gets rid of a few now redundant #else conditions. Also it removes the .owner field of drivers which use

Re: [PATCH] mmc: tmio: Fix hang during suspend

2014-08-18 Thread Ulf Hansson
On 18 August 2014 14:36, Geert Uytterhoeven ge...@linux-m68k.org wrote: Hi Ian, On Fri, Aug 15, 2014 at 2:49 PM, Ian Molton ian.mol...@codethink.co.uk wrote: On Thu, 14 Aug 2014 17:23:53 +0200 Geert Uytterhoeven geert+rene...@glider.be wrote: On R-Car Gen 2, the SDHI registers cannot be

[PATCH v3 0001/0002] mmc: Replace ext_csd enhanced_area_en attribute by partition_setting_completed

2014-08-18 Thread Grégory Soutadé
Replace ext_csd enhanced_area_en attribute by partition_setting_completed. It was used whether or not enhanced user area is defined and without checks of EXT_CSD_PARTITION_SETTING_COMPLETED bit. Signed-off-by: Grégory Soutadé gsout...@neotion.com --- drivers/mmc/core/mmc.c |8 +++-

[PATCH v3 0002/0002] mmc: Checks EXT_CSD_PARTITION_SETTING_COMPLETED bit before partitions computation

2014-08-18 Thread Grégory Soutadé
Checks EXT_CSD_PARTITION_SETTING_COMPLETED bit before computing enhanced user area offset and size, and adding mmc general purpose partitions. The two needs EXT_CSD_PARTITION_SETTING_COMPLETED bit be set to be valid (as described in JEDEC standard). Signed-off-by: Grégory Soutadé

Re: [PATCHv10 3/5] ARM: dts: exynos: unuse the slot-node and deprecate the supports-highspeed for dw-mmc

2014-08-18 Thread Andreas Färber
Hi Jaehoon, Am 18.08.2014 14:23, schrieb Jaehoon Chung: Socfpga and Rockchip were queued into each SoC tree. I want to know whether this patch is queued or not into Samsung-Soc tree. Do you have any other plan for this patch? It isn't applied in his tree:

Re: [PATCH 1/1] mmc: core: Use regulator_get_voltage() if OCR mask is empty.

2014-08-18 Thread Mark Brown
On Sun, Aug 17, 2014 at 10:11:30AM -0700, Tim Kryger wrote: On Fri, Aug 15, 2014 at 3:29 PM, Mark Brown broo...@kernel.org wrote: Nobody has written suitable code, and please bear in mind that even if the code is written there will probably be cases where it's too expensive for whatever

Re: [ulf.hansson-mmc:next 17/28] drivers/mmc/core/slot-gpio.c:311:57: error: 'GPIOD_IN' undeclared

2014-08-18 Thread Ulf Hansson
On 18 August 2014 16:21, Linus Walleij linus.wall...@linaro.org wrote: On Mon, Aug 18, 2014 at 8:40 AM, kbuild test robot fengguang...@intel.com wrote: drivers/mmc/core/slot-gpio.c: In function 'mmc_gpiod_request_cd': drivers/mmc/core/slot-gpio.c:311:57: error: 'GPIOD_IN' undeclared (first

[PATCH] mmc: select GPIOLIB for MMC support

2014-08-18 Thread Linus Walleij
The slot-gpio support has been compiled into the core for some time, and it basically requires GPIOLIB to be present, very few systems are using the archaic GPIO API (just defined function names) and those should be migrated to GPIOLIB anyway. The rewrite to use GPIO descriptors require that we

Re: sdhci_s3c_consider_clock scheduling while atomic - clk_round_rate

2014-08-18 Thread Mike Turquette
On Tue, Jun 24, 2014 at 8:52 AM, Tomasz Figa t.f...@samsung.com wrote: Hi Daniel, [adding Ulf, Chris and Mike to the discussion] On 24.06.2014 11:48, Daniel Drake wrote: sdhci_s3c_set_clock is called from sdhci_do_set_ios with interrupts disabled, and this calls into

Re: [PATCH] mmc: select GPIOLIB for MMC support

2014-08-18 Thread Ulf Hansson
On 18 August 2014 17:20, Linus Walleij linus.wall...@linaro.org wrote: The slot-gpio support has been compiled into the core for some time, and it basically requires GPIOLIB to be present, very few systems are using the archaic GPIO API (just defined function names) and those should be

Re: [PATCHv10 3/5] ARM: dts: exynos: unuse the slot-node and deprecate the supports-highspeed for dw-mmc

2014-08-18 Thread Kukjin Kim
On 08/18/14 09:10, Andreas Färber wrote: Hi Jaehoon, Am 18.08.2014 14:23, schrieb Jaehoon Chung: Socfpga and Rockchip were queued into each SoC tree. I want to know whether this patch is queued or not into Samsung-Soc tree. Do you have any other plan for this patch? It isn't applied in his

RE: [PATCH v2] mmc: execute tuning when device is not busy.

2014-08-18 Thread Sun, Yi Y
Hi, Uffe, Could you please review the patch? Thanks! BRs, Sun Yi -Original Message- From: Sun, Yi Y Sent: Thursday, August 14, 2014 1:52 PM To: linux-mmc@vger.kernel.org; ulf.hans...@linaro.org Cc: Sun, Yi Y Subject: [PATCH v2] mmc: execute tuning when device is not busy. We find

[PATCH v2] mmc: dw_mmc: move rockchip related code to a separate file

2014-08-18 Thread Addy Ke
To support HS200 and UHS-1, we need add a big hunk of code, as shown in the following patches. So a separate file for rockchip SOCs is suitable. Signed-off-by: Addy Ke addy...@rock-chips.com --- Changes in v2: - Kconfig: depend on ARCH_ROCKCHIP, suggested by Bartlomiej Zolnierkiewicz - Kconfig:

Re: [PATCH v2] mmc: dw_mmc: move rockchip related code to a separate file

2014-08-18 Thread Jaehoon Chung
Acked-by: Jaehoon Chung jh80.ch...@samsung.com Best Regards, Jaehoon Chung On 08/19/2014 01:36 PM, Addy Ke wrote: To support HS200 and UHS-1, we need add a big hunk of code, as shown in the following patches. So a separate file for rockchip SOCs is suitable. Signed-off-by: Addy Ke

Re: [PATCH V2] mmc: sdhci: check 1.2v IO capability for SDHC host

2014-08-18 Thread Jaehoon Chung
Hi, Dong. Doesn't it need to consider for HS400 mode? Best Regards, Jaehoon Chung On 08/19/2014 12:02 PM, Chuanxiao Dong wrote: Right now enable 1.2v IO voltage for SDHC is by using vqmmc. Thus for the host which doesn't have vqmmc, or its vqmmc does not support 1.2v, directly use

RE: [PATCH V2] mmc: sdhci: check 1.2v IO capability for SDHC host

2014-08-18 Thread Dong, Chuanxiao
-Original Message- From: Jaehoon Chung [mailto:jh80.ch...@samsung.com] Sent: Tuesday, August 19, 2014 1:14 PM To: Dong, Chuanxiao; ulf.hans...@linaro.org; ch...@printf.org Cc: linux-mmc@vger.kernel.org Subject: Re: [PATCH V2] mmc: sdhci: check 1.2v IO capability for SDHC host