All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frieder Schrempf <frieder.schrempf@exceet.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v7 00/12] SPI-NAND support
Date: Thu, 20 Sep 2018 16:06:58 +0200	[thread overview]
Message-ID: <cf4d12ed-7d9e-074d-6a25-947cde728cdc@exceet.de> (raw)
In-Reply-To: <20180906091537.0f83a5ef@xps13>

Hi Jagan,

I just wanted to ask about the timeline for the SPI-NAND patches.
I remember that Tom wanted to have them in 2018.11. Is this going to 
happen or is there anything preventing this?

Thanks,
Frieder

On 06.09.2018 09:15, Miquel Raynal wrote:
> Hello,
> 
> I failed the numbering, this is actually the v8. The below changelog is
> still right though. I don't plan to resend unless I am explicitly told
> to do so.
> 
> Sorry for the mistake.
> 
> Thanks,
> Miquèl
> 
> 
> Miquel Raynal <miquel.raynal@bootlin.com> wrote on Thu,  6 Sep 2018
> 09:08:42 +0200:
> 
>> 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 23 patches have
>> already been taken):
>> - Various fixes
>> - 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
>>
>> Changes since v7:
>> -----------------
>> * Added Stefan R-b tags.
>> * Used tolower() as suggested by Stefan in lib/strto.c.
>> * Added a mention saying that we continue to abuse the kB suffix in
>>    lib/strto.c by not making a difference between kB and kiB which both
>>    mean "* 1024" for us. This has been added in the commit log.
>> * Fixed various bugs in the mtd command and in the parsers, they should
>>    be pretty stable now (tested with two MTD devices probed and several
>>    different partition configurations).
>> * mtdids is not deprecated at all as opposed at what I wrote in
>>    v6. U-Boot still uses its own MTD names (being <type><idx> like nor0
>>    or spi-nand1) and mtdids is still needed to do the glue.
>> * Removed a useless patch removing a Kconfig entry I added myself since
>>    during a rebase someone else also added this symbol.
>>
>> Changes since v6:
>> -----------------
>> * Squashed Boris' fixes about build issues in Travis.
>> * Merged Stefan Roese's contributions.
>> * cmd: mtdparts:
>>    * added fallthrough comments in switch blocks deriving sizes.
>>    * balanced debug messages to compare freed and allocated partitions.
>>    * move mtdparts_init() declaration in mtd/partitions.h to be used in
>>      mtd command as well.
>>    * introduced a "compatibility" function to return what the MTD device
>>      name could be thanks to the mtdids environment variable (which is
>>      useless with the new partitioning logic).
>> * mtd: mtdpart:
>>    * reworked the way partitions are created/handled.
>> * cmd: mtd:
>>    * implement a partitioning logic that takes the best out of the MTD
>>      layer without re-inventing the wheel. Partitions are all freed
>>      correctly when the value of mtdparts changes.
>>    * balance get_mtd_device() by put_mtd_device() calls.
>>    * prevent memory leak by reorganizing the code a bit in do_mtd.
>>    * do not reconstruct partition list when a partition is already in use
>>      (complain about that instead).
>>    * add support for the legacy mtdids (not needed anymore if mtdparts
>>      directly uses the MTD device names as in Linux.
>> * cmd: ubi:
>>    * clean and simplify the partition handling a bit to make use the best
>>      use of the MTD layer as well and keep the code simple.
>>
>> Changes since v5:
>> -----------------
>> * Included Boris fixup about the build issues.
>> * Added Rb/Ab tags from Jagan on patchs 20/21.
>>
>> Changes since v4:
>> -----------------
>> * Added Jagan's Acked-by tags to every patch related to the
>>    SPI-mem/SPI-NAND addition.
>> * Rebased on top of master.
>>
>> 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.
>>
>>
>> Miquel Raynal (12):
>>    lib: strto: parse all lowercase metric prefixes in ustrtoul[l]
>>    lib: strto: fix metric suffix parsing in strtoul[l]
>>    cmd: mtdparts: accept spi-nand devices
>>    cmd: mtdparts: remove mandatory 'mtdparts=' prefix
>>    mtd: uclass: add probe function
>>    mtd: uclass: add a generic 'mtdparts' parser
>>    mtd: uclass: search for an equivalent MTD name with the mtdids
>>    mtd: mtdpart: implement proper partition handling
>>    cmd: mtd: add 'mtd' command
>>    cmd: mtdparts: try to probe the MTD devices as a fallback
>>    cmd: ubi: clean the partition handling
>>    cmd: mtdparts: describe as legacy
>>
>>   cmd/Kconfig                    |  18 +-
>>   cmd/Makefile                   |   1 +
>>   cmd/mtd.c                      | 521 ++++++++++++++++++++++++++
>>   cmd/mtdparts.c                 |  46 ++-
>>   cmd/ubi.c                      | 100 ++---
>>   drivers/mtd/Makefile           |   2 +-
>>   drivers/mtd/mtd-uclass.c       |  16 +
>>   drivers/mtd/mtdcore.c          |   2 +
>>   drivers/mtd/mtdpart.c          | 660 +++++++++++++++++++++------------
>>   include/jffs2/load_kernel.h    |   7 +-
>>   include/linux/mtd/mtd.h        |  31 ++
>>   include/linux/mtd/partitions.h |   5 +-
>>   include/mtd.h                  |   3 +
>>   lib/strto.c                    |  36 +-
>>   14 files changed, 1094 insertions(+), 354 deletions(-)
>>   create mode 100644 cmd/mtd.c
>>
> 
> 
> 

  reply	other threads:[~2018-09-20 14:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-06  7:08 [U-Boot] [PATCH v7 00/12] SPI-NAND support Miquel Raynal
2018-09-06  7:08 ` [U-Boot] [PATCH v7 01/12] lib: strto: parse all lowercase metric prefixes in ustrtoul[l] Miquel Raynal
2018-09-06  7:08 ` [U-Boot] [PATCH v7 02/12] lib: strto: fix metric suffix parsing in strtoul[l] Miquel Raynal
2018-09-06  7:08 ` [U-Boot] [PATCH v7 03/12] cmd: mtdparts: accept spi-nand devices Miquel Raynal
2018-09-06  7:08 ` [U-Boot] [PATCH v7 04/12] cmd: mtdparts: remove mandatory 'mtdparts=' prefix Miquel Raynal
2018-09-06  7:08 ` [U-Boot] [PATCH v7 05/12] mtd: uclass: add probe function Miquel Raynal
2018-09-06  7:08 ` [U-Boot] [PATCH v7 06/12] mtd: uclass: add a generic 'mtdparts' parser Miquel Raynal
2018-09-06  7:08 ` [U-Boot] [PATCH v7 07/12] mtd: uclass: search for an equivalent MTD name with the mtdids Miquel Raynal
2018-09-06  7:08 ` [U-Boot] [PATCH v7 08/12] mtd: mtdpart: implement proper partition handling Miquel Raynal
2018-09-06  7:08 ` [U-Boot] [PATCH v7 09/12] cmd: mtd: add 'mtd' command Miquel Raynal
2018-09-06  9:42   ` Boris Brezillon
2018-09-06  7:08 ` [U-Boot] [PATCH v7 10/12] cmd: mtdparts: try to probe the MTD devices as a fallback Miquel Raynal
2018-09-06  9:46   ` Boris Brezillon
2018-09-06  7:08 ` [U-Boot] [PATCH v7 11/12] cmd: ubi: clean the partition handling Miquel Raynal
2018-09-06  9:52   ` Boris Brezillon
2018-09-06  7:08 ` [U-Boot] [PATCH v7 12/12] cmd: mtdparts: describe as legacy Miquel Raynal
2018-09-06  9:57   ` Boris Brezillon
2018-09-06  7:15 ` [U-Boot] [PATCH v7 00/12] SPI-NAND support Miquel Raynal
2018-09-20 14:06   ` Frieder Schrempf [this message]
2018-09-20 14:46     ` Jagan Teki
2018-09-20 14:59       ` Miquel Raynal
2018-09-20 15:22         ` Frieder Schrempf
2018-09-21  8:15         ` Jagan Teki
2018-09-21  8:25           ` Miquel Raynal
2018-09-26 15:14           ` 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=cf4d12ed-7d9e-074d-6a25-947cde728cdc@exceet.de \
    --to=frieder.schrempf@exceet.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.