From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Brezillon Date: Wed, 4 Jan 2017 10:10:56 +0100 Subject: [U-Boot] [PATCH v2 6/14] cmd: Add Kconfig option for CMD_MTDPARTS and related options In-Reply-To: <4fdcc47c7f580f43cd5cd5e7b10517e1f8699c65.1479817585.git-series.maxime.ripard@free-electrons.com> References: <4fdcc47c7f580f43cd5cd5e7b10517e1f8699c65.1479817585.git-series.maxime.ripard@free-electrons.com> Message-ID: <20170104101056.18a5069e@bbrezillon> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Maxime, On Tue, 22 Nov 2016 13:38:36 +0100 Maxime Ripard wrote: > CMD_MTDPARTS is something the user might or might not want to select, and > might depends on (or be selected by) other options too. > > This is even truer for the MTDIDS_DEFAULT and MTDPARTS_DEFAULT options that > might change from one board to another, or from one user to the other, > depending on what it expects and what storage devices are available. > > In order to ease that configuration, add those options to Kconfig. > > Signed-off-by: Maxime Ripard > --- > cmd/Kconfig | 19 +++++++++++++++++++ > cmd/mtdparts.c | 8 ++++++++ > 2 files changed, 27 insertions(+), 0 deletions(-) > > diff --git a/cmd/Kconfig b/cmd/Kconfig > index e339d8638aa5..cd98e2a2bd00 100644 > --- a/cmd/Kconfig > +++ b/cmd/Kconfig > @@ -717,6 +717,25 @@ config CMD_FS_GENERIC > help > Enables filesystem commands (e.g. load, ls) that work for multiple > fs types. > + > +config CMD_MTDPARTS > + bool "MTD partition support" depends on MTD Also, it seems that MTD_DEVICE and MTD_PARTITIONS still have to be defined in the board/soc config header, which is kind of disturbing. I modified the patch (see below) to add hidden MTD_DEVICE and MTD_PARTITIONS options and select them from MTDPARTS. This way you can get rid of all MTD related definitions in sunxi-common.h. I also have 3 more patches [1][2][3] to expose UBIFS and NAND suboptions through Kconfig in order to get rid of the extra definitions you add in sunxi-common.h (patch 9). Let me know if you want me to send them separately, otherwise, you can include them in your series. Regards, Boris [1]http://code.bulix.org/l9ca0i-107843 [2]http://code.bulix.org/29dzqe-107844 [3]http://code.bulix.org/hp7y46-107845 --->8---