public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] mmc: sdhci: fixes and enhancements
@ 2012-09-19  2:12 Kevin Liu
  2012-09-19  2:12 ` [PATCH 1/6] mmc: sdhci-pxav3: fix build error Kevin Liu
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Kevin Liu @ 2012-09-19  2:12 UTC (permalink / raw)
  To: linux-mmc, cjb, pierre; +Cc: hzhuang1, cxie4, prakity, kliu5


This patchset does as follows:
[PATCH 1/6] mmc: sdhci-pxav3: fix build error
[PATCH 2/6] mmc: sdhci: fix transfer mode setting bug for cmds w/o data transfer
[PATCH 3/6] mmc: sdhci: set regulator min/max voltage according to spec
[PATCH 4/6] mmc: sdhci: refine code for sd clock disable/enable in set ios
[PATCH 5/6] mmc: sdhci: keep the saved clock var up to date
[PATCH 6/6] mmc: sdhci: fix null return check of regulator_get

Kevin Liu (6):
 mmc: sdhci-pxav3: fix build error
 mmc: sdhci: fix transfer mode setting bug for cmds w/o data transfer
 mmc: sdhci: set regulator min/max voltage according to spec
 mmc: sdhci: refine code for sd clock disable/enable in set ios
 mmc: sdhci: keep the saved clock var up to date
 mmc: sdhci: fix null return check of regulator_get

 drivers/mmc/host/sdhci-pxav3.c |    2 +
 drivers/mmc/host/sdhci.c       |   79 ++++++++++++++++++++--------------------
 2 files changed, 41 insertions(+), 40 deletions(-)


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/6] mmc: sdhci-pxav3: fix build error
  2012-09-19  2:12 [PATCH 0/6] mmc: sdhci: fixes and enhancements Kevin Liu
@ 2012-09-19  2:12 ` Kevin Liu
  2012-09-19  2:47   ` Chris Ball
  2012-09-19  2:12 ` [PATCH 2/6] mmc: sdhci: fix transfer mode setting bug for cmds w/o data transfer Kevin Liu
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 11+ messages in thread
From: Kevin Liu @ 2012-09-19  2:12 UTC (permalink / raw)
  To: linux-mmc, cjb, pierre; +Cc: hzhuang1, cxie4, prakity, kliu5

From: Kevin Liu <kliu5@marvell.com>

Commit 18c75479 introduced build error with slot-gpio.h missing
and pdata undeclared

Signed-off-by: Kevin Liu <kliu5@marvell.com>
---
 drivers/mmc/host/sdhci-pxav3.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
index 223a5d4..f69d6c1 100644
--- a/drivers/mmc/host/sdhci-pxav3.c
+++ b/drivers/mmc/host/sdhci-pxav3.c
@@ -30,6 +30,7 @@
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
+#include <linux/mmc/slot-gpio.h>
 
 #include "sdhci.h"
 #include "sdhci-pltfm.h"
@@ -317,6 +318,7 @@ static int __devexit sdhci_pxav3_remove(struct platform_device *pdev)
 	struct sdhci_host *host = platform_get_drvdata(pdev);
 	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
 	struct sdhci_pxa *pxa = pltfm_host->priv;
