1. 16 5月, 2017 1 次提交
    • C
      mtd: spi-nor: introduce SPI 1-2-2 and SPI 1-4-4 protocols · cfc5604c
      Cyrille Pitchen 提交于
      This patch changes the prototype of spi_nor_scan(): its 3rd parameter
      is replaced by a 'struct spi_nor_hwcaps' pointer, which tells the spi-nor
      framework about the actual hardware capabilities supported by the SPI
      controller and its driver.
      
      Besides, this patch also introduces a new 'struct spi_nor_flash_parameter'
      telling the spi-nor framework about the hardware capabilities supported by
      the SPI flash memory and the associated settings required to use those
      hardware caps.
      
      Then, to improve the readability of spi_nor_scan(), the discovery of the
      memory settings and the memory initialization are now split into two
      dedicated functions.
      
      1 - spi_nor_init_params()
      
      The spi_nor_init_params() function is responsible for initializing the
      'struct spi_nor_flash_parameter'. Currently this structure is filled with
      legacy values but further patches will allow to override some parameter
      values dynamically, for instance by reading the JESD216 Serial Flash
      Discoverable Parameter (SFDP) tables from the SPI memory.
      The spi_nor_init_params() function only deals with the hardware
      capabilities of the SPI flash memory: especially it doesn't care about
      the hardware capabilities supported by the SPI controller.
      
      2 - spi_nor_setup()
      
      The second function is called once the 'struct spi_nor_flash_parameter'
      has been initialized by spi_nor_init_params().
      With both 'struct spi_nor_flash_parameter' and 'struct spi_nor_hwcaps',
      the new argument of spi_nor_scan(), spi_nor_setup() computes the best
      match between hardware caps supported by both the (Q)SPI memory and
      controller hence selecting the relevant settings for (Fast) Read and Page
      Program operations.
      Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
      Reviewed-by: NMarek Vasut <marek.vasut@gmail.com>
      cfc5604c
  2. 17 4月, 2017 1 次提交
  3. 11 4月, 2017 1 次提交
  4. 23 3月, 2017 4 次提交
  5. 10 3月, 2017 1 次提交
  6. 08 3月, 2017 1 次提交
  7. 10 2月, 2017 8 次提交
  8. 09 2月, 2017 1 次提交
  9. 27 11月, 2016 3 次提交
  10. 26 11月, 2016 2 次提交
  11. 23 11月, 2016 2 次提交
  12. 14 7月, 2016 2 次提交
  13. 10 7月, 2016 1 次提交
    • B
      mtd: spi-nor: fix wrong "fully unlocked" test · 06586204
      Brian Norris 提交于
      In stm_unlock(), the test to determine whether we've fully unlocked the
      flash checks for the lock length to be equal to the flash size. That is
      a typo/think-o -- the condition actually means the flash is completely
      *locked.* We should be using the inverse condition -- that the lock
      length is 0 (i.e., no protection).
      
      The result of this bug is that we never actually turn off the Status
      Register Write Disable bit, even if the flash is completely unlocked.
      Now we can.
      
      Fixes: 47b8edbf ("mtd: spi-nor: disallow further writes to SR if WP# is low")
      Reported-by: NGiorgio <giorgio.nicole@arcor.de>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
      06586204
  14. 02 6月, 2016 5 次提交
  15. 11 5月, 2016 1 次提交
  16. 08 3月, 2016 6 次提交