linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Boris Brezillon <bbrezillon@kernel.org>
Cc: Mason Yang <masonccyang@mxic.com.tw>, Vignesh R <vigneshr@ti.com>,
	Tudor Ambarus <Tudor.Ambarus@microchip.com>,
	Julien Su <juliensu@mxic.com.tw>,
	Richard Weinberger <richard@nod.at>,
	Schrempf Frieder <frieder.schrempf@kontron.de>,
	Marek Vasut <marek.vasut@gmail.com>,
	linux-mtd@lists.infradead.org,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC PATCH 02/27] mtd: nand: Compile in the NAND core by default
Date: Thu, 21 Feb 2019 13:52:27 +0100	[thread overview]
Message-ID: <20190221135227.48cbeb2d@xps13> (raw)
In-Reply-To: <20190221130815.7bd550dd@kernel.org>

Hi Boris,

Boris Brezillon <bbrezillon@kernel.org> wrote on Thu, 21 Feb 2019
13:08:15 +0100:

> On Thu, 21 Feb 2019 12:46:28 +0100
> Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> 
> > Hi Boris,
> > 
> > Boris Brezillon <bbrezillon@kernel.org> wrote on Thu, 21 Feb 2019
> > 12:14:37 +0100:
> >   
> > > On Thu, 21 Feb 2019 12:06:10 +0100
> > > Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> > >     
> > > > Hi Boris,
> > > > 
> > > > Boris Brezillon <bbrezillon@kernel.org> wrote on Thu, 21 Feb 2019
> > > > 11:55:54 +0100:
> > > >       
> > > > > On Thu, 21 Feb 2019 11:01:51 +0100
> > > > > Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> > > > >         
> > > > > > Force the NAND core be compiled-in when using any kind of NAND.          
> > > > > 
> > > > > Why?        
> > > > 
> > > > Because all the logic that comes later in the series relies on this
> > > > change. I need the NAND core to be compiled-in,      
> > > 
> > > Hm, not exactly compiled-in as it can still be selected as a module.    
> > 
> > Yes, do you think it is a problem?  
> 
> Yes, it is, at least for the SPI NAND case (and soon the RAW NAND case
> too) since you remove the select but don't add a depends on. If you
> select NAND_CORE as a module and SPI_NAND compiled-in => BOOM!

I am not entirely sure but I think SPI NAND cannot be compiled-in if it
is "under" a menu that has been selected as a module. But anyway, it's
just a matter of seeing things, and the onenand argument is valid to
me. I will change it to the below proposal you accepted.

> 
> >   
> > >     
> > > > as well the ECC engine
> > > > core, as well as everything that is shared between raw NAND and
> > > > SPI-NAND which I move in the NAND core.      
> > > 
> > > Yes, the core is required for SPI NAND and soon will be for RAW NAND,
> > > but I still don't see the problem with the "select NAND_CORE" approach,
> > > sorry.
> > >     
> > > >       
> > > > >         
> > > > > > 
> > > > > > Also remove the redundant dependencies on MTD which is enforced by the
> > > > > > game of the if/endif blocs.
> > > > > > 
> > > > > > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > > > > > ---
> > > > > >  drivers/mtd/nand/Kconfig         | 12 ++++++++++--
> > > > > >  drivers/mtd/nand/onenand/Kconfig |  1 -
> > > > > >  drivers/mtd/nand/raw/Kconfig     |  1 -
> > > > > >  drivers/mtd/nand/spi/Kconfig     |  1 -
> > > > > >  4 files changed, 10 insertions(+), 5 deletions(-)
> > > > > > 
> > > > > > diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
> > > > > > index 495751ed3fd7..e8d26a715922 100644
> > > > > > --- a/drivers/mtd/nand/Kconfig
> > > > > > +++ b/drivers/mtd/nand/Kconfig
> > > > > > @@ -1,6 +1,14 @@
> > > > > > -config MTD_NAND_CORE
> > > > > > -	tristate
> > > > > > +menuconfig MTD_NAND_CORE
> > > > > > +	tristate "NAND"          
> > > > > 
> > > > > Definitely not something we want to expose in menuconfig.        
> > > > 
> > > > I considered the NAND core as essential when using raw NAND and
> > > > SPI-NAND.      
> > > 
> > > It is needed for SPI NAND, and will be for raw NAND for sure, but I
> > > still see no reasons for turning it into a user-visible option.
> > >     
> > > > Hence, turning it into a menuconfig option make the whole
> > > > NAND subsystem available (or not) and will appear in a different
> > > > "menuconfig page", which really enhances the readability.      
> > > 
> > > That's a different thing, and I have no problem with adding an extra
> > > level in the Kconfig hierarchy.    
> > 
> > Then why not using this symbol? I don't get why you are opposed.  
> 
> Because, not only you're forcing onenand users to pull the nand core
> code in, which is not needed until the conversion to the generic NAND
> layer is done, but you're actually forcing that for all existing
> defconfigs because of your "default y" approach. Also, I don't see
> what's the benefit of letting users know about this intermediate
> framework when all they care about is supporting a specific class of
> devices.
> 
> > 
> > So you would like a config NAND_CORE (invisible) and a visible
> > menuconfig NAND? And all entries in the NAND menu selecting NAND_CORE?  
> 
> Not all entries, just SPI NAND, and soon, raw NAND. And yes, I'd prefer
> that.