+	struct sdhci_pxa_platdata *pdata = pdev->dev.platform_data;
 
 	sdhci_remove_host(host, 1);
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/6] mmc: sdhci: fix transfer mode setting bug for cmds w/o data transfer
  2012-09-19  2:12 [PATCH 0/6] mmc: sdhci: fixes and enhancements Kevin Liu
  2012-09-19  2:12 ` [PATCH 1/6] mmc: sdhci-pxav3: fix build error Kevin Liu
@ 2012-09-19  2:12 ` Kevin Liu
  2012-09-19  2:12 ` [PATCH 3/6] mmc: sdhci: set regulator min/max voltage according to spec Kevin Liu
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Kevin Liu @ 2012-09-19  2:12 UTC (permalink / raw)
  To: linux-mmc, cjb, pierre
  Cc: hzhuang1, cxie4, prakity, kliu5, Jialing Fu, Tim Wang

From: Kevin Liu <kliu5@marvell.com>

Commands without data transfer like cmd5/cmd7 will use previous
transfer mode setting, which may lead to error since some bits
may have been set unexpectedly.
For example, cmd5 following cmd18/cmd25 will have timeout error
since audo cmd23 has been enabled.

Signed-off-by: Jialing Fu <jlfu@marvell.com>
Signed-off-by: Tim Wang <wangtt@marvell.com>
Signed-off-by: Kevin Liu <kliu5@marvell.com>
---
 drivers/mmc/host/sdhci.c |   22 ++++++++++++++--------
 1 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 0e15c79..2f844e5 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -886,8 +886,21 @@ static void sdhci_set_transfer_mode(struct sdhci_host *host,
 	u16 mode;
 	struct mmc_data *data = cmd->data;
 
-	if (data == NULL)
+	if (data == NULL) {
+		if (cmd->opcode == MMC_SEND_TUNING_BLOCK ||
+			cmd->opcode == MMC_SEND_TUNING_BLOCK_HS200)
+			/*
+			 * The tuning block is sent by the card to the host
+			 * controller. So we set the TRNS_READ bit in the
+			 * Transfer Mode register. This also takes care of
+			 * setting DMA Enable and Multi Block Select in the
+			 * same register to 0.
+			 */
+			sdhci_writew(host, SDHCI_TRNS_READ, SDHCI_TRANSFER_MODE);
+		else
+			sdhci_writew(host, 0, SDHCI_TRANSFER_MODE);
 		return;
+	}
 
 	WARN_ON(!host->data);
 
@@ -1850,13 +1863,6 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
 				     SDHCI_BLOCK_SIZE);
 		}
 
-		/*
-		 * The tuning block is sent by the card to the host controller.
-		 * So we set the TRNS_READ bit in the Transfer Mode register.
-		 * This also takes care of setting DMA Enable and Multi Block
-		 * Select in the same register to 0.
-		 */
-		sdhci_writew(host, SDHCI_TRNS_READ, SDHCI_TRANSFER_MODE);
 
 		sdhci_send_command(host, &cmd);
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/6] mmc: sdhci: set regulator min/max voltage according to spec
  2012-09-19  2:12 [PATCH 0/6] mmc: sdhci: fixes and enhancements Kevin Liu
  2012-09-19  2:12 ` [PATCH 1/6] mmc: sdhci-pxav3: fix build error Kevin Liu
  2012-09-19  2:12 ` [PATCH 2/6] mmc: sdhci: fix transfer mode setting bug for cmds w/o data transfer Kevin Liu
@ 2012-09-19  2:12 ` Kevin Liu
  2012-09-19  2:12 ` [PATCH 4/6] mmc: sdhci: refine code for sd clock disable/enable in set ios Kevin Liu
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Kevin Liu @ 2012-09-19  2:12 UTC (permalink / raw)
  To: linux-mmc, cjb, pierre; +Cc: hzhuang1, cxie4, prakity, kliu5, Jialing Fu

From: Kevin Liu <kliu5@marvell.com>

Use voltage range as below rather than a specific value
3.3v: (3.2v, 3.4v)
3.0v: (2.9v, 3.1v)
1.8v: (1.65v, 1.95v)

Signed-off-by: Jialing Fu <jlfu@marvell.com>
Signed-off-by: Kevin Liu <kliu5@marvell.com>
---
 drivers/mmc/host/sdhci.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 2f844e5..f50efa6 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1628,7 +1628,7 @@ static int sdhci_do_3_3v_signal_voltage_switch(struct sdhci_host *host,
 	sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2);
 
 	if (host->vqmmc) {
-		ret = regulator_set_voltage(host->vqmmc, 3300000, 3300000);
+		ret = regulator_set_voltage(host->vqmmc, 3200000, 3400000);
 		if (ret) {
 			pr_warning("%s: Switching to 3.3V signalling voltage "
 				   " failed\n", mmc_hostname(host->mmc));
@@ -1672,7 +1672,7 @@ static int sdhci_do_1_8v_signal_voltage_switch(struct sdhci_host *host,
 		 */
 		if (host->vqmmc)
 			ret = regulator_set_voltage(host->vqmmc,
-				1800000, 1800000);
+				1650000, 1950000);
 		else
 			ret = 0;
 
@@ -2856,7 +2856,7 @@ int sdhci_add_host(struct sdhci_host *host)
 		pr_info("%s: no vqmmc regulator found\n", mmc_hostname(mmc));
 		host->vqmmc = NULL;
 	}
-	else if (regulator_is_supported_voltage(host->vqmmc, 1800000, 1800000))
+	else if (regulator_is_supported_voltage(host->vqmmc, 1650000, 1950000))
 		regulator_enable(host->vqmmc);
 	else
 		caps[1] &= ~(SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 |
@@ -2927,16 +2927,16 @@ int sdhci_add_host(struct sdhci_host *host)
 
 #ifdef CONFIG_REGULATOR
 	if (host->vmmc) {
-		ret = regulator_is_supported_voltage(host->vmmc, 3300000,
-			3300000);
+		ret = regulator_is_supported_voltage(host->vmmc, 3200000,
+			3400000);
 		if ((ret <= 0) || (!(caps[0] & SDHCI_CAN_VDD_330)))
 			caps[0] &= ~SDHCI_CAN_VDD_330;
-		ret = regulator_is_supported_voltage(host->vmmc, 3000000,
-			3000000);
+		ret = regulator_is_supported_voltage(host->vmmc, 2900000,
+			3100000);
 		if ((ret <= 0) || (!(caps[0] & SDHCI_CAN_VDD_300)))
 			caps[0] &= ~SDHCI_CAN_VDD_300;
-		ret = regulator_is_supported_voltage(host->vmmc, 1800000,
-			1800000);
+		ret = regulator_is_supported_voltage(host->vmmc, 1650000,
+			1950000);
 		if ((ret <= 0) || (!(caps[0] & SDHCI_CAN_VDD_180)))
 			caps[0] &= ~SDHCI_CAN_VDD_180;
 	}
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/6] mmc: sdhci: refine code for sd clock disable/enable in set ios
  2012-09-19  2:12 [PATCH 0/6] mmc: sdhci: fixes and enhancements Kevin Liu
                   ` (2 preceding siblings ...)
  2012-09-19  2:12 ` [PATCH 3/6] mmc: sdhci: set regulator min/max voltage according to spec Kevin Liu
@ 2012-09-19  2:12 ` Kevin Liu
  2012-09-19  2:12 ` [PATCH 5/6] mmc: sdhci: keep the saved clock var up to date Kevin Liu
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Kevin Liu @ 2012-09-19  2:12 UTC (permalink / raw)
  To: linux-mmc, cjb, pierre; +Cc: hzhuang1, cxie4, prakity, kliu5

From: Kevin Liu <kliu5@marvell.com>

With preset value enabled, there are two continuous times
of sd clock disable/enable. They can be combined into one
to save time and make code cleaner.

Signed-off-by: Kevin Liu <kliu5@marvell.com>
---
 drivers/mmc/host/sdhci.c |   29 +++++++++--------------------
 1 files changed, 9 insertions(+), 20 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index f50efa6..32dd505 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1449,33 +1449,22 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios)
 				ctrl_2 |= SDHCI_CTRL_DRV_TYPE_C;
 
 			sdhci_writew(host, ctrl_2, SDHCI_HOST_CONTROL2);
-		} else {
-			/*
-			 * According to SDHC Spec v3.00, if the Preset Value
-			 * Enable in the Host Control 2 register is set, we
-			 * need to reset SD Clock Enable before changing High
-			 * Speed Enable to avoid generating clock gliches.
-			 */
-
-			/* Reset SD Clock Enable */
-			clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
-			clk &= ~SDHCI_CLOCK_CARD_EN;
-			sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL);
-
-			sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);
-
-			/* Re-enable SD Clock */
-			clock = host->clock;
-			host->clock = 0;
-			sdhci_set_clock(host, clock);
 		}
 
-
 		/* Reset SD Clock Enable */
 		clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
 		clk &= ~SDHCI_CLOCK_CARD_EN;
 		sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL);
 
+		/*
+		 * According to SDHC Spec v3.00, if the Preset Value
+		 * Enable in the Host Control 2 register is set, we
+		 * need to reset SD Clock Enable before changing High
+		 * Speed Enable to avoid generating clock gliches.
+		 */
+		if (ctrl_2 & SDHCI_CTRL_PRESET_VAL_ENABLE)
+			sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);
+
 		if (host->ops->set_uhs_signaling)
 			host->ops->set_uhs_signaling(host, ios->timing);
 		else {
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 5/6] mmc: sdhci: keep the saved clock var up to date
  2012-09-19  2:12 [PATCH 0/6] mmc: sdhci: fixes and enhancements Kevin Liu
                   ` (3 preceding siblings ...)
  2012-09-19  2:12 ` [PATCH 4/6] mmc: sdhci: refine code for sd clock disable/enable in set ios Kevin Liu
@ 2012-09-19  2:12 ` Kevin Liu
  2012-09-19  2:12 ` [PATCH 6/6] mmc: sdhci: fix null return check of regulator_get Kevin Liu
  2012-09-19  2:53 ` [PATCH 0/6] mmc: sdhci: fixes and enhancements Chris Ball
  6 siblings, 0 replies; 11+ messages in thread
