diff mbox

[U-Boot,1/4] mmc: atmel: Silence debug output

Message ID 1445625991-5343-1-git-send-email-marex@denx.de
State Accepted, archived
Delegated to: Andreas Bießmann
Headers show

Commit Message

Marek Vasut Oct. 23, 2015, 6:46 p.m. UTC
This driver generates clearly debugging prints when changing clock
speed, so silence those. Furthermore, the driver generates further
prints in case a command fails to complete. The later case woud be
useful, but for eMMC, command 8 can fail and it's not an error but
a part of the specification. Thus, make this debug() as well.

Signed-off-by: Marek Vasut <marex@denx.de>
---
 drivers/mmc/gen_atmel_mci.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Andreas Bießmann Oct. 23, 2015, 10:48 p.m. UTC | #1
On 23.10.15 20:46, Marek Vasut wrote:
> This driver generates clearly debugging prints when changing clock
> speed, so silence those. Furthermore, the driver generates further
> prints in case a command fails to complete. The later case woud be
> useful, but for eMMC, command 8 can fail and it's not an error but
> a part of the specification. Thus, make this debug() as well.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>

Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>

> ---
>  drivers/mmc/gen_atmel_mci.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c
> index 45bcffb..2815e57 100644
> --- a/drivers/mmc/gen_atmel_mci.c
> +++ b/drivers/mmc/gen_atmel_mci.c
> @@ -48,8 +48,8 @@ static unsigned int atmel_mci_get_version(struct atmel_mci *mci)
>   */
>  static void dump_cmd(u32 cmdr, u32 arg, u32 status, const char* msg)
>  {
> -	printf("gen_atmel_mci: CMDR %08x (%2u) ARGR %08x (SR: %08x) %s\n",
> -		cmdr, cmdr&0x3F, arg, status, msg);
> +	debug("gen_atmel_mci: CMDR %08x (%2u) ARGR %08x (SR: %08x) %s\n",
> +	      cmdr, cmdr & 0x3F, arg, status, msg);
>  }
>  
>  /* Setup for MCI Clock and Block Size */
> @@ -73,7 +73,7 @@ static void mci_set_mode(struct mmc *mmc, u32 hz, u32 blklen)
>  			clkodd = clkdiv & 1;
>  			clkdiv >>= 1;
>  
> -			printf("mci: setting clock %u Hz, block size %u\n",
> +			debug("mci: setting clock %u Hz, block size %u\n",
>  			       bus_hz / (clkdiv * 2 + clkodd + 2), blklen);
>  		} else {
>  			/* find clkdiv yielding a rate <= than requested */
> @@ -81,7 +81,7 @@ static void mci_set_mode(struct mmc *mmc, u32 hz, u32 blklen)
>  				if ((bus_hz / (clkdiv + 1) / 2) <= hz)
>  					break;
>  			}
> -			printf("mci: setting clock %u Hz, block size %u\n",
> +			debug("mci: setting clock %u Hz, block size %u\n",
>  			       (bus_hz / (clkdiv + 1)) / 2, blklen);
>  
>  		}
>
Andreas Bießmann Nov. 1, 2015, 9:02 p.m. UTC | #2
Dear Marek Vasut,

Marek Vasut <marex@denx.de> writes:
>This driver generates clearly debugging prints when changing clock
>speed, so silence those. Furthermore, the driver generates further
>prints in case a command fails to complete. The later case woud be
>useful, but for eMMC, command 8 can fail and it's not an error but
>a part of the specification. Thus, make this debug() as well.
>
>Signed-off-by: Marek Vasut <marex@denx.de>
>Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
>[fix checkpatch warnings]
>Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
>---
> drivers/mmc/gen_atmel_mci.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)

applied to u-boot-atmel/master, thanks!

Also applied some chackpatch fixes.

Best regards,
Andreas Bießmann
diff mbox

Patch

diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c
index 45bcffb..2815e57 100644
--- a/drivers/mmc/gen_atmel_mci.c
+++ b/drivers/mmc/gen_atmel_mci.c
@@ -48,8 +48,8 @@  static unsigned int atmel_mci_get_version(struct atmel_mci *mci)
  */
 static void dump_cmd(u32 cmdr, u32 arg, u32 status, const char* msg)
 {
-	printf("gen_atmel_mci: CMDR %08x (%2u) ARGR %08x (SR: %08x) %s\n",
-		cmdr, cmdr&0x3F, arg, status, msg);
+	debug("gen_atmel_mci: CMDR %08x (%2u) ARGR %08x (SR: %08x) %s\n",
+	      cmdr, cmdr & 0x3F, arg, status, msg);
 }
 
 /* Setup for MCI Clock and Block Size */
@@ -73,7 +73,7 @@  static void mci_set_mode(struct mmc *mmc, u32 hz, u32 blklen)
 			clkodd = clkdiv & 1;
 			clkdiv >>= 1;
 
-			printf("mci: setting clock %u Hz, block size %u\n",
+			debug("mci: setting clock %u Hz, block size %u\n",
 			       bus_hz / (clkdiv * 2 + clkodd + 2), blklen);
 		} else {
 			/* find clkdiv yielding a rate <= than requested */
@@ -81,7 +81,7 @@  static void mci_set_mode(struct mmc *mmc, u32 hz, u32 blklen)
 				if ((bus_hz / (clkdiv + 1) / 2) <= hz)
 					break;
 			}
-			printf("mci: setting clock %u Hz, block size %u\n",
+			debug("mci: setting clock %u Hz, block size %u\n",
 			       (bus_hz / (clkdiv + 1)) / 2, blklen);
 
 		}