Patchwork [U-Boot] mmc: show mmc capacity using print_size

login
register
mail settings
Submitter Minkyu Kang
Date Jan. 4, 2011, 11:04 a.m.
Message ID <4D22FEB3.4020706@samsung.com>
Download mbox | patch
Permalink /patch/77447/
State Accepted
Commit 940e078297fc5f8707fe11003c9fda4a275fad5b
Delegated to: Andy Fleming
Headers show

Comments

Minkyu Kang - Jan. 4, 2011, 11:04 a.m.
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
---
 common/cmd_mmc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Minkyu Kang - Feb. 25, 2011, 8:06 a.m.
Dear Wolfgang and Andy

Please check this patch.

On 4 January 2011 20:04, Minkyu Kang <mk7.kang@samsung.com> wrote:
> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
> ---
>  common/cmd_mmc.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
> index 4323f76..6166749 100644
> --- a/common/cmd_mmc.c
> +++ b/common/cmd_mmc.c
> @@ -104,7 +104,8 @@ static void print_mmcinfo(struct mmc *mmc)
>                        (mmc->version >> 4) & 0xf, mmc->version & 0xf);
>
>        printf("High Capacity: %s\n", mmc->high_capacity ? "Yes" : "No");
> -       printf("Capacity: %lld\n", mmc->capacity);
> +       puts("Capacity: ");
> +       print_size(mmc->capacity, "\n");
>
>        printf("Bus Width: %d-bit\n", mmc->bus_width);
>  }
> --
> 1.7.1

Thanks

Patch

diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 4323f76..6166749 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -104,7 +104,8 @@  static void print_mmcinfo(struct mmc *mmc)
 			(mmc->version >> 4) & 0xf, mmc->version & 0xf);
 
 	printf("High Capacity: %s\n", mmc->high_capacity ? "Yes" : "No");
-	printf("Capacity: %lld\n", mmc->capacity);
+	puts("Capacity: ");
+	print_size(mmc->capacity, "\n");
 
 	printf("Bus Width: %d-bit\n", mmc->bus_width);
 }