From: Kevin Liu @ 2012-09-19  2:12 UTC (permalink / raw)
  To: linux-mmc, cjb, pierre; +Cc: hzhuang1, cxie4, prakity, kliu5, Bin Wang

From: Kevin Liu <kliu5@marvell.com>

The clock rate set to the sdh controller may not exactly as requested
by the mmc core, this patch make the clock rate saved in the mmc_ios
and sdhci_host updated with the actual setting as in the controller. Thus
"/sys/kernel/debug/mmcx/ios" and card detect prints can show the correct
clock rate.

Signed-off-by: Bin Wang <binw@marvell.com>
Signed-off-by: Kevin Liu <kliu5@marvell.com>
---
 drivers/mmc/host/sdhci.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 32dd505..4b5631e 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1199,7 +1199,10 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
 	sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL);
 
 out:
-	host->clock = clock;
+	if (real_div)
+		host->clock = host->mmc->actual_clock;
+	else
+		host->clock = clock;
 }
 
 static int sdhci_set_power(struct sdhci_host *host, unsigned short power)
@@ -1375,6 +1378,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios)
 	}
 
 	sdhci_set_clock(host, ios->clock);
+	ios->clock = host->clock;
 
 	if (ios->power_mode == MMC_POWER_OFF)
 		vdd_bit = sdhci_set_power(host, -1);
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 6/6] mmc: sdhci: fix null return check of regulator_get
  2012-09-19  2:12 [PATCH 0/6] mmc: sdhci: fixes and enhancements Kevin Liu
                   ` (4 preceding siblings ...)
  2012-09-19  2:12 ` [PATCH 5/6] mmc: sdhci: keep the saved clock var up to date Kevin Liu
