15 Oct, 2013

1 commit


24 Jul, 2013

1 commit


25 Jun, 2013

1 commit

  • before writing the received buffer to nand, erase the nand
    sectors. If not doing this, nand write fails. See for
    more info here:

    http://lists.denx.de/pipermail/u-boot/2013-June/156361.html

    Using the nand erase option "spread", maybe overwrite
    blocks on, for example another mtd partition, if the
    erasing range contains bad blocks.
    So a limit option is added to nand_erase_opts()

    Signed-off-by: Heiko Schocher
    Cc: Scott Wood
    Cc: Pantelis Antoniou
    Cc: Lukasz Majewski
    Cc: Kyungmin Park
    Cc: Marek Vasut
    Cc: Tom Rini
    Signed-off-by: Scott Wood

    Heiko Schocher
     

01 Jun, 2013

1 commit

  • This patch is essentially an update of u-boot MTD subsystem to
    the state of Linux-3.7.1 with exclusion of some bits:

    - the update is concentrated on NAND, no onenand or CFI/NOR/SPI
    flashes interfaces are updated EXCEPT for API changes.

    - new large NAND chips support is there, though some updates
    have got in Linux-3.8.-rc1, (which will follow on top of this patch).

    To produce this update I used tag v3.7.1 of linux-stable repository.

    The update was made using application of relevant patches,
    with changes relevant to U-Boot-only stuff sticked together
    to keep bisectability. Then all changes were grouped together
    to this patch.

    Signed-off-by: Sergey Lapin
    [scottwood@freescale.com: some eccstrength and build fixes]
    Signed-off-by: Scott Wood

    Sergey Lapin
     

23 May, 2013

1 commit


10 Apr, 2013

1 commit

  • We make these two functions take a size_t pointer to how much space
    was used on NAND to read or write the buffer (when reads/writes happen)
    so that bad blocks can be accounted for. We also make them take an
    loff_t limit on how much data can be read or written. This means that
    we can now catch the case of when writing to a partition would exceed
    the partition size due to bad blocks. To do this we also need to make
    check_skip_len count not just complete blocks used but partial ones as
    well. All callers of nand_(read|write)_skip_bad are adjusted to call
    these with the most sensible limits available.

    The changes were started by Pantelis and finished by Tom.

    Signed-off-by: Pantelis Antoniou
    Signed-off-by: Tom Rini

    Tom Rini
     

27 Nov, 2012

1 commit

  • This patch adds a NAND Flash torture feature, which is useful as a block stress
    test to determine if a block is still good and reliable (or should be marked as
    bad), e.g. after a write error.

    This code is ported from mtd-utils' lib/libmtd.c.

    Signed-off-by: Benoît Thébaudeau
    Cc: Scott Wood
    [scottwood@freescale.com: removed unnec. ifdef and unwrapped error strings]
    Signed-off-by: Scott Wood

    Benoît Thébaudeau
     

18 Sep, 2012

3 commits


01 Sep, 2012

1 commit


30 Apr, 2012

1 commit


27 Jan, 2012

2 commits

  • This driver doesn't yet make use of the added flexibility (not that that
    should stop anyone from converting...), but it will with the in-progress
    hack to support 4k-page NAND.

    Signed-off-by: Scott Wood

    Scott Wood
     
  • This allows a driver to run code between nand_scan_ident() and
    nand_scan_tail(), among other things. See the additions to
    doc/README.nand for details.

    To allow a gradual transition, Boards that don't set
    CONFIG_SYS_NAND_SELF_INIT will still be initialized the old way, but
    new drivers should not require this, and existing drivers should be
    converted when convenient.

    Signed-off-by: Scott Wood

    Scott Wood
     

07 Dec, 2011

1 commit

  • Functions often used in SPL are now part of linux/mtd/nand.h.
    Static modifiers are removed from these functions in
    drivers/mtd/nand/nand_base.c.

    Signed-off-by: Simon Schwarz
    Cc: scottwood@freescale.com
    Cc: s-paulraj@ti.com
    Cc: albert.u.boot@aribaud.net
    Acked-by: Scott Wood

    Simon Schwarz
     

