24 Jan, 2018

1 commit

  • Commit ba45756 ("dm: x86: spi: Convert ICH SPI driver to driver model")
    removed the last usage of the spi_flash_probe_fdt function, rendering it
    obsolete.

    This patch removes the function.

    Reviewed-by: Simon Glass
    Reviewed-by: Jagan Teki
    Signed-off-by: Mario Six

    Mario Six
     

07 Oct, 2016

1 commit

  • At present there are two SPI functions only used by freescale which are
    defined in the spi_flash.h header. One function name matches an existing
    generic SPL function.

    Move these into a private header to avoid confusion.

    Arcturus looks like it does not actually support SPI, so drop the SPI code
    from that board.

    Signed-off-by: Simon Glass
    Reviewed-by: Tom Rini

    Simon Glass
     

19 Jan, 2016

1 commit

  • In a number of places we had wordings of the GPL (or LGPL in a few
    cases) license text that were split in such a way that it wasn't caught
    previously. Convert all of these to the correct SPDX-License-Identifier
    tag.

    Signed-off-by: Tom Rini

    Tom Rini
     

13 Jan, 2016

1 commit


13 Nov, 2015

1 commit

  • commit c3c016c "sf: Add SPI NOR protection mechanism" introduced
    flash_lock()/flash_unlock()/flash_is_locked() methods for SPI flash,
    but not every flash driver supplies these. We should test these
    methods against NULL before actually calling them.

    Signed-off-by: Bin Meng
    Reviewed-by: Fabio Estevam
    Reviewed-by: Jagan Teki

    Bin Meng
     

06 Nov, 2015

1 commit

  • Many SPI flashes have protection bits (BP2, BP1 and BP0) in the
    status register that can protect selected regions of the SPI NOR.

    Take these bits into account when performing erase operations,
    making sure that the protected areas are skipped.

    Tested on a mx6qsabresd:

    => sf probe
    SF: Detected M25P32 with page size 256 Bytes, erase size 64 KiB, total 4 MiB
    => sf protect lock 0x3f0000 0x10000
    => sf erase 0x3f0000 0x10000
    offset 0x3f0000 is protected and cannot be erased
    SF: 65536 bytes @ 0x3f0000 Erased: ERROR
    => sf protect unlock 0x3f0000 0x10000
    => sf erase 0x3f0000 0x10000
    SF: 65536 bytes @ 0x3f0000 Erased: OK

    Signed-off-by: Fabio Estevam
    [re-worked to fit the lock common to dm and non-dm]
    Signed-off-by: Jagan Teki
    Reviewed-by: Tom Rini
    Reviewed-by: Heiko Schocher
    Reviewed-by: Jagan Teki

    Fabio Estevam
     

25 Oct, 2015

2 commits

  • This patch adds flag status register reading support to
    spi_flash_cmd_wait_ready.

    Cc: Simon Glass
    Cc: Marek Vasut
    Cc: Michal Simek
    Cc: Siva Durga Prasad Paladugu
    Cc: Stefan Roese
    Cc: Tom Warren
    Cc: Tom Rini
    Cc: Hou Zhiqiang
    Tested-by: Jagan Teki
    Tested-by: Bin Meng
    Signed-off-by: Jagan Teki

    Jagan Teki
     
  • Use the flash->flags for generic usage, not only for dm-spi-flash,
    this will be used for future flag additions.

    [Correct the spi flash flags detect logic]
    Signed-off-by: Bin Meng
    Tested-by: Bin Meng
    Signed-off-by: Jagan Teki

    Jagan Teki
     

01 Jul, 2015

1 commit


28 Apr, 2015

1 commit


22 Apr, 2015

1 commit


19 Apr, 2015

1 commit


23 Oct, 2014

2 commits

  • Add a driver model uclass for SPI flash which supports the common
    operations (read, write, erase). Since we must keep support for the
    non-dm interface, some modification of the spi_flash header is required.

    CONFIG_DM_SPI_FLASH is used to enable driver model for SPI flash.

    Signed-off-by: Simon Glass
    Reviewed-by: Jagannadha Sutradharudu Teki

    Simon Glass
     
  • Since spi_flash.h is supposed to be the public API for SPI flash, move
    private things to sf_internal.h. Also tidy up a few comment nits.

    Signed-off-by: Simon Glass
    Reviewed-by: Jagannadha Sutradharudu Teki

    Simon Glass
     

24 Sep, 2014

1 commit

  • Currently, CONFIG_SPL_SPI_* #defines are used for controlling SPI boot in
    SPL. These #defines do not allow the user to select SPI mode for the SPI flash
    (there's no CONFIG_SPL_SPI_MODE, so the SPI mode is hardcoded in
    spi_spl_load.c), and duplicate information already provided by
    CONFIG_SF_DEFAULT_* #defines.

    Kill CONFIG_SPL_SPI_*, and use CONFIG_SF_DEFAULT_* instead.

    Cc: Tom Rini
    Cc: Marek Vasut
    Cc: Sudhakar Rajashekhara
    Cc: Lokesh Vutla
    Cc: Vitaly Andrianov
    Cc: Lars Poeschel
    Cc: Bo Shen
    Cc: Hannes Petermaier
    Cc: Michal Simek
    Acked-by: Marek Vasut
    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Jagannadha Sutradharudu Teki

    Nikita Kiryanov
     

23 Apr, 2014

1 commit


07 Mar, 2014

1 commit


13 Jan, 2014

3 commits


11 Jan, 2014

5 commits


10 Dec, 2013

1 commit


15 Oct, 2013

1 commit


07 Oct, 2013

7 commits


24 Jul, 2013

1 commit


24 Jun, 2013

4 commits

  • Flag status register polling is required for micron 512Mb flash
    devices onwards, for performing erase/program operations.

    Like polling for WIP(Write-In-Progress) bit in read status register,
    spi_flash_cmd_wait_ready will poll for PEC(Program-Erase-Control)
    bit in flag status register.

    Signed-off-by: Jagannadha Sutradharudu Teki
    Reviewed-by: Simon Glass

    Jagannadha Sutradharudu Teki
     
  • Defined bank addr code on CONFIG_SPI_FLASH_BAR macro, to reduce the
    size for existing boards which has < 16Mbytes SPI flashes.

    It's upto user which has provision to use the bank addr code for
    flashes which has > 16Mbytes.

    Signed-off-by: Jagannadha Sutradharudu Teki
    Reviewed-by: Simon Glass

    Jagannadha Sutradharudu Teki
     
  • Read the flash bank addr register to get the state of bank in
    a perticular flash. and also bank write happens only when there is
    a change in bank selection from user.

    bank read only valid for flashes which has > 16Mbytes those are
    opearted in 3-byte addr mode, each bank occupies 16Mytes.

    Suppose if the flash has 64Mbytes size consists of 4 banks like
    bank0, bank1, bank2 and bank3.

    Signed-off-by: Jagannadha Sutradharudu Teki
    Reviewed-by: Simon Glass

    Jagannadha Sutradharudu Teki
     
  • Bank/Extended addr commands are specific to particular
    flash vendor so discover them based on the idocode0.

    Assign the discovered bank commands to spi_flash members
    so-that the bank read/write will use their specific operations.

    Signed-off-by: Jagannadha Sutradharudu Teki

    Jagannadha Sutradharudu Teki
     

19 Mar, 2013

1 commit