From 5db66b3aee6f2c057706d8715f7e5c472e82f047 Mon Sep 17 00:00:00 2001 From: Miquel Raynal Date: Sat, 29 Sep 2018 12:58:28 +0200 Subject: 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 Acked-by: Jagan Teki Reviewed-by: Stefan Roese Reviewed-by: Boris Brezillon --- cmd/Kconfig | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'cmd/Kconfig') diff --git a/cmd/Kconfig b/cmd/Kconfig index 13d4c991bf8..c9be85989cb 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -864,6 +864,12 @@ config CMD_MMC_SWRITE Enable support for the "mmc swrite" command to write Android sparse images to eMMC. +config CMD_MTD + bool "mtd" + select MTD_PARTITIONS + help + MTD commands support. + config CMD_NAND bool "nand" default y if NAND_SUNXI @@ -1697,14 +1703,14 @@ config CMD_MTDPARTS config MTDIDS_DEFAULT string "Default MTD IDs" - depends on CMD_MTDPARTS || CMD_NAND || CMD_FLASH + depends on CMD_MTD || CMD_MTDPARTS || CMD_NAND || CMD_FLASH help Defines a default MTD IDs list for use with MTD partitions in the Linux MTD command line partitions format. config MTDPARTS_DEFAULT string "Default MTD partition scheme" - depends on CMD_MTDPARTS || CMD_NAND || CMD_FLASH + depends on CMD_MTD || CMD_MTDPARTS || CMD_NAND || CMD_FLASH help Defines a default MTD partitioning scheme in the Linux MTD command line partitions format -- cgit v1.2.3 From c58fb2cdb3e4abb8c2714b351b3856661573c747 Mon Sep 17 00:00:00 2001 From: Miquel Raynal Date: Sat, 29 Sep 2018 12:58:29 +0200 Subject: cmd: ubi: clean the partition handling UBI should not mess with MTD partitions, now that the partitions are handled in a clean way, clean the ubi command and avoid using this uneeded extra-glue to reference the devices. Signed-off-by: Miquel Raynal Reviewed-by: Stefan Roese Reviewed-by: Boris Brezillon --- cmd/Kconfig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmd/Kconfig') diff --git a/cmd/Kconfig b/cmd/Kconfig index c9be85989cb..b571e84cc14 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1840,6 +1840,8 @@ config CMD_UBI capabilities. Please, consult the MTD web site for more details (www.linux-mtd.infradead.org). Activate this option if you want to use U-Boot UBI commands. + It is also strongly encouraged to also enable CONFIG_MTD to get full + partition support. config CMD_UBIFS tristate "Enable UBIFS - Unsorted block images filesystem commands" -- cgit v1.2.3 From 938db6fe5da3581ed2c17d64c7e016a7a8df5237 Mon Sep 17 00:00:00 2001 From: Miquel Raynal Date: Sat, 29 Sep 2018 12:58:30 +0200 Subject: cmd: mtdparts: describe as legacy The 'mtdparts' command is not needed anymore. While the environment variable is still valid (and useful, along with the 'mtdids' one), the command has been replaced by 'mtd' which is much more close to the MTD stack and do not add its own specific glue. Signed-off-by: Miquel Raynal Reviewed-by: Stefan Roese Reviewed-by: Boris Brezillon --- cmd/Kconfig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cmd/Kconfig') diff --git a/cmd/Kconfig b/cmd/Kconfig index b571e84cc14..12d19fd675c 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1699,7 +1699,11 @@ config CMD_MTDPARTS bool "MTD partition support" select MTD_DEVICE if (CMD_NAND || NAND) help - MTD partition support + MTD partitioning tool support. + It is strongly encouraged to avoid using this command + anymore along with 'sf', 'nand', 'onenand'. One can still + declare the partitions in the mtdparts environment variable + but better use the MTD stack and the 'mtd' command instead. config MTDIDS_DEFAULT string "Default MTD IDs" -- cgit v1.2.3