@ 2012-09-19  2:12 ` Kevin Liu
  2012-09-19  2:50   ` Chris Ball
  2012-09-19  2:53 ` [PATCH 0/6] mmc: sdhci: fixes and enhancements Chris Ball
  6 siblings, 1 reply; 11+ messages in thread
From: Kevin Liu @ 2012-09-19  2:12 UTC (permalink / raw)
  To: linux-mmc, cjb, pierre; +Cc: hzhuang1, cxie4, prakity, kliu5, Bin Wang

From: Kevin Liu <kliu5@marvell.com>

regulator_get() returns NULL when CONFIG_REGULATOR not defined,
which should be checked.

Signed-off-by: Bin Wang <binw@marvell.com>
Signed-off-by: Kevin Liu <kliu5@marvell.com>
---
 drivers/mmc/host/sdhci.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 4b5631e..914147d 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2845,7 +2845,7 @@ int sdhci_add_host(struct sdhci_host *host)
 
 	/* If vqmmc regulator and no 1.8V signalling, then there's no UHS */
 	host->vqmmc = regulator_get(mmc_dev(mmc), "vqmmc");
-	if (IS_ERR(host->vqmmc)) {
+	if (IS_ERR_OR_NULL(host->vqmmc)) {
 		pr_info("%s: no vqmmc regulator found\n", mmc_hostname(mmc));
 		host->vqmmc = NULL;
 	}
@@ -2912,7 +2912,7 @@ int sdhci_add_host(struct sdhci_host *host)
 	ocr_avail = 0;
 
 	host->vmmc = regulator_get(mmc_dev(mmc), "vmmc");
-	if (IS_ERR(host->vmmc)) {
+	if (IS_ERR_OR_NULL(host->vmmc)) {
 		pr_info("%s: no vmmc regulator found\n", mmc_hostname(mmc));
 		host->vmmc = NULL;
 	} else
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/6] mmc: sdhci-pxav3: fix build error
  2012-09-19  2:12 ` [PATCH 1/6] mmc: sdhci-pxav3: fix build error Kevin Liu
