[U-Boot] [PATCH] ubi: Remove flash selection parameter (nor|nand|onenand) from "ubi part"

Scott Wood scottwood at freescale.com
Fri Apr 24 17:34:41 CEST 2009


On Fri, Apr 24, 2009 at 04:00:19PM +0200, Stefan Roese wrote:
> This patch removes the now unnecessary flash type parameter from the
> "ubi part" command. Currently the user has to define the type of flash
> he will be using UBI on. Example:
> 
> => ubi part nor partition1
> 
> With this patch this type parameter is not needed anymore. The user can
> now select the partition directly without the flash type paramter.
> Example:
> 
> => ubi part partition1
> 
> This breaks backward compatibility right now because of the change in the
> command syntax. But UBI support is still quite fresh and the advantage of
> this new command is syntax big enough for this change. Additionally the
> code is much cleaner now.

Yes, some polymorphism at last. :-)

Now to do the same with cmd_nand/cmd_onenand...  and NOR flash for that
matter.

> +		sprintf(mtd_dev, "%s%d", MTD_DEV_TYPE(dev->id->type), dev->id->num);
> +		printf("%s: mtd_dev=%s!!!\n", __func__, mtd_dev); // test-only
> +		ubi_dev.mtd_info = get_mtd_device_nm(mtd_dev);
> +		printf("%s: mtd_info=%p!!!\n", __func__, ubi_dev.mtd_info); // test-only

Should these be debug()?

> +                if (IS_ERR(ubi_dev.mtd_info)) {

s/spaces/tabs/

-Scott


More information about the U-Boot mailing list