mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] mci-core: use dev_* for messages
@ 2013-04-02 16:58 Hubert Feurstein
  2013-04-02 16:58 ` [PATCH 2/2] mci-core: fix coding style Hubert Feurstein
  2013-04-03  7:13 ` [PATCH 1/2] mci-core: use dev_* for messages Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Hubert Feurstein @ 2013-04-02 16:58 UTC (permalink / raw)
  To: barebox

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
---
 drivers/mci/mci-core.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index a269aee..49612de 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -430,8 +430,10 @@ static int mmc_change_freq(struct mci *mci)
 	}
 
 	/* No high-speed support */
-	if (!mci->ext_csd[EXT_CSD_HS_TIMING])
+	if (!mci->ext_csd[EXT_CSD_HS_TIMING]) {
+		dev_dbg(mci->mci_dev, "No high-speed support\n");
 		return 0;
+	}
 
 	/* High Speed is set, there are two types: 52MHz and 26MHz */
 	if (cardtype & EXT_CSD_CARD_TYPE_52)
@@ -669,7 +671,8 @@ static void mci_detect_version_from_csd(struct mci *mci)
 			mci->version = MMC_VERSION_1_2;
 			break;
 		}
-		printf("detected card version %s\n", vstr);
+
+		dev_info(mci->mci_dev, "detected card version %s\n", vstr);
 	}
 }
 
@@ -1169,7 +1172,7 @@ static int mci_sd_read(struct block_device *blk, void *buffer, int block,
 	}
 
 	if (block > MAX_BUFFER_NUMBER) {
-		pr_err("Cannot handle block number %d. Too large!\n", block);
+		dev_err(mci->mci_dev, "Cannot handle block number %d. Too large!\n", block);
 		return -EINVAL;
 	}
 
@@ -1366,7 +1369,7 @@ static int mci_card_probe(struct mci *mci)
 	/* start with a host interface reset */
 	rc = (host->init)(host, mci->mci_dev);
 	if (rc) {
-		pr_err("Cannot reset the SD/MMC interface\n");
+		dev_err(mci->mci_dev, "Cannot reset the SD/MMC interface\n");
 		return rc;
 	}
 
@@ -1376,7 +1379,7 @@ static int mci_card_probe(struct mci *mci)
 	/* reset the card */
 	rc = mci_go_idle(mci);
 	if (rc) {
-		pr_warning("Cannot reset the SD/MMC card\n");
+		dev_warn(mci->mci_dev, "Cannot reset the SD/MMC card\n");
 		goto on_error;
 	}
 
-- 
1.8.1.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 2/2] mci-core: fix coding style
  2013-04-02 16:58 [PATCH 1/2] mci-core: use dev_* for messages Hubert Feurstein
@ 2013-04-02 16:58 ` Hubert Feurstein
  2013-04-03  7:13 ` [PATCH 1/2] mci-core: use dev_* for messages Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Hubert Feurstein @ 2013-04-02 16:58 UTC (permalink / raw)
  To: barebox

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
---
 drivers/mci/mci-core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 49612de..c8598c2 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -894,8 +894,9 @@ static int mci_startup_mmc(struct mci *mci)
 			mci_set_clock(mci, 52000000);
 		else
 			mci_set_clock(mci, 26000000);
-	} else
+	} else {
 		mci_set_clock(mci, 20000000);
+	}
 
 	/*
 	 * Unlike SD, MMC cards dont have a configuration register to notify
-- 
1.8.1.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 1/2] mci-core: use dev_* for messages
  2013-04-02 16:58 [PATCH 1/2] mci-core: use dev_* for messages Hubert Feurstein
  2013-04-02 16:58 ` [PATCH 2/2] mci-core: fix coding style Hubert Feurstein
@ 2013-04-03  7:13 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2013-04-03  7:13 UTC (permalink / raw)
  To: Hubert Feurstein; +Cc: barebox

On Tue, Apr 02, 2013 at 06:58:06PM +0200, Hubert Feurstein wrote:
> Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>

Applied, thanks

Sascha

> ---
>  drivers/mci/mci-core.c | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
> index a269aee..49612de 100644
> --- a/drivers/mci/mci-core.c
> +++ b/drivers/mci/mci-core.c
> @@ -430,8 +430,10 @@ static int mmc_change_freq(struct mci *mci)
>  	}
>  
>  	/* No high-speed support */
> -	if (!mci->ext_csd[EXT_CSD_HS_TIMING])
> +	if (!mci->ext_csd[EXT_CSD_HS_TIMING]) {
> +		dev_dbg(mci->mci_dev, "No high-speed support\n");
>  		return 0;
> +	}
>  
>  	/* High Speed is set, there are two types: 52MHz and 26MHz */
>  	if (cardtype & EXT_CSD_CARD_TYPE_52)
> @@ -669,7 +671,8 @@ static void mci_detect_version_from_csd(struct mci *mci)
>  			mci->version = MMC_VERSION_1_2;
>  			break;
>  		}
> -		printf("detected card version %s\n", vstr);
> +
> +		dev_info(mci->mci_dev, "detected card version %s\n", vstr);
>  	}
>  }
>  
> @@ -1169,7 +1172,7 @@ static int mci_sd_read(struct block_device *blk, void *buffer, int block,
>  	}
>  
>  	if (block > MAX_BUFFER_NUMBER) {
> -		pr_err("Cannot handle block number %d. Too large!\n", block);
> +		dev_err(mci->mci_dev, "Cannot handle block number %d. Too large!\n", block);
>  		return -EINVAL;
>  	}
>  
> @@ -1366,7 +1369,7 @@ static int mci_card_probe(struct mci *mci)
>  	/* start with a host interface reset */
>  	rc = (host->init)(host, mci->mci_dev);
>  	if (rc) {
> -		pr_err("Cannot reset the SD/MMC interface\n");
> +		dev_err(mci->mci_dev, "Cannot reset the SD/MMC interface\n");
>  		return rc;
>  	}
>  
> @@ -1376,7 +1379,7 @@ static int mci_card_probe(struct mci *mci)
>  	/* reset the card */
>  	rc = mci_go_idle(mci);
>  	if (rc) {
> -		pr_warning("Cannot reset the SD/MMC card\n");
> +		dev_warn(mci->mci_dev, "Cannot reset the SD/MMC card\n");
>  		goto on_error;
>  	}
>  
> -- 
> 1.8.1.3
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2013-04-03  7:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-02 16:58 [PATCH 1/2] mci-core: use dev_* for messages Hubert Feurstein
2013-04-02 16:58 ` [PATCH 2/2] mci-core: fix coding style Hubert Feurstein
2013-04-03  7:13 ` [PATCH 1/2] mci-core: use dev_* for messages Sascha Hauer

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