public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] mtd: nand: let the raw NAND devices be compiled upon selection
Date: Sun, 18 Nov 2018 22:06:08 +0100	[thread overview]
Message-ID: <20181118220608.511e011e@bbrezillon> (raw)
In-Reply-To: <20181118200732.10915-2-miquel.raynal@bootlin.com>

On Sun, 18 Nov 2018 21:07:31 +0100
Miquel Raynal <miquel.raynal@bootlin.com> wrote:

> Today way is to rely on CMD_NAND to be selected and from the root
> Makefile compile what is in drivers/mtd/nand/raw.
> 
> While this will work most of the time with decent configurations, it
> is better to also compile this subsystem upon simple request in the
> configuration. Otherwise, a user not selecting CMD_NAND but selecting
> NAND and any of the controller drivers will not see their build. Fix
> this weird situation by adding a single line in the nand/ directory
> Kconfig file.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  drivers/mtd/nand/Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
> index a358bc680e..2c33447995 100644
> --- a/drivers/mtd/nand/Makefile
> +++ b/drivers/mtd/nand/Makefile
> @@ -2,4 +2,5 @@
>  
>  nandcore-objs := core.o bbt.o
>  obj-$(CONFIG_MTD_NAND_CORE) += nandcore.o
> +obj-$(CONFIG_NAND) += raw/

Can we rename the Kconfig option into CONFIG_MTD_RAW_NAND to make it
consistent with the other ones (should be done in a separate patch).

Also, this patch breaks the build: the raw/ dir will be included
twice, and the linker will complain about duplicate symbols. Note that
your second patch fixes the bug introduce here, but I guess this is the
reason this patch was no applied/accepted when initially submitted.

>  obj-$(CONFIG_MTD_SPI_NAND) += spi/

  reply	other threads:[~2018-11-18 21:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-18 20:07 [U-Boot] [PATCH 0/2] Remove MTD sub-directories from the root Makefile Miquel Raynal
2018-11-18 20:07 ` [U-Boot] [PATCH 1/2] mtd: nand: let the raw NAND devices be compiled upon selection Miquel Raynal
2018-11-18 21:06   ` Boris Brezillon [this message]
2018-11-18 20:07 ` [U-Boot] [PATCH 2/2] Makefile: move MTD-related lines in coherent Makefiles Miquel Raynal
2018-11-18 21:10   ` Boris Brezillon

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=20181118220608.511e011e@bbrezillon \
    --to=boris.brezillon@bootlin.com \
    --cc=u-boot@lists.denx.de \
    /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