1. 27 6月, 2019 1 次提交
  2. 24 6月, 2019 1 次提交
    • T
      mtd: spi-nor: use 16-bit WRR command when QE is set on spansion flashes · 191f5c2e
      Tudor Ambarus 提交于
      SPI memory devices from different manufacturers have widely
      different configurations for Status, Control and Configuration
      registers. JEDEC 216C defines a new map for these common register
      bits and their functions, and describes how the individual bits may
      be accessed for a specific device. For the JEDEC 216B compliant
      flashes, we can partially deduce Status and Configuration registers
      functions by inspecting the 16th DWORD of BFPT. Older flashes that
      don't declare the SFDP tables (SPANSION FL512SAIFG1 311QQ063 A ©11
      SPANSION) let the software decide how to interact with these registers.
      
      The commit dcb4b22e ("spi-nor: s25fl512s supports region locking")
      uncovered a probe error for s25fl512s, when the Quad Enable bit CR[1]
      was set to one in the bootloader. When this bit is one, only the Write
      Status (01h) command with two data byts may be used, the 01h command with
      one data byte is not recognized and hence the error when trying to clear
      the block protection bits.
      
      Fix the above by using the Write Status (01h) command with two data bytes
      when the Quad Enable bit is one.
      
      Backward compatibility should be fine. The newly introduced
      spi_nor_spansion_clear_sr_bp() is tightly coupled with the
      spansion_quad_enable() function. Both assume that the Write Register
      with 16 bits, together with the Read Configuration Register (35h)
      instructions are supported.
      
      Fixes: dcb4b22e ("spi-nor: s25fl512s supports region locking")
      Reported-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com>
      Tested-by: NJonas Bonn <jonas@norrbonn.se>
      Tested-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Reviewed-by: NVignesh Raghavendra <vigneshr@ti.com>
      Tested-by: NVignesh Raghavendra <vigneshr@ti.com>
      Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
      191f5c2e
  3. 22 6月, 2019 2 次提交
  4. 07 6月, 2019 2 次提交
  5. 01 4月, 2019 1 次提交
  6. 22 3月, 2019 2 次提交
  7. 21 2月, 2019 3 次提交
  8. 13 2月, 2019 1 次提交
  9. 10 2月, 2019 1 次提交
  10. 23 1月, 2019 2 次提交
  11. 17 1月, 2019 2 次提交
  12. 11 12月, 2018 19 次提交
  13. 28 11月, 2018 1 次提交
  14. 20 11月, 2018 1 次提交
    • T
      mtd: spi-nor: fix selection of uniform erase type in flexible conf · e8828ec1
      Tudor.Ambarus@microchip.com 提交于
      There are uniform, non-uniform and flexible erase flash configurations.
      
      The non-uniform erase types, are the erase types that can _not_ erase
      the entire flash by their own.
      
      As the code was, in case flashes had flexible erase capabilities
      (support both uniform and non-uniform erase types in the same flash
      configuration) and supported multiple uniform erase type sizes, the
      code did not sort the uniform erase types, and could select a wrong
      erase type size.
      
      Sort the uniform erase mask in case of flexible erase flash
      configurations, in order to select the best uniform erase type size.
      
      Uniform, non-uniform, and flexible configurations with just a valid
      uniform erase type, are not affected by this change.
      
      Uniform erase tested on mx25l3273fm2i-08g and sst26vf064B-104i/sn.
      Non uniform erase tested on sst26vf064B-104i/sn.
      
      Fixes: 5390a8df ("mtd: spi-nor: add support to non-uniform SFDP SPI NOR flash memories")
      Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com>
      Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
      e8828ec1
  15. 14 11月, 2018 1 次提交