]> git.dujemihanovic.xyz Git - u-boot.git/commit
mtd: Use default mtdparts/mtids when not defined in the environment
authorBoris Brezillon <boris.brezillon@bootlin.com>
Tue, 13 Nov 2018 11:43:09 +0000 (12:43 +0100)
committerJagan Teki <jagan@amarulasolutions.com>
Tue, 13 Nov 2018 13:23:10 +0000 (18:53 +0530)
commit5ffcd50612f6e716ea9479bea0edfdc89f7a0f0b
tree6c0f6a55dc98e278e6554a18eb0b549855658f75
parentc80cc3df3d196302c401e45c92d8a769c55e78e9
mtd: Use default mtdparts/mtids when not defined in the environment

U-boot provides a mean to define default values for mtdids and mtdparts
when they're not defined in the environment. Patch mtd_probe_devices()
to use those default values when env_get("mtdparts") or
env_get("mtdids") return NULL.

This implementation is based on the logic found in cmd/mtdparts.c.

Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command")
Reported-by: Stefan Roese <sr@denx.de>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Jagan Teki <jagan@openedev.com>
drivers/mtd/mtd_uboot.c