From: Miquel Raynal <miquel.raynal@bootlin.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v10 0/7] SPI-NAND support (third batch)
Date: Fri, 28 Sep 2018 09:07:59 +0200 [thread overview]
Message-ID: <20180928090759.5e204936@xps13> (raw)
In-Reply-To: <CAMty3ZDpC1tECRh1AVNv9m--NqqanWYSHEvu1JDFRUwQjVcUQQ@mail.gmail.com>
Hi Jagan,
Jagan Teki <jagan@amarulasolutions.com> wrote on Fri, 28 Sep 2018
12:18:49 +0530:
> On Thu, Sep 27, 2018 at 3:04 PM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> >
> > During the last months, Boris Brezillon shared his work to support
> > serial flashes within Linux. First, he delivered (and merged) a new
> > layer called spi-mem. He also initiated in Linux MTD subsystem the move
> > of all 'raw' NAND related code to a raw/ subdirectory, adding at the
> > same time a NAND core that would be shared with all NAND devices. Then,
> > he contributed a generic SPI-NAND driver, making use of this NAND core,
> > as well as some vendor code to drive a few chips.
> >
> > On top of this work, I made some cleanups in the MTD layer and added an
> > 'mtd' U-Boot command to handle all sort of MTD devices. This should
> > become the default command instead of having one per flash flavor
> > ('sf', 'nand', 'spi-nand' ?).
> >
> > The series has been tested on an Ocelot board PCB123 (VSC7514),
> > featuring a Macronix SPI NAND chip.
> >
> > TL;DR: the series contains (stripped version since ~30 patches have
> > already been taken):
> > - Support for spi-nand devices in mtdparts.
> > - Generics mtdparts/mtdids parsers.
> > - A new 'mtd' command.
> > - A note to set mtdparts command legacy.
> >
> > To test your SPI-NAND device with U-Boot, you can test someting like:
> >
> > > setenv mtdparts 'spi-nand0:1m(foo),-(bar)'
> > > setenv mtdids 'spi-nand0=spi0.0' # spi0.0 is Linux MTD name for this device
> > > ubi part bar # create a static UBI volume in the bar partition
> > > mtd list # show the current MTD devices/partitions
> >
> > Thanks,
> > Miquèl
> >
> >
> > NB1: If UBI refuses to attach, verify the partition is epty with
> > # mtd erase bar
> >
> > NB2: If your U-Boot crashes and you are using a non SPI-NAND device,
> > don't forget to probe your device *first* (sf probe, ...).
> >
> >
> > Changes since v9:
> > -----------------
> > * mtd_search_alternate_name() is moved in mtd_uboot.c (generic code,
> > everybody wants to use mtdids).
> > * mtd_parse_partitions() is still in mtdparts.c because it depends on
> > partitions support, but the header file declaring it
> > (include/linux/mtd/partitions.h) also has a dummy function if
> > #if IS_ENABLED(CONFIG_MTD_PARTITIONS) is false.
> > * Typo corrected in mtd_parse_partitions prototype
> > (s/_nb_parts/_nparts/).
> > * Added Boris' R-b tags.
> >
> > Changes since v8 (called v7 by mistake):
> > ----------------------------------------
> > * Moved most of the generic logic to the core (mtd_uboot.c) so that it
> > can be reused by other parts of U-Boot without depending on anything
> > else than the MTD core itself.
> > * Removed the "#ifdef CONFIG_MTD" around mtd_probe_devices() calls now
> > that the code is in the core.
> > * Created an helper for partitions deletion (as there is one to
> > parse/create partition objects).
> > * Enhanced a bit the text in Kconfig about deprecating mtdparts.
> > * Fixed checkpatch.pl warnings in the mtdparts driver.
> > * Drop "cmd: mtdparts: try to probe the MTD devices as a fallback" to
> > actually deprecate the command.
[...]
> > Miquel Raynal (7):
> > mtd: uclass: add probe function
> > mtd: mtdpart: add a generic mtdparts-like parser
> > mtd: uboot: search for an equivalent MTD name with the mtdids
> > mtd: mtdpart: implement proper partition handling
> > cmd: mtd: add 'mtd' command
> > cmd: ubi: clean the partition handling
> > cmd: mtdparts: describe as legacy
>
> I didn't find this mtdparts fallback change[1] in v10? does this
> fallback issue fixed differently.
>
> [1] https://github.com/openedev/u-boot-amarula/commit/9edbc2be512c9bd572884c53b5f54b583e897e9b
Indeed, I dropped this patch on Boris advice: if we want to deprecate
this command, we should not add new features to it (see the above
changelog).
Thanks,
Miquèl
next prev parent reply other threads:[~2018-09-28 7:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-27 9:32 [U-Boot] [PATCH v10 0/7] SPI-NAND support (third batch) Miquel Raynal
2018-09-27 9:32 ` [U-Boot] [PATCH v10 1/7] mtd: uclass: add probe function Miquel Raynal
2018-09-27 9:32 ` [U-Boot] [PATCH v10 2/7] mtd: mtdpart: add a generic mtdparts-like parser Miquel Raynal
2018-09-27 9:32 ` [U-Boot] [PATCH v10 3/7] mtd: uboot: search for an equivalent MTD name with the mtdids Miquel Raynal
2018-09-27 9:32 ` [U-Boot] [PATCH v10 4/7] mtd: mtdpart: implement proper partition handling Miquel Raynal
2018-09-27 9:32 ` [U-Boot] [PATCH v10 5/7] cmd: mtd: add 'mtd' command Miquel Raynal
2018-09-27 9:32 ` [U-Boot] [PATCH v10 6/7] cmd: ubi: clean the partition handling Miquel Raynal
2018-09-27 9:32 ` [U-Boot] [PATCH v10 7/7] cmd: mtdparts: describe as legacy Miquel Raynal
2018-09-28 6:48 ` [U-Boot] [PATCH v10 0/7] SPI-NAND support (third batch) Jagan Teki
2018-09-28 7:07 ` Miquel Raynal [this message]
2018-09-28 7:26 ` Jagan Teki
2018-09-28 7:35 ` Miquel Raynal
2018-09-28 9:40 ` Miquel Raynal
2018-09-28 13:39 ` Jagan Teki
2018-09-28 13:45 ` Miquel Raynal
2018-09-29 10:58 ` 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=20180928090759.5e204936@xps13 \
--to=miquel.raynal@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