[PATCH v2 1/2] mmc: dw_mmc: Check return value of regulator_enable

2013-04-04 Thread Sachin Kamat
regulator_enable() is declared with __must_check attribute. Hence check the return value to ensure that the regulator is enabled. Fixes the following warning: drivers/mmc/host/dw_mmc.c:2461:19: warning: ignoring return value of ‘regulator_enable’, declared with attribute warn_unused_result

[PATCH v2 2/2] mmc: dw_mmc: Use pr_info instead of printk

2013-04-04 Thread Sachin Kamat
pr_info(... is preferred to printk(KERN_INFO ... Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Acked-by: Jaehoon Chung jh80.ch...@samsung.com Acked-by: Seungwon Jeon tgih@samsung.com --- No change since v1 --- drivers/mmc/host/dw_mmc.c |2 +- 1 file changed, 1 insertion(+), 1

RE: [PATCH v2 1/2] mmc: dw_mmc: Check return value of regulator_enable

2013-04-04 Thread Seungwon Jeon
On Thursday, April 04, 2013, Sachin Kamat wrote: regulator_enable() is declared with __must_check attribute. Hence check the return value to ensure that the regulator is enabled. Fixes the following warning: drivers/mmc/host/dw_mmc.c:2461:19: warning: ignoring return value of

Re: [PATCH v2] wait while adding MMC host to ensure root mounts

2013-04-04 Thread Adrian Hunter
On 02/04/13 17:24, Sergey Yanovich wrote: On Tue, 2013-04-02 at 16:36 +0300, Adrian Hunter wrote: On my system it is significant: Before the patch: [1.625623] VFS: Mounted root (ext4 filesystem) readonly on device 179:2. After the patch: [1.935851] VFS: Mounted root (ext4

Re: [PATCH 1/3] mmc: core: Remove power_restore bus_ops for mmc and sd

2013-04-04 Thread Adrian Hunter
On 01/03/13 14:47, Ulf Hansson wrote: From: Ulf Hansson ulf.hans...@linaro.org The mmc_power_restore|save_host API is only used by SDIO func drivers. SDIO NAK - it is also used by eMMC hardware reset i.e. mmc_do_hw_reset() func drivers are also moving towards use of runtime pm to accomplish

Re: [PATCH] mmc: core: restore ocr and operation voltage in resume

2013-04-04 Thread Prasanna NAVARATNA
Kevin Liu kliu5 at marvell.com writes: host-ocr has been reset in power off but not restored after power up in resume. And operation voltage will be set to the highest after resume back. This patch fix these two bugs. Signed-off-by: Kevin Liu kliu5 at marvell.com ---

Re: [PATCH 1/3] mmc: core: Remove power_restore bus_ops for mmc and sd

2013-04-04 Thread Ulf Hansson
On 4 April 2013 10:46, Adrian Hunter adrian.hun...@intel.com wrote: On 01/03/13 14:47, Ulf Hansson wrote: From: Ulf Hansson ulf.hans...@linaro.org The mmc_power_restore|save_host API is only used by SDIO func drivers. SDIO NAK - it is also used by eMMC hardware reset i.e. mmc_do_hw_reset()

Re: [PATCH] mmc: core: restore ocr and operation voltage in resume

2013-04-04 Thread Ulf Hansson
On 4 April 2013 11:44, Prasanna NAVARATNA prasanna.navara...@gmail.com wrote: Kevin Liu kliu5 at marvell.com writes: host-ocr has been reset in power off but not restored after power up in resume. And operation voltage will be set to the highest after resume back. This patch fix these two

Re: [PATCH] mmc: core: restore ocr and operation voltage in resume

2013-04-04 Thread Prasanna NAVARATNA
Ulf Hansson ulf.hansson at linaro.org writes: On 4 April 2013 11:44, Prasanna NAVARATNA prasanna.navaratna at gmail.com wrote: Kevin Liu kliu5 at marvell.com writes: host-ocr has been reset in power off but not restored after power up in resume. And operation voltage will be set to

Re: [PATCH v2] wait while adding MMC host to ensure root mounts

2013-04-04 Thread Sergey Yanovich
On Thu, 2013-04-04 at 09:35 +0300, Adrian Hunter wrote: No, I am booting from eMMC. Well, in this case you should be aware, that your system is not concurrency-safe without the patch. It may or may not boot each time depending on the large number of factors. Maybe introduce

Re: [PATCH v2] wait while adding MMC host to ensure root mounts

2013-04-04 Thread Adrian Hunter
On 04/04/13 13:59, Sergey Yanovich wrote: On Thu, 2013-04-04 at 09:35 +0300, Adrian Hunter wrote: No, I am booting from eMMC. Well, in this case you should be aware, that your system is not concurrency-safe without the patch. It may or may not boot each time depending on the large number

Re: [PATCH 1/3] mmc: core: Remove power_restore bus_ops for mmc and sd

2013-04-04 Thread Adrian Hunter
On 04/04/13 12:55, Ulf Hansson wrote: On 4 April 2013 10:46, Adrian Hunter adrian.hun...@intel.com wrote: On 01/03/13 14:47, Ulf Hansson wrote: From: Ulf Hansson ulf.hans...@linaro.org The mmc_power_restore|save_host API is only used by SDIO func drivers. SDIO NAK - it is also used by eMMC

Re: [PATCH] mmc: core: restore ocr and operation voltage in resume

2013-04-04 Thread Ulf Hansson
On 4 April 2013 12:43, Prasanna NAVARATNA prasanna.navara...@gmail.com wrote: Ulf Hansson ulf.hansson at linaro.org writes: On 4 April 2013 11:44, Prasanna NAVARATNA prasanna.navaratna at gmail.com wrote: Kevin Liu kliu5 at marvell.com writes: host-ocr has been reset in power off but

Re: [PATCH 1/3] mmc: core: Remove power_restore bus_ops for mmc and sd

2013-04-04 Thread Ulf Hansson
On 4 April 2013 13:44, Adrian Hunter adrian.hun...@intel.com wrote: On 04/04/13 12:55, Ulf Hansson wrote: On 4 April 2013 10:46, Adrian Hunter adrian.hun...@intel.com wrote: On 01/03/13 14:47, Ulf Hansson wrote: From: Ulf Hansson ulf.hans...@linaro.org The mmc_power_restore|save_host API is

Re: [PATCH 1/3] mmc: core: Remove power_restore bus_ops for mmc and sd

2013-04-04 Thread Adrian Hunter
On 04/04/13 14:52, Ulf Hansson wrote: On 4 April 2013 13:44, Adrian Hunter adrian.hun...@intel.com wrote: On 04/04/13 12:55, Ulf Hansson wrote: On 4 April 2013 10:46, Adrian Hunter adrian.hun...@intel.com wrote: On 01/03/13 14:47, Ulf Hansson wrote: From: Ulf Hansson ulf.hans...@linaro.org

Re: [PATCH] mmc: core: restore ocr and operation voltage in resume

2013-04-04 Thread Prasanna NAVARATNA
So you agree the ocr mask must not be reset during suspend. The patch over here exactly addresses the problem which you stated :- mmc core should tell the host driver to use the properly negotiated ocr mask to set the voltage level, both at initialization and at resume The patch saves the ocr

Re: [PATCH v2] wait while adding MMC host to ensure root mounts

2013-04-04 Thread Sergey Yanovich
On Thu, 2013-04-04 at 14:35 +0300, Adrian Hunter wrote: On 04/04/13 13:59, Sergey Yanovich wrote: On Thu, 2013-04-04 at 09:35 +0300, Adrian Hunter wrote: No, I am booting from eMMC. Well, in this case you should be aware, that your system is not concurrency-safe without the patch. It

[PATCH 0/2] sdhci-acpi initialization performance regression

2013-04-04 Thread Adrian Hunter
Hi When I submitted the sdhci-acpi driver, it's initialization performance was satisfactory. Now it is not. Here are 2 fixes to restore that regression. Adrian Hunter (2): Revert mmc: core: wait while adding MMC host to ensure root mounts successfully mmc: core: fix performance

[PATCH 1/2] Revert mmc: core: wait while adding MMC host to ensure root mounts successfully

2013-04-04 Thread Adrian Hunter
This reverts commit 3500ed90b26a9935b943b5e2e4cd3226600d6b58. The reverted patch caused a significant performance regression when booting with the root file system on eMMC. Before the patch: [1.625623] VFS: Mounted root (ext4 filesystem) readonly on device 179:2. After the patch: [

[PATCH 2/2] mmc: core: fix performance regression initializing MMC host controllers

2013-04-04 Thread Adrian Hunter
Commit fa5501890d8974301042e0202d342a6cbe8609f4 introduced a performance regression by adding mmc_power_up() to mmc_start_host(). mmc_power_up() is not necessary to host controller initialization, it is part of card initialization and is performed anyway asynchronously. This patch allows a

Re: [PATCH 1/2] Revert mmc: core: wait while adding MMC host to ensure root mounts successfully

2013-04-04 Thread Sergey Yanovich
On Thu, 2013-04-04 at 16:41 +0300, Adrian Hunter wrote: diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index ad7decc..3bf1c46 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2418,7 +2418,6 @@ void mmc_start_host(struct mmc_host *host)

Re: [PATCH RESEND] mmc: dw_mmc: fix fifo access for 64-bit

2013-04-04 Thread Chris Ball
Hi, On Mon, Mar 25 2013, Seungwon Jeon wrote: mci_writew causes a failure of fifo access for 64-bit. mci_writeq is correct. Signed-off-by: Seungwon Jeon tgih@samsung.com --- drivers/mmc/host/dw_mmc.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git

Re: [PATCH 0/4] mmc: sdhci-pxav3: misc enhancements

2013-04-04 Thread Chris Ball
Hi, Trimmed CC -- Kevin, please stop CC'ing so many people personally on these patches. That's what the mailing list's for. On Tue, Apr 02 2013, Haojian Zhuang wrote: On Mon, Mar 25, 2013 at 5:42 PM, Kevin Liu kl...@marvell.com wrote: This patchset aim to enhance sdhci-pxav3 with below

Re: [PATCH 2/2] mmc: mxs-mmc: add non-removeable property

2013-04-04 Thread Chris Ball
Hi, On Mon, Mar 25 2013, Marc Kleine-Budde wrote: + host-non_removeable = of_property_read_bool(np, non-removable); + if (host-non_removeable) + mmc-caps |= MMC_CAP_NONREMOVABLE; The correct spelling is non_removable, as used in the DT property. Thanks, - Chris. --

Re: [PATCH] mmc: dw-mmc: control the power-enable register

2013-04-04 Thread Chris Ball
Hi, On Thu, Apr 04 2013, Seungwon Jeon wrote: On Wednesday, March 27, 2013, James Hogan wrote: On 26/03/13 12:36, Jaehoon Chung wrote: When card is power-on/off, need to control the power-enable register. Signed-off-by: Jaehoon Chung jh80.ch...@samsung.com Signed-off-by: Kyungmin Park

Re: [PATCH 2/2] mmc: sdhci-spear: add CONFIG_PM_SLEEP to suspend/resume functions

2013-04-04 Thread Chris Ball
Hi, On Fri, Mar 29 2013, Viresh Kumar wrote: On Fri, Mar 29, 2013 at 12:38 PM, Jingoo Han jg1@samsung.com wrote: Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following build warning when CONFIG_PM_SLEEP is not selected. This is because sleep PM callbacks defined by

Re: [PATCH v2 1/2] mmc: dw_mmc: Check return value of regulator_enable

2013-04-04 Thread Chris Ball
Hi, On Thu, Apr 04 2013, Seungwon Jeon wrote: On Thursday, April 04, 2013, Sachin Kamat wrote: regulator_enable() is declared with __must_check attribute. Hence check the return value to ensure that the regulator is enabled. Fixes the following warning: drivers/mmc/host/dw_mmc.c:2461:19:

Re: [PATCH v1] mmc: card: Adding support for sanitize in eMMC 4.5

2013-04-04 Thread Chris Ball
Hi Yaniv, Maya, On Mon, Mar 11 2013, Luca Porzio (lporzio) wrote: In case of Sanitize timeout, the eMMC might go in an unclear state. May I suggest to: - issue an HPI before leaving thus bring the eMMC back into safe status - report the 'sanitize not complete error' and let the user decide on

Re: [PATCH 2/2] mmc: mxs-mmc: add non-removeable property

2013-04-04 Thread Marc Kleine-Budde
On 04/04/2013 04:07 PM, Chris Ball wrote: Hi, On Mon, Mar 25 2013, Marc Kleine-Budde wrote: +host-non_removeable = of_property_read_bool(np, non-removable); +if (host-non_removeable) +mmc-caps |= MMC_CAP_NONREMOVABLE; The correct spelling is non_removable, as used in

mmc: core: negotiate ocr during resume

2013-04-04 Thread Prasanna NAVARATNA
From f43005e05f1e9d93705ec6b3ab98cfa5215c1896 Mon Sep 17 00:00:00 2001 From: Prasanna NAVARATNA prasanna.navara...@broadcom.com Date: Thu, 4 Apr 2013 19:55:19 +0530 Subject: [PATCH] mmc: core: negotiate ocr during resume Save the card ocr into struct mmc_card when read from sd card and negotiate

Re: [PATCH] mmc: core: restore ocr and operation voltage in resume

2013-04-04 Thread Prasanna NAVARATNA
Prasanna NAVARATNA prasanna.navaratna at gmail.com writes: So you agree the ocr mask must not be reset during suspend. The patch over here exactly addresses the problem which you stated :- mmc core should tell the host driver to use the properly negotiated ocr mask to set the voltage

Re: [PATCH 1/3] mmc: core: Remove power_restore bus_ops for mmc and sd

2013-04-04 Thread Ulf Hansson
On 4 April 2013 14:00, Adrian Hunter adrian.hun...@intel.com wrote: On 04/04/13 14:52, Ulf Hansson wrote: On 4 April 2013 13:44, Adrian Hunter adrian.hun...@intel.com wrote: On 04/04/13 12:55, Ulf Hansson wrote: On 4 April 2013 10:46, Adrian Hunter adrian.hun...@intel.com wrote: On 01/03/13

Re: [PATCH] mmc: core: restore ocr and operation voltage in resume

2013-04-04 Thread Ulf Hansson
On 4 April 2013 16:43, Prasanna NAVARATNA prasanna.navara...@gmail.com wrote: Prasanna NAVARATNA prasanna.navaratna at gmail.com writes: So you agree the ocr mask must not be reset during suspend. The patch over here exactly addresses the problem which you stated :- mmc core should tell the

[PATCH V2 1/2] mmc: core: Add bus_ops for runtime pm callbacks

2013-04-04 Thread Ulf Hansson
From: Ulf Hansson ulf.hans...@linaro.org SDIO is the only protocol that uses runtime pm for the card device right now. To provide the option for sd and mmc to use runtime pm as well the bus_ops callback are extended with two new functions. One for runtime_suspend and one for runtime_resume. This

[PATCH V2 0/2] mmc: Use runtime pm for blkdevice

2013-04-04 Thread Ulf Hansson
From: Ulf Hansson ulf.hans...@linaro.org SDIO has been using runtime pm for a while to handle runtime power save operations. This patchset is enabling the option to make the sd/mmc blockdevices to use runtime pm as well. The runtime pm implementation for the block device will make use of

Re: When bus width detection procedure takes place, kernel cannot lock on correct bus width

2013-04-04 Thread Chris Ball
From: Philip Rakity prak...@yahoo.com Subject: [PATCH] mmc: core: Fix bit width test failing on old eMMC cards PARTITION_SUPPORT needs to be set before doing the compare on version number so the bit width test does not get invalid data. Before this patch, a Sandisk iNAND eMMC card would detect

Re: [PATCH 1/3i v6] MMC/SD: Add callback function to detect card

2013-04-04 Thread Ulf Hansson
On 25 March 2013 16:27, Kevin Liu keyuan@gmail.com wrote: 2013/3/25 Ulf Hansson ulf.hans...@linaro.org: On 22 March 2013 16:27, Kevin Liu keyuan@gmail.com wrote: 2013/3/22 Ulf Hansson ulf.hans...@linaro.org: On 22 March 2013 08:42, Huang Changming-R66093 r66...@freescale.com wrote:

Re: [PATCH 2/2] mmc: core: fix performance regression initializing MMC host controllers

2013-04-04 Thread Ulf Hansson
On 4 April 2013 15:41, Adrian Hunter adrian.hun...@intel.com wrote: Commit fa5501890d8974301042e0202d342a6cbe8609f4 introduced a performance regression by adding mmc_power_up() to mmc_start_host(). mmc_power_up() is not necessary to host controller initialization, it is part of card

Re: [PATCH] mmc: dw-mmc: control the power-enable register

2013-04-04 Thread Jaehoon Chung
Thanks Chris.. I will send the patch as dw_mmc in future. Best Regards, Jaehoon Chung On 04/04/2013 11:09 PM, Chris Ball wrote: Hi, On Thu, Apr 04 2013, Seungwon Jeon wrote: On Wednesday, March 27, 2013, James Hogan wrote: On 26/03/13 12:36, Jaehoon Chung wrote: When card is

[PATCH] mmc: mxs-mmc: Add support for non-removable cards

2013-04-04 Thread Alexandre Pereira da Silva
Some boards and card slots doesn't have card detect feature available. In that case allow to mark the cards as non-removable, via devicetree. Signed-off-by: Alexandre Pereira da Silva aletes@gmail.com --- drivers/mmc/host/mxs-mmc.c |6 ++ 1 file changed, 6 insertions(+) diff --git