Commit Graph

8 Commits

Author SHA1 Message Date
Jon Lin c4d5fc6337 cmd: mtd: fix compiler error
Change-Id: Idc4bcd902c02b5dbd6f5aac631f3977f257f606f
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-08-07 17:37:14 +08:00
Jon Lin b99d850cbd Revert "cmd: mtd: Use the subcmd infrastructure to declare mtd sub-commands"
This reverts commit 9671243e8d10defb06f2ea24fac138c87697d7fc.

Change-Id: Ie34f9feb06aa0525c9fa59d79ecf687a9a572491
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-08-07 17:37:09 +08:00
Jon Lin b62a0f65a9 Revert "cmd: mtd: fix compilation warning for help when SYS_LONGHELP=n"
This reverts commit a645831ca0962532660e4db3155a8be85e5ca312.

Change-Id: Ida32a1a893b88503cffe432705d5d02921dfab09
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-08-07 17:37:05 +08:00
Quentin Schulz fb504314e8 UPSTREAM: cmd: mtd: fix compilation warning for help when SYS_LONGHELP=n
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

Change-Id: If84aae3167fd8826e33f717b7debefe32920dd0b
Signed-off-by: Quentin Schulz <quentin.schulz@bootlin.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit a645831ca0962532660e4db3155a8be85e5ca312)
2019-07-12 11:02:53 +08:00
Boris Brezillon b3d8fba6e0 cmd: mtd: Use the subcmd infrastructure to declare mtd sub-commands
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())

change-Id: I4292fde7affaddd8eb5a51fe8ec4265ae4984a21
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 9671243e8d10defb06f2ea24fac138c87697d7fc)
2019-07-12 11:02:53 +08:00
Miquel Raynal f87151b325 UPSTREAM: cmd: mtd: add 'mtd' command
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>
Change-Id: I68bcf4f0126c3a9d6ae0481dafcfcaab0506bd3f
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 5db66b3aee6f2c057706d8715f7e5c472e82f047)
2019-07-05 19:33:44 +08:00
Jon Lin fe85de89e4 cmd: mtd: rename mtd.c to mtd_blk.c
Change-Id: Ie35d54afdbc0580af06805eca9f0db813db2dfe5
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-07-05 19:33:44 +08:00
Jason Zhu de8452aebf cmd: mtd: support mtd command
Change-Id: I5d5548e97535c6d928d2ff84f055de259577c11a
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-06-18 18:02:29 +08:00