From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/7] nand: add nand mtd concat support
Date: Thu, 2 Jun 2016 07:02:01 +0200 [thread overview]
Message-ID: <574FBDC9.6010002@denx.de> (raw)
In-Reply-To: <1464826156.16584.144.camel@buserror.net>
Hello Scott,
Am 02.06.2016 um 02:09 schrieb Scott Wood:
> 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.
Yes, you are right ... Hmm... thinking about it ... this did exactly
my v1 ... I created such an array "mtd_nand_list" ... Ok, this
"mtd_nand_list" was a variable in file scope ... but as it is an array
of pointers, the mem footprint is not so big ... but if you find it
better to scan nand_info and create a new array on stack, I can do
this ... what way do you preffer?
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
next prev parent reply other threads:[~2016-06-02 5:02 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
2016-06-02 5:02 ` Heiko Schocher [this message]
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=574FBDC9.6010002@denx.de \
--to=hs@denx.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.