public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Scott Wood <oss@buserror.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/7] nand: add nand mtd concat support
Date: Wed, 01 Jun 2016 19:09:16 -0500	[thread overview]
Message-ID: <1464826156.16584.144.camel@buserror.net> (raw)
In-Reply-To: <1464696492-10349-4-git-send-email-hs@denx.de>

On Tue, 2016-05-31 at 14:08 +0200, Heiko Schocher wrote:
> @@ -59,6 +64,9 @@ int nand_register(int devnum, struct mtd_info *mtd)
>  	 * via the mtdcore infrastructure (e.g. ubi).
>  	 */
>  	add_mtd_device(mtd);
> +#ifdef CONFIG_MTD_CONCAT
> +	nand_devices_found++;
> +#endif
>  #endif
[snip]
> +		sprintf(c_mtd_name, "nand%d", nand_devices_found);
> +		mtd = mtd_concat_create(nand_info, nand_devices_found,
> +					c_mtd_name);

This assumes that there are no gaps in the NAND numbering (e.g. because some
device was optional or failed to init).  It would be better to build an array
by scanning nand_info[] for non-NULL devices.

-SCott

  reply	other threads:[~2016-06-02  0:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-31 12:08 [U-Boot] [PATCH v2 0/7] add support for the etamin draco board variant Heiko Schocher
2016-05-31 12:08 ` [U-Boot] [PATCH v2 1/7] siemens,am33x: add ubi fastmap support Heiko Schocher
2016-05-31 12:08 ` [U-Boot] [PATCH v2 2/7] ubi: add new ubi command "ubi detach" Heiko Schocher
2016-05-31 12:08 ` [U-Boot] [PATCH v2 3/7] nand: add nand mtd concat support Heiko Schocher
2016-06-02  0:09   ` Scott Wood [this message]
2016-06-02  5:02     ` Heiko Schocher
2016-06-03 22:30       ` Scott Wood
2016-05-31 12:08 ` [U-Boot] [PATCH v2 4/7] mtd: nand: omap: allow to switch to BCH16 Heiko Schocher
2016-05-31 12:08 ` [U-Boot] [PATCH v2 5/7] am335x, dxr2: get ECC sType from I2C eeprom Heiko Schocher
2016-05-31 12:08 ` [U-Boot] [PATCH v2 6/7] dfu, nand, ubi: fix erasing after write finish Heiko Schocher
2016-05-31 14:43   ` Lukasz Majewski
2016-05-31 12:08 ` [U-Boot] [PATCH v2 7/7] siemens,am33x: add draco etamin board Heiko Schocher

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=1464826156.16584.144.camel@buserror.net \
    --to=oss@buserror.net \
    --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