Thanks,
Miquèl

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-02-21 12:53 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-21 10:01 [RFC PATCH 00/27] Introduce the generic ECC engine abstraction Miquel Raynal
2019-02-21 10:01 ` [RFC PATCH 01/27] mtd: nand: Move nand_device forward declaration to the top Miquel Raynal
2019-02-21 10:01 ` [RFC PATCH 02/27] mtd: nand: Compile in the NAND core by default Miquel Raynal
2019-02-21 10:55   ` Boris Brezillon
2019-02-21 11:06     ` Miquel Raynal
2019-02-21 11:14       ` Boris Brezillon
2019-02-21 11:46         ` Miquel Raynal
2019-02-21 12:08           ` Boris Brezillon
2019-02-21 12:52             ` Miquel Raynal [this message]
2019-02-21 10:01 ` [RFC PATCH 03/27] mtd: nand: Introduce the ECC engine abstraction Miquel Raynal
2019-02-21 11:16   ` Boris Brezillon
2019-02-27  9:26     ` Miquel Raynal
2019-02-27  9:47       ` Boris Brezillon
2019-02-25 18:55   ` Boris Brezillon
2019-02-27 13:56     ` Miquel Raynal
2019-02-27 14:06       ` Boris Brezillon
2019-02-27 14:19         ` Miquel Raynal
2019-02-27 14:28           ` Boris Brezillon
2019-02-27 14:34             ` Miquel Raynal
2019-02-21 10:01 ` [RFC PATCH 04/27] mtd: Fix typo in mtd_ooblayout_set_databytes() description Miquel Raynal
2019-02-21 10:01 ` [RFC PATCH 05/27] mtd: nand: Move standard OOB layouts to the NAND core Miquel Raynal
2019-02-21 11:19   ` Boris Brezillon
2019-02-21 11:47     ` Miquel Raynal
2019-02-21 12:10       ` Boris Brezillon
2019-02-21 10:01 ` [RFC PATCH 06/27] mtd: nand: Move ECC specific functions to ecc/engine.c Miquel Raynal
2019-02-21 10:01 ` [RFC PATCH 07/27] mtd: nand: ecc: Move BCH code into the ecc/ directory Miquel Raynal
2019-02-21 10:01 ` [RFC PATCH 08/27] mtd: nand: ecc: Use SPDX license identifier for the software BCH code Miquel Raynal
2019-02-21 11:25   ` Boris Brezillon
2019-02-21 11:48     ` Miquel Raynal
2019-02-21 10:01 ` [RFC PATCH 09/27] mtd: nand: ecc: Turn the software BCH implementation generic Miquel Raynal
2019-02-21 12:26   ` Boris Brezillon
2019-02-21 12:53     ` Miquel Raynal
2019-02-21 10:01 ` [RFC PATCH 10/27] mtd: rawnand: Get rid of chip->ecc.priv Miquel Raynal
2019-02-21 13:01   ` Boris Brezillon
2019-02-21 10:02 ` [RFC PATCH 11/27] mtd: nand: ecc: Move Hamming code into the ecc/ directory Miquel Raynal
2019-02-21 10:02 ` [RFC PATCH 12/27] mtd: nand: ecc: Use SPDX license identifier for the software Hamming code Miquel Raynal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190221135227.48cbeb2d@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=Tudor.Ambarus@microchip.com \
    --cc=bbrezillon@kernel.org \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=frieder.schrempf@kontron.de \
    --cc=juliensu@mxic.com.tw \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=masonccyang@mxic.com.tw \
    --cc=richard@nod.at \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).