From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miquel Raynal Date: Wed, 5 Dec 2018 11:48:32 +0100 Subject: [U-Boot] [PATCH v3 26/28] cmd: make MTD commands depend on MTD In-Reply-To: <20181205114208.0fdad892@bbrezillon> References: <20181204235714.11805-1-miquel.raynal@bootlin.com> <20181204235714.11805-27-miquel.raynal@bootlin.com> <20181205114208.0fdad892@bbrezillon> Message-ID: <20181205114832.7c2d3681@xps13> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de Hi Boris, Boris Brezillon wrote on Wed, 5 Dec 2018 11:42:08 +0100: > On Wed, 5 Dec 2018 00:57:12 +0100 > Miquel Raynal wrote: >=20 > > Defconfigs have been fixed, now we can add proper dependencies in > > Kconfig. SPI FLASH is still not dependent on MTD (deeper rework needed). > >=20 > > Signed-off-by: Miquel Raynal > > --- > > cmd/Kconfig | 10 +++++++--- > > 1 file changed, 7 insertions(+), 3 deletions(-) > >=20 > > diff --git a/cmd/Kconfig b/cmd/Kconfig > > index cf58174013..7c166a07e6 100644 > > --- a/cmd/Kconfig > > +++ b/cmd/Kconfig > > @@ -679,6 +679,7 @@ config CMD_FDC > > config CMD_FLASH > > bool "flinfo, erase, protect" > > default y > > + depends on MTD > > help > > NOR flash support. > > flinfo - print FLASH memory information > > @@ -868,6 +869,7 @@ config CMD_MMC_SWRITE > > =20 > > config CMD_MTD > > bool "mtd" > > + depends on MTD > > select MTD_PARTITIONS > > help > > MTD commands support. > > @@ -875,6 +877,7 @@ config CMD_MTD > > config CMD_NAND > > bool "nand" > > default y if NAND_SUNXI > > + depends on MTD_RAW_NAND > > help > > NAND support. > > =20 > > @@ -915,6 +918,7 @@ config CMD_MMC_SPI > > =20 > > config CMD_ONENAND > > bool "onenand - access to onenand device" > > + depends on MTD > > help > > OneNAND is a brand of NAND ('Not AND' gate) flash which provides > > various useful features. This command allows reading, writing, > > @@ -1733,7 +1737,7 @@ config CMD_JFFS2 > > =20 > > config CMD_MTDPARTS > > bool "MTD partition support" > > - select MTD if (CMD_NAND || NAND) > > + depends on MTD > > help > > MTD partitioning tool support. > > It is strongly encouraged to avoid using this command > > @@ -1754,14 +1758,14 @@ endif > > =20 > > config MTDIDS_DEFAULT > > string "Default MTD IDs" > > - depends on MTD_PARTITIONS || CMD_MTDPARTS || CMD_NAND || CMD_FLASH > > + depends on MTD || SPI_FLASH =20 >=20 > Can't we have MTD enabled without MTD_PARTITIONS? I guess we don't need > to expose these options if MTD_PARTITIONS is disabled. That's the theory. (Travis) Experience shows that adding a dependency on MTD_PARTITIONS when removing the dependency on the above commands is too restrictive and some header files using MTDIDS/MTDPARTS_DEFAULT will produce build issues. This is insane but I did not want to debug this issue and, anyway, it is harmless to have these strings defined. >=20 > > help > > Defines a default MTD IDs list for use with MTD partitions in the > > Linux MTD command line partitions format. > > =20 > > config MTDPARTS_DEFAULT > > string "Default MTD partition scheme" > > - depends on MTD_PARTITIONS || CMD_MTDPARTS || CMD_NAND || CMD_FLASH > > + depends on MTD || SPI_FLASH > > help > > Defines a default MTD partitioning scheme in the Linux MTD command > > line partitions format =20 >=20 Thanks, Miqu=C3=A8l