From: Miquel Raynal <miquel.raynal@bootlin.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 00/27] SPI-NAND support
Date: Thu, 26 Jul 2018 09:29:30 +0200 [thread overview]
Message-ID: <20180726092930.7acc0380@xps13> (raw)
In-Reply-To: <CAMty3ZC6E26Jg0P85+ULZ5Kof5ZU+vyG0YYR2K80OqnMBR18Jg@mail.gmail.com>
Hi Jagan,
Jagan Teki <jagan@amarulasolutions.com> wrote on Thu, 26 Jul 2018
11:00:56 +0530:
> On Fri, Jul 13, 2018 at 6:01 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 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:
> > - A few patches from Linux to resynchronize some areas of the MTD layer.
> > - Various fixes and re-organization of the MTD subsystem.
> > - The introduction of the SPI-mem interface.
> > - The addition of the generic SPI-NAND driver (and its bindings).
> > - Several SPI NAND chip drivers (Macronix, Micron, Winbond).
> > - A new 'mtd' command.
> > - Support for spi-nand devices in mtdparts.
> >
> > To test your SPI-NAND device with U-Boot simply follow these lines:
> >
> >> setenv mtdparts mtdparts=spi-nand0:1m(foo),-(bar)
> >> setenv mtdids spi-nand0=spi-nand0
> >> mtdparts # show the spi-nand device partitions
> >> ubi part bar # create a static UBI volume in the bar partition
> >
> > Thanks,
> > Miquèl
> >
> > Changes since v3:
> > -----------------
> > * Fixed the debug messages in spi-mem to print either Rx or Tx data.
> > * Fixed a Kconfig error that prevented to build mtdparts with plain
> > defconfig.
> > * Fixed a compilation error due to the above error that prevented one
> > file to be compiled.
> > * Adapted the mtd command to probe MTD partitions also.
> > * Declared mtd_probe_devices() in a header so mtdparts or UBI could
> > use it too (to probe all devices and MTD partitions in a clean way).
> > * As I worked on mtdparts, I found annoying and completely useless the
> > fact that we need to prefix the environment variable with
> > "mtdparts=". Canceled this obligation.
> > * Added one patch to allow spi-nand devices to be recognized by mtdparts
> > (this is purely useless but needed to be done in order to use this
> > command).
> > * Removed useless definitions of MTD device types in UBI code.
> > * Wrote a generic mtdparts environment variable parser, used by the mtd
> > command.
> > * Used the mtd_probe_devices() function from get_mtd_info() in
> > cmd/mtdparts.c to be sure the desired partition really does not exist
> > (otherwise it will be probed and then found).
> >
> > Changes since v2:
> > -----------------
> > * Rebased on u-boot master branch.
> > * Removed extra-parenthesis in
> > "mtd: Fallback to ->_read/write() when ->_read/write_oob() is missing"
> > * s/fiels/files/ in "mtd: move NAND fiels into a raw/ subdirectory"
> > * Do not describe generic SPI device properties in SPI NAND bindings.
> > * Changes in the mtd command:
> > * Printing more information in 'mtd list' (device type, device
> > characteristics)
> > * Switch to do_div() instead of '(u32)value64b % value32b' which only
> > worked because value32b was a power of 2.
> > * Removed erase.chip option.
> > * By default, erase/read/write happen on the full MTD device while a
> > dump will only work on a single page.
> >
> > Changes since v1:
> > -----------------
> > * Fixed the nand_memorg structure of the MX35LF2GE4AB chip.
> > * Added Reviewed-by tags from Jagan.
> > * Backported and squashed two patches fixing things in the SPI NAND core
> > received on the Linux ML.
> > * Backported more changes in mtdcore.c from Linux.
> > * Added a patch to add a fallback on mtd->_read/_write() in mtdcore.c
> > when mtd->_read/write_oob() is not supported.
> > * Removed the DT changes, useless as the DTs are not available in
> > mainline yet.
> > * Addressed Boris/Stefan comments on the 'mtd' command.
> > * Added support for multi-pages OOB read/write.
> >
> >
> > Boris Brezillon (7):
> > mtd: Fallback to ->_read/write_oob() when ->_read/write() is missing
> > mtd: Add sanity checks in mtd_write/read_oob()
> > mtd: nand: Add core infrastructure to deal with NAND devices
> > mtd: nand: Pass mode information to nand_page_io_req
> > spi: Extend the core to ease integration of SPI memory controllers
> > mtd: spinand: Add initial support for the MX35LF1GE4AB chip
> > dt-bindings: Add bindings for SPI NAND devices
> >
> > Brian Norris (1):
> > mtd: add get/set of_node/flash_node helpers
> >
> > Ezequiel Garcia (1):
> > mtd: Uninline mtd_write_oob and move it to mtdcore.c
> >
> > Frieder Schrempf (1):
> > mtd: spinand: Add initial support for Winbond W25M02GV
> >
> > Miquel Raynal (15):
> > mtd: Fallback to ->_read/write() when ->_read/write_oob() is missing
> > mtd: fix build issue with includes
> > mtd: move definitions to enlarge their range
> > mtd: move all flash categories inside MTD submenu
> > mtd: move NAND files into a raw/ subdirectory
> > mtd: rename nand into rawnand in Kconfig prompt
> > mtd: spinand: Add initial support for the MX35LF2GE4AB chip
> > mtd: declare MTD_PARTITIONS symbol in Kconfig
> > cmd: ubi: delete useless and misleading definitions
> > cmd: mtdparts: accept spi-nand devices
> > cmd: mtdparts: add a generic 'mtdparts' parser
> > cmd: mtdparts: remove useless 'mtdparts=' prefix
> > mtd: uclass: add probe function
> > cmd: mtd: add 'mtd' command
> > cmd: mtdparts: try to probe the MTD devices as a fallback
> >
> > Peter Pan (2):
> > mtd: nand: Add core infrastructure to support SPI NANDs
> > mtd: spinand: Add initial support for Micron MT29F2G01ABAGD
>
> Acked--by: Jagan Teki <jagan@openedev.com>
>
Thanks!
> Can you rebase on master and send the needed patches or whole? Look
> like some changes been added in drivers/mtd/nand/Kconfig
I'll wait a bit for Stefan review also and I think I missed something
in mtdparts: old partitions are not freed when creating new ones.
Kind regards,
Miquèl
next prev parent reply other threads:[~2018-07-26 7:29 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-13 12:31 [U-Boot] [PATCH v4 00/27] SPI-NAND support Miquel Raynal
2018-07-13 12:31 ` [U-Boot] [PATCH v4 01/27] mtd: Fallback to ->_read/write_oob() when ->_read/write() is missing Miquel Raynal
2018-07-13 12:31 ` [U-Boot] [PATCH v4 02/27] mtd: Uninline mtd_write_oob and move it to mtdcore.c Miquel Raynal
2018-07-13 12:31 ` [U-Boot] [PATCH v4 03/27] mtd: Add sanity checks in mtd_write/read_oob() Miquel Raynal
2018-07-13 12:31 ` [U-Boot] [PATCH v4 04/27] mtd: Fallback to ->_read/write() when ->_read/write_oob() is missing Miquel Raynal
2018-07-13 12:31 ` [U-Boot] [PATCH v4 05/27] mtd: add get/set of_node/flash_node helpers Miquel Raynal
2018-07-13 12:31 ` [U-Boot] [PATCH v4 06/27] mtd: fix build issue with includes Miquel Raynal
2018-07-13 12:31 ` [U-Boot] [PATCH v4 07/27] mtd: move definitions to enlarge their range Miquel Raynal
2018-07-13 12:31 ` [U-Boot] [PATCH v4 08/27] mtd: move all flash categories inside MTD submenu Miquel Raynal
2018-07-13 12:31 ` [U-Boot] [PATCH v4 09/27] mtd: move NAND files into a raw/ subdirectory Miquel Raynal
2018-07-13 12:31 ` [U-Boot] [PATCH v4 10/27] mtd: rename nand into rawnand in Kconfig prompt Miquel Raynal
2018-07-13 12:31 ` [U-Boot] [PATCH v4 11/27] mtd: nand: Add core infrastructure to deal with NAND devices Miquel Raynal
2018-07-13 12:31 ` [U-Boot] [PATCH v4 12/27] mtd: nand: Pass mode information to nand_page_io_req Miquel Raynal
2018-07-13 12:31 ` [U-Boot] [PATCH v4 13/27] spi: Extend the core to ease integration of SPI memory controllers Miquel Raynal
2018-07-13 12:32 ` [U-Boot] [PATCH v4 14/27] mtd: nand: Add core infrastructure to support SPI NANDs Miquel Raynal
2018-07-13 12:32 ` [U-Boot] [PATCH v4 15/27] mtd: spinand: Add initial support for Micron MT29F2G01ABAGD Miquel Raynal
2018-07-13 12:32 ` [U-Boot] [PATCH v4 16/27] mtd: spinand: Add initial support for Winbond W25M02GV Miquel Raynal
2018-07-13 12:32 ` [U-Boot] [PATCH v4 17/27] mtd: spinand: Add initial support for the MX35LF1GE4AB chip Miquel Raynal
2018-07-13 12:32 ` [U-Boot] [PATCH v4 18/27] mtd: spinand: Add initial support for the MX35LF2GE4AB chip Miquel Raynal
2018-07-13 12:32 ` [U-Boot] [PATCH v4 19/27] dt-bindings: Add bindings for SPI NAND devices Miquel Raynal
2018-07-13 12:32 ` [U-Boot] [PATCH v4 20/27] mtd: declare MTD_PARTITIONS symbol in Kconfig Miquel Raynal
2018-07-13 12:32 ` [U-Boot] [PATCH v4 21/27] cmd: ubi: delete useless and misleading definitions Miquel Raynal
2018-07-13 12:32 ` [U-Boot] [PATCH v4 22/27] cmd: mtdparts: accept spi-nand devices Miquel Raynal
2018-07-13 12:32 ` [U-Boot] [PATCH v4 23/27] cmd: mtdparts: add a generic 'mtdparts' parser Miquel Raynal
2018-07-13 12:32 ` [U-Boot] [PATCH v4 24/27] cmd: mtdparts: remove useless 'mtdparts=' prefix Miquel Raynal
2018-07-13 12:32 ` [U-Boot] [PATCH v4 25/27] mtd: uclass: add probe function Miquel Raynal
2018-07-13 12:32 ` [U-Boot] [PATCH v4 26/27] cmd: mtd: add 'mtd' command Miquel Raynal
2018-07-13 12:32 ` [U-Boot] [PATCH v4 27/27] cmd: mtdparts: try to probe the MTD devices as a fallback Miquel Raynal
2018-07-26 5:30 ` [U-Boot] [PATCH v4 00/27] SPI-NAND support Jagan Teki
2018-07-26 7:29 ` Miquel Raynal [this message]
2018-07-30 15:11 ` Stefan Roese
2018-07-30 15:23 ` Miquel Raynal
2018-07-30 16:10 ` Tom Rini
2018-07-31 5:36 ` Jagan Teki
2018-07-31 5:50 ` Stefan Roese
2018-07-31 7:37 ` 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=20180726092930.7acc0380@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