1. 12 Mar, 2016 1 commit
    • Marek Vasut's avatar
      sf: Correct data types in stm_is_locked_sr() · ea9619ae
      Marek Vasut authored
      
      
      The stm_is_locked_sr() function is picked from Linux kernel. For reason
      unknown, the 64bit data types used by the function and present in Linux
      were replaced with 32bit unsigned ones, which causes trouble.
      
      The testcase performed was done using ST M25P80 chip.
      The command used was:
       => sf protect unlock 0 0x10000
      
      The call chain starts in stm_unlock(), which calls stm_is_locked_sr()
      with negative ofs argument. This works fine in Linux, where the "ofs"
      is loff_t, which is signed long long, while this fails in U-Boot, where
      "ofs" is u32 (unsigned int). Because of this signedness problem, the
      expression past the return statement to be incorrectly evaluated to 1,
      which in turn propagates back to stm_unlock() and results in -EINVAL.
      
      The correction is very simple, just use the correctly sized data types
      with correct signedness in the function to make it work as intended.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Reviewed-by: default avatarJagan Teki <jteki@openedev.com>
      ea9619ae
  2. 26 Feb, 2016 1 commit
  3. 23 Feb, 2016 1 commit
  4. 22 Jan, 2016 1 commit
  5. 13 Jan, 2016 12 commits
  6. 07 Jan, 2016 1 commit
  7. 11 Dec, 2015 10 commits
  8. 17 Nov, 2015 2 commits
  9. 13 Nov, 2015 1 commit
  10. 05 Nov, 2015 2 commits
  11. 25 Oct, 2015 4 commits
    • Jagan Teki's avatar
      sf: Add FSR support to spi_flash_cmd_wait_ready · baaaa753
      Jagan Teki authored
      
      
      This patch adds flag status register reading support to
      spi_flash_cmd_wait_ready.
      
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Michal Simek <michal.simek@xilinx.com>
      Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
      Cc: Stefan Roese <sr@denx.de>
      Cc: Tom Warren <twarren@nvidia.com>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Hou Zhiqiang <B48286@freescale.com>
      Tested-by: default avatarJagan Teki <jteki@openedev.com>
      Tested-by: default avatarBin Meng <bmeng.cn@gmail.com>
      Signed-off-by: default avatarJagan Teki <jteki@openedev.com>
      baaaa753
    • Jagan Teki's avatar
      sf: Update status reg check in spi_flash_cmd_wait_ready · 4efad20a
      Jagan Teki authored
      
      
      Current flash wait_ready logic is not modular to add new
      register status check, hence updated the status check for
      adding few more register checks in future.
      
      Below are the sf speed runs with 'sf update' on whole flash, 16MiB.
      
      => sf update 0x100 0x0 0x1000000
      device 0 whole chip
      16777216 bytes written, 0 bytes skipped in 59.564s, speed 289262 B/s
      
      => sf update 0x100 0x0 0x1000000
      device 0 whole chip
      16777216 bytes written, 0 bytes skipped in 62.549s, speed 275036 B/s
      
      => sf update 0x100 0x0 0x1000000
      device 0 whole chip
      16777216 bytes written, 0 bytes skipped in 61.276s, speed 284359 B/s
      
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Michal Simek <michal.simek@xilinx.com>
      Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
      Cc: Stefan Roese <sr@denx.de>
      Cc: Tom Warren <twarren@nvidia.com>
      Cc: Tom Rini <trini@konsulko.com>
      Tested-by: default avatarJagan Teki <jteki@openedev.com>
      Signed-off-by: default avatarJagan Teki <jteki@openedev.com>
      Tested-by: default avatarBin Meng <bmeng.cn@gmail.com>
      4efad20a
    • Jagan Teki's avatar
      sf: Optimize BAR write code · 70ccf594
      Jagan Teki authored
      
      
      Optimized spi-flash bar writing code and also removed
      unnecessary bank_sel in read_ops.
      
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Michal Simek <michal.simek@xilinx.com>
      Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
      Signed-off-by: default avatarJagan Teki <jteki@openedev.com>
      70ccf594
    • Jagan Teki's avatar
      sf: Return bank_sel, if flash->bank_curr == bank_sel · 3c75ade2
      Jagan Teki authored
      
      
      If computed bank_sel is same as flash->bank_curr which is
      computed at probe time, then return the bank_sel instead of zero.
      
      Cc: Michal Simek <michal.simek@xilinx.com>
      Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
      Signed-off-by: default avatarJagan Teki <jteki@openedev.com>
      3c75ade2
  12. 17 Aug, 2015 1 commit
  13. 22 Apr, 2015 1 commit
  14. 13 Dec, 2014 1 commit
  15. 23 Nov, 2014 1 commit