[U-Boot] [PATCH 3/3] ums: Extend ums to use all mmc devices.

Przemyslaw Marczak p.marczak at samsung.com
Wed Aug 28 09:40:53 CEST 2013


Hello Marek,

> This change allows using every mmc device instance with ums,
> like eMMC or SD cards.
>
> Example: ums <device_number> for mmc devices.

Could you review this patch, please?
>
> Signed-off-by: Przemyslaw Marczak <p.marczak at samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
> CC: Marek Vasut <marek.vasut at gmail.com>
> ---
>   common/cmd_usb_mass_storage.c |    7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/common/cmd_usb_mass_storage.c b/common/cmd_usb_mass_storage.c
> index 33a4715..4181d3a 100644
> --- a/common/cmd_usb_mass_storage.c
> +++ b/common/cmd_usb_mass_storage.c
> @@ -14,6 +14,7 @@
>   int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,
>   			       int argc, char * const argv[])
>   {
> +	struct mmc *mmc = NULL;
>   	char *ep;
>   	unsigned int dev_num = 0, offset = 0, part_size = 0;
>   	int rc;
> @@ -28,8 +29,10 @@ int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,
>
>   	dev_num = (int)simple_strtoul(argv[1], &ep, 16);
>
> -	if (dev_num) {
> -		puts("\nSet eMMC device to 0! - e.g. ums 0\n");
> +	mmc = find_mmc_device(dev_num);
> +
> +	if (!mmc) {
> +		printf("\neMMC device: %d not found! Try ums 0.\n", dev_num);
>   		goto fail;
>   	}
>
>


-- 
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com


More information about the U-Boot mailing list