29 Jul, 2017

2 commits


12 Jul, 2017

1 commit


02 Sep, 2016

1 commit

  • Now that nand_info[] is an array of pointers we need to test the
    pointer itself rather than using name as a proxy for NULLness.

    Fixes: b616d9b0a708eb9 ("nand: Embed mtd_info in struct nand_chip")
    Signed-off-by: Scott Wood
    Cc: Lukasz Majewski
    Cc: Tony Lindgren
    Acked-by: Tony Lindgren

    Scott Wood
     

10 Jun, 2016

1 commit


04 Jun, 2016

2 commits

  • nand_info[] is now an array of pointers, with the actual mtd_info
    instance embedded in struct nand_chip.

    This is in preparation for syncing the NAND code with Linux 4.6,
    which makes the same change to struct nand_chip. It's in a separate
    commit due to the large amount of changes required to accommodate the
    change to nand_info[].

    Signed-off-by: Scott Wood

    Scott Wood
     
  • This typedef serves no purpose other than causing confusion with
    struct nand_chip.

    Signed-off-by: Scott Wood

    Scott Wood
     

31 Mar, 2015

1 commit

  • Previously NAND writes were not verified and could fail silently. Add
    a verification step after all writes to NAND.

    Signed-off-by: Peter Tyser
    Reviewed-by: Lukasz Majewski
    Tested-by: Heiko Schocher
    Acked-by: Heiko Schocher

    Peter Tyser
     

09 Aug, 2014

2 commits

  • Devices are not all identified by a single integer. To support
    this, defer the parsing of the device string to the IO backed, so that
    it can apply the appropriate rules.

    SPI devices are specified as controller:chip_select. SPI/SF support will
    be added soon.

    MMC devices can also be specified as controller[.hwpart][:partition] in
    many commands, although we don't support that syntax in DFU.

    Signed-off-by: Stephen Warren

    Stephen Warren
     
  • DFU read support appears to rely upon dfu->read_medium() updating the
    passed-by-reference len parameter to indicate the remaining size
    available for reading.

    dfu_read_medium_mmc() never does this, and the implementation of
    dfu_read_medium_nand() will only work if called just once; it hard-codes
    the value to the total size of the NAND device irrespective of read
    offset.

    I believe that overloading dfu->read_medium() is confusing. As such,
    this patch introduces a new function dfu->get_medium_size() which can
    be used to explicitly find out the medium size, and nothing else.
    dfu_read() is modified to use this function to set the initial value for
    dfu->r_left, rather than attempting to use the side-effects of
    dfu->read_medium() for this purpose.

    Due to this change, dfu_read() must initially set dfu->b_left to 0, since
    no data has been read.

    dfu_read_buffer_fill() must also be modified not to adjust dfu->r_left
    when simply copying data from dfu->i_buf_start to the upload request
    buffer. r_left represents the amount of data left to be read from HW.
    That value is not affected by the memcpy(), but only by calls to
    dfu->read_medium().

    After this change, I can read from either a 4MB or 1.5MB chunk of a 4MB
    eMMC boot partion with CONFIG_SYS_DFU_DATA_BUF_SIZE==1MB. Without this
    change, attempting to do that would result in DFU read returning no data
    at all due to r_left never being set.

    Signed-off-by: Stephen Warren

    Stephen Warren
     

08 May, 2014

1 commit

  • add a possibility to add a medium specific polltimeout
    function. So it is possible to define different
    poll timeouts.

    Used on nand medium, for setting the DFU_MANIFEST_POLL_TIMEOUT
    only on nand ubi partitions, which is currently the only
    usecase.

    Change-Id: If1db5f49b32d93fefa7481e8dfe5b7ccc0e65af4
    Signed-off-by: Heiko Schocher
    Cc: Kyungmin Park
    Cc: Marek Vasut
    Cc: Pantelis Antoniou
    Reviewed-by: Marek Vasut
    Acked-by: Lukasz Majewski

    Heiko Schocher
     

09 Nov, 2013

1 commit

  • Nowhere pass a value to len, which always 0, make no transfer which
    cause uploading failed.

    This patch make nand upload working. However it needs enough malloc
    buffer to store read data, that means the buffer at least equal to
    the upload partition size, or else it doesn't work.

    Signed-off-by: Bo Shen

    Bo Shen
     

24 Sep, 2013

1 commit

  • MMC and NAND independently defines same enumerators for read/write.
    Unify them by defining enum in dfu header. RAM support that is being
    added newly also can make use of it.

    Signed-off-by: Afzal Mohammed
    Cc: Heiko Schocher
    Cc: Marek Vasut
    Cc: Lukasz Majewski
    Cc: Pantelis Antoniou
    Acked-by: Lukasz Majewski
    Acked-by: Marek Vasut
    Acked-by: Heiko Schocher

    Afzal Mohammed
     

27 Aug, 2013

1 commit

  • updating an ubi partition needs a completely erased mtd partition,
    see:
    http://lists.infradead.org/pipermail/linux-mtd/2011-May/035416.html

    So, add partubi alt setting for the dfu_alt_info environment
    variable to mark this partition as an ubi partition. In case we
    update an ubi partition, we erase after flashing the image into the
    partition, the remaining sektors.

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

    Heiko Schocher
     

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
     

10 Apr, 2013

1 commit