@ 2012-09-19  2:47   ` Chris Ball
  0 siblings, 0 replies; 11+ messages in thread
From: Chris Ball @ 2012-09-19  2:47 UTC (permalink / raw)
  To: Kevin Liu; +Cc: linux-mmc, pierre, hzhuang1, cxie4, prakity, kliu5

Hi,

On Tue, Sep 18 2012, Kevin Liu wrote:
> From: Kevin Liu <kliu5@marvell.com>
>
> Commit 18c75479 introduced build error with slot-gpio.h missing
> and pdata undeclared
>
> Signed-off-by: Kevin Liu <kliu5@marvell.com>
> ---
>  drivers/mmc/host/sdhci-pxav3.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
> index 223a5d4..f69d6c1 100644
> --- a/drivers/mmc/host/sdhci-pxav3.c
> +++ b/drivers/mmc/host/sdhci-pxav3.c
> @@ -30,6 +30,7 @@
>  #include <linux/module.h>
>  #include <linux/of.h>
>  #include <linux/of_device.h>
> +#include <linux/mmc/slot-gpio.h>
>  
>  #include "sdhci.h"
>  #include "sdhci-pltfm.h"
> @@ -317,6 +318,7 @@ static int __devexit sdhci_pxav3_remove(struct platform_device *pdev)
>  	struct sdhci_host *host = platform_get_drvdata(pdev);
>  	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
>  	struct sdhci_pxa *pxa = pltfm_host->priv;
> +	struct sdhci_pxa_platdata *pdata = pdev->dev.platform_data;
>  
>  	sdhci_remove_host(host, 1);

Thanks very much for catching this, Kevin -- I'll fold this change into
the original patch to avoid breaking bisection.

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 6/6] mmc: sdhci: fix null return check of regulator_get
  2012-09-19  2:12 ` [PATCH 6/6] mmc: sdhci: fix null return check of regulator_get Kevin Liu
@ 2012-09-19  2:50   ` Chris Ball
  0 siblings, 0 replies; 11+ messages in thread
From: Chris Ball @ 2012-09-19  2:50 UTC (permalink / raw)
  To: Kevin Liu; +Cc: linux-mmc, pierre, hzhuang1, cxie4, prakity, kliu5, Bin Wang

Hi,

On Tue, Sep 18 2012, Kevin Liu wrote:
> From: Kevin Liu <kliu5@marvell.com>
>
> regulator_get() returns NULL when CONFIG_REGULATOR not defined,
> which should be checked.
>
> Signed-off-by: Bin Wang <binw@marvell.com>
> Signed-off-by: Kevin Liu <kliu5@marvell.com>
> ---
>  drivers/mmc/host/sdhci.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 4b5631e..914147d 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -2845,7 +2845,7 @@ int sdhci_add_host(struct sdhci_host *host)
>  
>  	/* If vqmmc regulator and no 1.8V signalling, then there's no UHS */
>  	host->vqmmc = regulator_get(mmc_dev(mmc), "vqmmc");
> -	if (IS_ERR(host->vqmmc)) {
> +	if (IS_ERR_OR_NULL(host->vqmmc)) {
>  		pr_info("%s: no vqmmc regulator found\n", mmc_hostname(mmc));
>  		host->vqmmc = NULL;
>  	}
> @@ -2912,7 +2912,7 @@ int sdhci_add_host(struct sdhci_host *host)
>  	ocr_avail = 0;
>  
>  	host->vmmc = regulator_get(mmc_dev(mmc), "vmmc");
> -	if (IS_ERR(host->vmmc)) {
> +	if (IS_ERR_OR_NULL(host->vmmc)) {
>  		pr_info("%s: no vmmc regulator found\n", mmc_hostname(mmc));
>  		host->vmmc = NULL;
>  	} else

Why should it be checked?  It looks like the only difference will be
that everyone gets the printk, which isn't desirable -- x86 laptop
users don't need to see a scary message about regulators.

Thanks,

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/6] mmc: sdhci: fixes and enhancements
  2012-09-19  2:12 [PATCH 0/6] mmc: sdhci: fixes and enhancements Kevin Liu
                   ` (5 preceding siblings ...)
  2012-09-19  2:12 ` [PATCH 6/6] mmc: sdhci: fix null return check of regulator_get Kevin Liu
@ 2012-09-19  2:53 ` Chris Ball
  2012-09-19  7:52   ` Kevin Liu
  6 siblings, 1 reply; 11+ messages in thread
From: Chris Ball @ 2012-09-19  2:53 UTC (permalink / raw)
  To: Kevin Liu; +Cc: linux-mmc, pierre, hzhuang1, cxie4, prakity, kliu5

Hi,

On Tue, Sep 18 2012, Kevin Liu wrote:
> This patchset does as follows:
> [PATCH 1/6] mmc: sdhci-pxav3: fix build error
> [PATCH 2/6] mmc: sdhci: fix transfer mode setting bug for cmds w/o data transfer
> [PATCH 3/6] mmc: sdhci: set regulator min/max voltage according to spec
> [PATCH 4/6] mmc: sdhci: refine code for sd clock disable/enable in set ios
> [PATCH 5/6] mmc: sdhci: keep the saved clock var up to date
> [PATCH 6/6] mmc: sdhci: fix null return check of regulator_get

I'm worried that 2-5 might cause regressions for unexpected reasons, so
I'll plan on merging these for 3.8 instead of 3.7 (assuming that no-one
objects to them); hope that's okay.

Thanks,

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/6] mmc: sdhci: fixes and enhancements
  2012-09-19  2:53 ` [PATCH 0/6] mmc: sdhci: fixes and enhancements Chris Ball
