1. 11 12月, 2018 17 次提交
  2. 28 11月, 2018 1 次提交
  3. 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
  4. 14 11月, 2018 4 次提交
  5. 06 11月, 2018 1 次提交
  6. 09 10月, 2018 3 次提交
  7. 01 8月, 2018 1 次提交
    • B
      mtd: spi-nor: only apply reset hacks to broken hardware · bb276262
      Brian Norris 提交于
      Commit 59b356ff ("mtd: m25p80: restore the status of SPI flash when
      exiting") is the latest from a long history of attempts to add reboot
      handling to handle stateful addressing modes on SPI flash. Some prior
      mostly-related discussions:
      
      http://lists.infradead.org/pipermail/linux-mtd/2013-March/046343.html
      [PATCH 1/3] mtd: m25p80: utilize dedicated 4-byte addressing commands
      
      http://lists.infradead.org/pipermail/barebox/2014-September/020682.html
      [RFC] MTD m25p80 3-byte addressing and boot problem
      
      http://lists.infradead.org/pipermail/linux-mtd/2015-February/057683.html
      [PATCH 2/2] m25p80: if supported put chip to deep power down if not used
      
      Previously, attempts to add reboot-time software reset handling were
      rejected, but the latest attempt was not.
      
      Quick summary of the problem:
      Some systems (e.g., boot ROM or bootloader) assume that they can read
      initial boot code from their SPI flash using 3-byte addressing. If the
      flash is left in 4-byte mode after reset, these systems won't boot. The
      above patch provided a shutdown/remove hook to attempt to reset the
      addressing mode before we reboot. Notably, this patch misses out on
      huge classes of unexpected reboots (e.g., crashes, watchdog resets).
      
      Unfortunately, it is essentially impossible to solve this problem 100%:
      if your system doesn't know how to reset the SPI flash to power-on
      defaults at initialization time, no amount of software can really rescue
      you -- there will always be a chance of some unexpected reset that
      leaves your flash in an addressing mode that your boot sequence didn't
      expect.
      
      While it is not directly harmful to perform hacks like the
      aforementioned commit on all 4-byte addressing flash, a
      properly-designed system should not need the hack -- and in fact,
      providing this hack may mask the fact that a given system is indeed
      broken. So this patch attempts to apply this unsound hack more narrowly,
      providing a strong suggestion to developers and system designers that
      this is truly a hack. With luck, system designers can catch their errors
      early on in their development cycle, rather than applying this hack long
      term. But apparently enough systems are out in the wild that we still
      have to provide this hack.
      
      Document a new device tree property to denote systems that do not have a
      proper hardware (or software) reset mechanism, and apply the hack (with
      a loud warning) only in this case.
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
      bb276262
  8. 18 5月, 2018 3 次提交
  9. 21 4月, 2018 4 次提交
  10. 21 3月, 2018 1 次提交
  11. 28 12月, 2017 2 次提交
  12. 20 12月, 2017 2 次提交