01 Oct, 2011

2 commits


02 Jul, 2011

3 commits

  • Add a flag to nand_read_skip_bad() such that if true, any trailing
    pages in an eraseblock whose contents are entirely 0xff will be
    dropped.

    The implementation is via a new drop_ffs() function which is
    based on the function of the same name from the ubiformat
    utility by Artem Bityutskiy.

    This is as-per the reccomendations of the UBI FAQ [1]

    [1] http://www.linux-mtd.infradead.org/doc/ubi.html#L_flasher_algo

    Signed-off-by: Ben Gardiner
    CC: Artem Bityutskiy
    Acked-by: Detlev Zundel
    CC: Scott Wood
    Signed-off-by: Scott Wood

    Ben Gardiner
     
  • When specified in the flags argument of nand_write, WITH_YAFFS_OOB causes an
    operation which is mutually exclusive with the 'usual' way of writing.

    Add a check that client code does not specify WITH_YAFFS_OOB along with any
    other flags and add a comment indicating that the WITH_YAFFS_OOB flag should
    not be mixed with other flags.

    Signed-off-by: Ben Gardiner
    CC: Scott Wood
    Signed-off-by: Scott Wood

    Ben Gardiner
     
  • In a future commit the behaviour of nand_write_skip_bad()
    will be further extended.

    Convert the only flag currently passed to the nand_write_
    skip_bad() function to a bitfield of only one allocated
    member. This should avoid an explosion of int's at the
    end of the parameter list or the ambiguous calls like

    nand_write_skip_bad(info, offset, len, buf, 0, 1, 1);
    nand_write_skip_bad(info, offset, len, buf, 0, 1, 0);

    Instead there will be:

    nand_write_skip_bad(info, offset, len, buf, WITH_YAFFS_OOB |
    WITH_OTHER);

    Signed-off-by: Ben Gardiner
    Acked-by: Detlev Zundel
    Signed-off-by: Scott Wood

    Ben Gardiner
     

13 Jan, 2011

1 commit


12 Oct, 2010