@ 2012-09-19  7:52   ` Kevin Liu
  0 siblings, 0 replies; 11+ messages in thread
From: Kevin Liu @ 2012-09-19  7:52 UTC (permalink / raw)
  To: Chris Ball; +Cc: linux-mmc, pierre, hzhuang1, cxie4, prakity, kliu5

2012/9/19 Chris Ball <cjb@laptop.org>:
> Hi,
>
> On Tue, Sep 18 2012, Kevin Liu wrote:
>> This patchset does as follows:
>> [PATCH 1/6] mmc: sdhci-pxav3: fix build error
>> [PATCH 2/6] mmc: sdhci: fix transfer mode setting bug for cmds w/o data transfer
>> [PATCH 3/6] mmc: sdhci: set regulator min/max voltage according to spec
>> [PATCH 4/6] mmc: sdhci: refine code for sd clock disable/enable in set ios
>> [PATCH 5/6] mmc: sdhci: keep the saved clock var up to date
>> [PATCH 6/6] mmc: sdhci: fix null return check of regulator_get
>
> I'm worried that 2-5 might cause regressions for unexpected reasons, so
> I'll plan on merging these for 3.8 instead of 3.7 (assuming that no-one
> objects to them); hope that's okay.
>

Thanks
Kevin

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-09-19  7:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-19  2:12 [PATCH 0/6] mmc: sdhci: fixes and enhancements Kevin Liu
2012-09-19  2:12 ` [PATCH 1/6] mmc: sdhci-pxav3: fix build error Kevin Liu
2012-09-19  2:47   ` Chris Ball
2012-09-19  2:12 ` [PATCH 2/6] mmc: sdhci: fix transfer mode setting bug for cmds w/o data transfer Kevin Liu
2012-09-19  2:12 ` [PATCH 3/6] mmc: sdhci: set regulator min/max voltage according to spec Kevin Liu
2012-09-19  2:12 ` [PATCH 4/6] mmc: sdhci: refine code for sd clock disable/enable in set ios Kevin Liu
2012-09-19  2:12 ` [PATCH 5/6] mmc: sdhci: keep the saved clock var up to date Kevin Liu
2012-09-19  2:12 ` [PATCH 6/6] mmc: sdhci: fix null return check of regulator_get Kevin Liu
2012-09-19  2:50   ` Chris Ball
2012-09-19  2:53 ` [PATCH 0/6] mmc: sdhci: fixes and enhancements Chris Ball
2012-09-19  7:52   ` Kevin Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox