21 Apr, 2017

1 commit

  • commit 6e1eb089be0440477d030846087b03dfbebd4b10 upstream.

    Various commands to NAND flash results in the NAND flash becoming busy.
    For those commands the SoC should wait until the NAND indicates it is
    no longer busy before sending further commands. However, there is a delay
    between the time the SoC sends its last command and when the NAND flash
    sets its Ready/Busy Pin. This delay (tWB) must be respected or the SoC may
    falsely assume the flash is ready when in reality it just hasn't had enough
    time to indicate that it is busy.

    Properly delaying by tWB is already done for nand_command/nand_command_lp
    in nand_base.c including the version of it in the Linux kernel. Therefore,
    this patch brings the handling of tWB delay inline to nand_base.c

    Acked-by: Roger Quadros
    Signed-off-by: Franklin S Cooper Jr
    [trini: Reformat comments slightly]
    Signed-off-by: Tom Rini

    Cooper Jr., Franklin
     

14 Feb, 2017

4 commits


04 Jan, 2017

1 commit

  • SPL from nand will print 'NAND' in boot_from_devices based on
    the image_loader name, remove the extra 'NAND ' in mxs_nand_spl driver.

    Original behaviour:
    -------------------
    U-Boot SPL 2017.01-rc2-gf84dd8b (Jan 02 2017 - 22:24:19)
    Trying to boot from NANDNAND : 512 MiB

    After the fix:
    -------------
    U-Boot SPL 2017.01-rc2-gf84dd8b-dirty (Jan 02 2017 - 23:17:00)
    Trying to boot from NAND: 512 MiB

    Cc: Tom Rini
    Signed-off-by: Jagan Teki

    Jagan Teki
     

16 Dec, 2016

1 commit

  • This reverts commit c56ae7519f141523ba1248b22b5b5169b21772fe.

    Once the 'Quad Enable' bit is cleared in their Enhanced Volatile
    Configuration Register (EVCR), Micron memories expect ALL commands to use
    the SPI 4-4-4 protocol. Commands using SPI 1-y-z protocols are no longer
    accepted.

    Within the reverted commit, the write_evcr() function is implemented using
    the spi_flash_write_common(), which is a shortcut for the
    [ spi_flash_cmd_write_enable(), spi_flash_cmd_write(),
    spi_flash_cmd_wait_ready() ] sequence.

    Since the internal state of the Micron memory has been changed when the
    spi_flash_cmd_write() function completes, the later call of the
    spi_flash_cmd_wait_ready() function fails.

    Indeed the SPI controller driver is not aware of the SPI protocol switch.

    Further patches will fix the support of Micron QSPI memories.

    Signed-off-by: Cyrille Pitchen
    [Rebase on master, use JEDEC_MFR(info) in place of idcode0]
    Signed-off-by: Jagan Teki

    Cyrille Pitchen
     

15 Dec, 2016

2 commits


09 Dec, 2016

1 commit

  • It is useful to name each method so that we can print out this name when
    using the method. Currently this happens using a separate function. In
    preparation for unifying this, add a name to each method.

    The name is only available if we have libcommon support (i.e can use
    printf()).

    Signed-off-by: Simon Glass

    Simon Glass
     

05 Dec, 2016

1 commit

  • The indentation is misleading here and suggests that the write command
    will be only executed in the else clause.
    It seems like this is not intended, so fix the indentation to avoid
    both compiler warnings and puzzled readers.

    Pointed out by GCC 6.2's -Wmisleading-indentation warning.

    Signed-off-by: Andre Przywara
    Reviewed-by: Stefan Roese

    Andre Przywara
     

04 Dec, 2016

1 commit


29 Nov, 2016

1 commit


26 Nov, 2016

1 commit


22 Nov, 2016

1 commit


21 Nov, 2016

1 commit


19 Nov, 2016

6 commits

  • s25fs512s and s25fl512s_256k have common id information
    till 5 bytes and 6th byte have different family id
    like FS and FL-S as 0x81 and 0x80.

    Reported-by: Vignesh R
    Signed-off-by: Jagan Teki

    Jagan Teki
     
  • - fix single line comments
    - remove unneeded spaces
    - ascending order of include files
    - rename SPI DATAFLASH to dataflash
    - rename SPI DataFlash to dataflash
    - return NULL replaced with error code

    Cc: Bin Meng
    Cc: York Sun
    Signed-off-by: Jagan Teki
    Reviewed-by: Simon Glass
    Reviewed-by: Jagan Teki

    Jagan Teki
     
  • This patch fixed the add_dataflash return logic,
    so-that it can handle both jedec and older chips
    same as Linux.

    Cc: Bin Meng
    Cc: York Sun
    Signed-off-by: Jagan Teki
    Reviewed-by: Simon Glass
    Reviewed-by: Jagan Teki

    Jagan Teki
     
  • Flash id detection should be the first step to enumerate
    the connected flash on the board, once ie done checking
    with respective id codes locally in the driver all this
    should be part of jedec_probe instead of id detection and
    validated through flash_info{} table separatly.

    Cc: Bin Meng
    Cc: York Sun
    Signed-off-by: Jagan Teki
    Reviewed-by: Simon Glass
    Reviewed-by: Jagan Teki

    Jagan Teki
     
  • dataflash doesn't require options, memory_map from spi.

    Cc: Bin Meng
    Cc: Simon Glass
    Cc: York Sun
    Signed-off-by: Jagan Teki
    Reviewed-by: Simon Glass
    Reviewed-by: Jagan Teki

    Jagan Teki
     
  • Dual flash code in spi are usually take the spi controller
    to work with dual connected flash devices. Usually these
    dual connection operation's are referred to flash controller
    protocol rather with spi controller protocol, these are still
    present in flash side for the usage of spi-nor controllers.

    So, this patch remove the dual_flash options or flags in sf
    which are triggered from spi controller side.

    Cc: Bin Meng
    Cc: York Sun
    Cc: Vignesh R
    Cc: Mugunthan V N
    Cc: Michal Simek
    Cc: Siva Durga Prasad Paladugu
    Signed-off-by: Jagan Teki
    Reviewed-by: Simon Glass
    Reviewed-by: Jagan Teki

    Jagan Teki
     

18 Nov, 2016

15 commits

  • spi_flash_write_bar-> write_bar
    spi_flash_write_bar -> read_bar
    spi_flash_cmd_wait_ready -> spi_flash_wait_till_ready

    Cc: Bin Meng
    Cc: York Sun
    Cc: Vignesh R
    Cc: Mugunthan V N
    Cc: Michal Simek
    Cc: Siva Durga Prasad Paladugu
    Signed-off-by: Jagan Teki
    Reviewed-by: Simon Glass
    Reviewed-by: Jagan Teki

    Jagan Teki
     
  • Use small 'd' in s25s512s ext_jedec

    Cc: Bin Meng
    Cc: York Sun
    Cc: Vignesh R
    Cc: Mugunthan V N
    Cc: Michal Simek
    Signed-off-by: Jagan Teki
    Reviewed-by: Simon Glass
    Reviewed-by: Jagan Teki
    Reviewed-by: Siva Durga Prasad Paladugu

    Jagan Teki
     
  • For readability use small letter's with flash name.

    Cc: Bin Meng
    Cc: York Sun
    Cc: Vignesh R
    Cc: Mugunthan V N
    Cc: Michal Simek
    Signed-off-by: Jagan Teki
    Reviewed-by: Simon Glass
    Reviewed-by: Jagan Teki
    Tested-by: Jagan Teki
    Reviewed-by: Siva Durga Prasad Paladugu

    Jagan Teki
     
  • Now the flash params table as renamed to spi_flash_ids structure,
    so rename the sf_params.c to spi_flash_ids.c and remove the legacy.

    Cc: Bin Meng
    Cc: York Sun
    Cc: Vignesh R
    Cc: Mugunthan V N
    Cc: Michal Simek
    Signed-off-by: Jagan Teki
    Reviewed-by: Jagan Teki
    Tested-by: Jagan Teki
    Reviewed-by: Siva Durga Prasad Paladugu

    Jagan Teki
     
  • Remove unneeded/non-meaningful commit message on
    params and flash.

    Cc: Bin Meng
    Cc: York Sun
    Cc: Vignesh R
    Cc: Mugunthan V N
    Cc: Michal Simek
    Signed-off-by: Jagan Teki
    Reviewed-by: Simon Glass
    Reviewed-by: Jagan Teki
    Reviewed-by: Siva Durga Prasad Paladugu

    Jagan Teki
     
  • In spansion S25FS-S family the physical sectors are grouped as
    normal and parameter sectors. Parameter sectors are 4kB in size
    with 8 set located at the bottom or top address of a device.
    Normal sectors are similar to other flash family with sizes of
    64kB or 32 kB.

    To erase whole flash using sector erase(D8h or DCh) won't effect
    the parameter sectors, so in order to erase these we must use 4K
    sector erase commands (20h or 21h) separately.

    So better to erase the whole flash using 4K sector erase instead
    of detecting these family parts again and do two different erase
    operations.

    For this:
    - Removed spansion_s25fss_disable_4KB_erase code
    - Add SECT_4K for S25FS512S chip

    Cc: Yunhui Cui
    Cc: Bin Meng
    Cc: York Sun
    Cc: Vignesh R
    Cc: Mugunthan V N
    Cc: Michal Simek
    Cc: Michael Trimarchi
    Cc: Siva Durga Prasad Paladugu
    Signed-off-by: Jagan Teki
    Reviewed-by: Simon Glass
    Reviewed-by: Jagan Teki
    Tested-by: Jagan Teki

    Jagan Teki
     
  • Add Spansion S25FS256S_64K spi flash to the list of spi_flash_ids.

    In spansion S25FS-S family the physical sectors are grouped as
    normal and parameter sectors. Parameter sectors are 4kB in size
    with 8 set located at the bottom or top address of a device.
    Normal sectors are similar to other flash family with sizes of
    64kB or 32 kB.

    To erase whole flash using sector erase(D8h or DCh) won't effect
    the parameter sectors, so in order to erase these we must use 4K
    sector erase commands (20h or 21h) separately.

    So better to erase the whole flash using 4K sector erase instead
    of detecting these family parts again and do two different erase
    operations.

    Cc: Yunhui Cui
    Cc: Bin Meng
    Cc: York Sun
    Cc: Vignesh R
    Cc: Mugunthan V N
    Cc: Michal Simek
    Cc: Michael Trimarchi
    Cc: Siva Durga Prasad Paladugu
    Signed-off-by: Jagan Teki
    Reviewed-by: Simon Glass
    Reviewed-by: Jagan Teki

    Jagan Teki
     
  • INFO6 is for tabulating 6 byte flash parts, Ex: S25FS256S_64K

    Cc: Bin Meng
    Cc: York Sun
    Cc: Vignesh R
    Cc: Mugunthan V N
    Cc: Michal Simek
    Cc: Siva Durga Prasad Paladugu
    Signed-off-by: Jagan Teki
    Reviewed-by: Simon Glass
    Reviewed-by: Jagan Teki
    Tested-by: Jagan Teki

    Jagan Teki
     
  • So, now SPI_FLASH_ID_MAX_LEN is 6 bytes useful for
    few spansion flash families S25FS-S

    Cc: Bin Meng
    Cc: York Sun
    Cc: Vignesh R
    Cc: Mugunthan V N
    Cc: Michal Simek
    Signed-off-by: Jagan Teki
    Reviewed-by: Simon Glass
    Reviewed-by: Jagan Teki
    Tested-by: Jagan Teki
    Reviewed-by: Siva Durga Prasad Paladugu

    Jagan Teki
     
  • Add id length of 5 bytes numerical value to macro.

    Cc: Bin Meng
    Cc: York Sun
    Cc: Vignesh R
    Cc: Mugunthan V N
    Cc: Michal Simek
    Cc: Siva Durga Prasad Paladugu
    Signed-off-by: Jagan Teki
    Reviewed-by: Simon Glass
    Reviewed-by: Jagan Teki
    Tested-by: Jagan Teki

    Jagan Teki
     
  • Rename nr_sectors as n_sectors to sync with Linux.

    Cc: Bin Meng
    Cc: York Sun
    Cc: Vignesh R
    Cc: Mugunthan V N
    Cc: Michal Simek
    Signed-off-by: Jagan Teki
    Reviewed-by: Simon Glass
    Reviewed-by: Jagan Teki
    Tested-by: Jagan Teki
    Reviewed-by: Siva Durga Prasad Paladugu

    Jagan Teki
     
  • - Proper tabs spaces
    - Removed unnecessary
    - Add comments in spi_flash_info members
    - Add comments for spi_flash_info.flags

    Cc: Simon Glass
    Cc: Bin Meng
    Cc: York Sun
    Cc: Vignesh R
    Cc: Mugunthan V N
    Cc: Michal Simek
    Signed-off-by: Jagan Teki
    Reviewed-by: Siva Durga Prasad Paladugu
    Reviewed-by: Jagan Teki

    Jagan Teki
     
  • Instead of extracting id's separately better
    to use JEDEC_MFR|ID for code simplicity.

    Cc: Bin Meng
    Signed-off-by: Jagan Teki
    Reviewed-by: Simon Glass
    Reviewed-by: Jagan Teki
    Tested-by: Jagan Teki

    Jagan Teki
     
  • Simplify the flash_lock ops detection code and added
    meaningful comment.

    Cc: Bin Meng
    Cc: York Sun
    Cc: Vignesh R
    Cc: Mugunthan V N
    Cc: Michal Simek
    Cc: Siva Durga Prasad Paladugu
    Signed-off-by: Jagan Teki
    Reviewed-by: Simon Glass
    Reviewed-by: Jagan Teki
    Tested-by: Jagan Teki

    Jagan Teki
     
  • INFO macro make flash table entries more adjustable like
    adding new flash_info attributes, update ID length bytes
    and so on and more over it will sync to Linux way of defining
    flash_info attributes.

    - Add JEDEC_ID
    - Add JEDEC_EXT macro
    - Add JEDEC_MFR
    - spi_flash_params => spi_flash_info
    - params => info

    Cc: Simon Glass
    Cc: Bin Meng
    Cc: York Sun
    Cc: Vignesh R
    Cc: Mugunthan V N
    Cc: Michal Simek
    Cc: Siva Durga Prasad Paladugu
    Reviewed-by: Jagan Teki
    Tested-by: Jagan Teki
    Signed-off-by: Jagan Teki

    Jagan Teki
     

15 Nov, 2016

2 commits


26 Oct, 2016

1 commit