1 commit

  • A while back, in http://lists.denx.de/pipermail/u-boot/2009-June/054428.html,
    Michele De Candia posted a patch to not count bad blocks toward the
    requested size to be erased. This is desireable when you're passing in
    something like $filesize, but not when you're trying to erase a partition.

    Thus, a .spread subcommand (named for consistency with
    http://lists.denx.de/pipermail/u-boot/2010-August/075163.html) is introduced
    to make explicit the user's desire to erase for a given amount of data,
    rather than to erase a specific region of the chip.

    While passing $filesize to "nand erase" is useful, accidentally passing
    something like $fliesize currently produces quite unpleasant results, as the
    variable evaluates to nothing and U-Boot assumes that you want to erase
    the entire rest of the chip/partition. To improve the safety of the
    erase command, require the user to make explicit their intentions by
    using a .part or .chip subcommand. This is an incompatible user interface
    change, but keeping compatibility would eliminate the safety gain, and IMHO
    it's worth it.

    While touching nand_erase_opts(), make it accept 64-bit offsets and sizes,
    fix the percentage display when erase length is rounded up, eliminate
    an inconsistent warning about rounding up the erase length which only
    happened when the length was less than one block (rounding up for $filesize
    is normal operation), and add a diagnostic if there's an attempt to erase
    beginning at a non-block boundary.

    Signed-off-by: Scott Wood
    Tested-by: Ben Gardiner

    Scott Wood
     

13 Jul, 2010

1 commit

  • This is a re-submission of the patch by Harald Welte
    with minor modifications for rebase and changes
    as suggested by Scott Wood [1] [2].

    This patch enables the environment partition to have a run-time dynamic
    location (offset) in the NAND flash. The reason for this is simply that
    all NAND flashes have factory-default bad blocks, and a fixed compile
    time offset would mean that sometimes the environment partition would
    live inside factory bad blocks. Since the number of factory default
    blocks can be quite high (easily 1.3MBytes in current standard
    components), it is not economic to keep that many spare blocks inside
    the environment partition.

    With this patch and CONFIG_ENV_OFFSET_OOB enabled, the location of the
    environment partition is stored in the out-of-band (OOB) data of the
    first block in flash. Since the first block is where most systems boot
    from, the vendors guarantee that the first block is not a factory
    default block.

    This patch introduces the 'nand env.oob' command, which can be called
    from the u-boot command line. 'nand env.oob get' reads the address of
    the environment partition from the OOB data, 'nand env.oob set
    {offset,partition-name}' allows the setting of the marker by specifying
    a numeric offset or a partition name.

    [1] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/43916
    [2] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/79195

    Signed-off-by: Ben Gardiner
    Acked-by: Harald Welte

    Ben Gardiner
     

17 Jul, 2009

1 commit

  • Legacy NAND had been scheduled for removal. Any boards that use this
    were already not building in the previous release due to an #error.

    The disk on chip code in common/cmd_doc.c relies on legacy NAND,
    and it has also been removed. There is newer disk on chip code
    in drivers/mtd/nand; someone with access to hardware and sufficient
    time and motivation can try to get that working, but for now disk
    on chip is not supported.

    Signed-off-by: Scott Wood

    Scott Wood
     

08 Jul, 2009

1 commit


24 Jan, 2009

1 commit

  • Rather than putting the function prototype for board_nand_init() in the one
    place where it gets called, put it into nand.h so that every place that also
    defines it gets the prototype. Otherwise, errors can go silently unnoticed
    such as using the wrong return value (void rather than int) when defining
    the function.

    Signed-off-by: Mike Frysinger
    Signed-off-by: Scott Wood

    Mike Frysinger
     

19 Oct, 2008

1 commit


14 Aug, 2008

1 commit


13 Aug, 2008

4 commits

  • rename CFG_NAND_LEGACY to CONFIG_NAND_LEGACY

    Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD

    Jean-Christophe PLAGNIOL-VILLARD
     
  • Note that with older board revisions, NAND boot may only work after a
    power-on reset, and not after a warm reset. I don't have a newer board
    to test on; if you have a board with a 33MHz crystal, please let me know
    if it works after a warm reset.

    Signed-off-by: Scott Wood

    Scott Wood
     
  • Implement block-skipping read/write, based on a patch from
    Morten Ebbell Hestens .

    Signed-off-by: Morten Ebbell Hestnes
    Signed-off-by: Scott Wood

    Scott Wood
     
  • A lot changed in the Linux MTD code, since it was last ported from
    Linux to U-Boot. This patch takes U-Boot NAND support to the level
    of Linux 2.6.22.1 and will enable support for very large NAND devices
    (4KB pages) and ease the compatibility between U-Boot and Linux
    filesystems.

    This patch is tested on two custom boards with PPC and ARM
    processors running YAFFS in U-Boot and Linux using gcc-4.1.2
    cross compilers.

    MAKEALL ppc/arm has some issues:
    * DOC/OneNand/nand_spl is not building (I have not tried porting
    these parts, and since I do not have any HW and I am not familiar
    with this code/HW I think its best left to someone else.)

    Except for the issues mentioned above, I have ported all drivers
    necessary to run MAKEALL ppc/arm without errors and warnings. Many
    drivers were trivial to port, but some were not so trivial. The
    following drivers must be examined carefully and maybe rewritten to
    some degree:
    cpu/ppc4xx/ndfc.c
    cpu/arm926ejs/davinci/nand.c
    board/delta/nand.c
    board/zylonite/nand.c

    Signed-off-by: William Juul
    Signed-off-by: Stig Olsen
    Signed-off-by: Scott Wood

    William Juul
     

10 Jul, 2008

1 commit


28 Apr, 2008

1 commit


22 Jun, 2007

1 commit


20 Oct, 2006

1 commit


10 Oct, 2006

1 commit


24 Feb, 2006

1 commit


02 Nov, 2005

1 commit


15 Sep, 2005

1 commit