summaryrefslogtreecommitdiff
path: root/cmd/mtd.c
AgeCommit message (Collapse)AuthorFilesLines
2019-01-18cmd: mtd: fix compilation warning for help when SYS_LONGHELP=nQuentin Schulz1-3/+2
cmd/mtd.c:447:13: warning: ‘mtd_help_text’ defined but not used [-Wunused-variable] static char mtd_help_text[] = ^~~~~~~~~~~~~ When SYS_LONGHELP is not defined. After looking at how other commands work, we should surround the whole help text (even its declaration) with an #ifdef CONFIG_SYS_LONGHELP, since it's compiled out when calling _CMD_HELP[1] on the help text variable argument to U_BOOT_CMD. [1] https://elixir.bootlin.com/u-boot/latest/source/include/command.h#L181 Signed-off-by: Quentin Schulz <quentin.schulz@bootlin.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
2019-01-15cmd: mtd: Use the subcmd infrastructure to declare mtd sub-commandsBoris Brezillon1-181/+267
It's way simpler this way, and we also gain auto-completion support for free (MTD name auto-completion has been added with mtd_name_complete()) Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-10-02cmd: mtd: add 'mtd' commandMiquel Raynal1-0/+473
There should not be a 'nand' command, a 'sf' command and certainly not a new 'spi-nand' command. Write a 'mtd' command instead to manage all MTD devices/partitions at once. This should be the preferred way to access any MTD device. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>