1. 06 8月, 2013 3 次提交
    • B
    • B
      mtd: m25p80: utilize dedicated 4-byte addressing commands · 87c9511f
      Brian Norris 提交于
      Traditionally, the command set used by SPI flash only supported a 3-byte
      address. However, large SPI flash (>= 32MiB, or 256Mib) require 4 bytes
      to address the entire flash. Most manufacturers have supplied a mode
      switch (via a "bank register writer", or a "enable 4-byte mode"
      command), which tells the flash to expect 4 address cycles from now on,
      instead of 3. This mode remains until power is cut, the reset line is
      triggered (on packages where present), or a command is sent to reset the
      flash or to reset the 3-byte addressing mode.
      
      As an alternative, some flash manufacturers have developed a new command
      set that accept a full 4-byte address. They can be used orthogonally to
      any of the modes; that is, they can be used when the flash is in either
      3-byte or 4-byte address mode.
      
      Now, there are a number of reasons why the "stateful" 4-byte address
      mode switch may not be acceptable. For instance, some SoC's perform a
      dumb boot sequence in which they only send 3-byte read commands to the
      flash. However, if an unexpected reset occurs, the flash chip cannot be
      guaranteed to return to its 3-byte mode. Thus, the SoC controller and
      flash will not understand each other. (One might consider hooking up the
      aforementioned reset pin to the system reset line so that any system
      reset will reset the flash to 3-byte mode, but some packages do not
      provide this pin. And in some other packages, one must choose between
      having a reset pin and having enough pins for 4-output QSPI support.
      It is an error prone process choosing a flash that will support a
      hardware reset pin!)
      
      This patch provides support for the new stateless command set, so that
      we can avoid the problems that come with a stateful addressing mode
      change. The flash can be left in "3-byte mode" while still accessing the
      entire flash.
      
      Note that Spansion supports this command set on all its large flash
      (e.g, S25FL512S), and Macronix has begun supporting this command set on
      some new flash (e.g., MX25L25635F). For the moment, I don't know how to
      differentiate the Macronix that don't support this command set (e.g.,
      MX25L25635E) from those that do, so this patch only supports Spansion.
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      Acked-by: NMarek Vasut <marex@denx.de>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      87c9511f
    • J
      mtd: m25p80: use spi_get_drvdata() and spi_set_drvdata() · 975aefc9
      Jingoo Han 提交于
      Use the wrapper functions for getting and setting the driver data using
      spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
      can directly pass a struct spi_device.
      Signed-off-by: NJingoo Han <jg1.han@samsung.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      975aefc9
  2. 05 4月, 2013 6 次提交
  3. 04 2月, 2013 2 次提交
  4. 03 12月, 2012 1 次提交
  5. 22 11月, 2012 4 次提交
  6. 15 11月, 2012 2 次提交
  7. 29 9月, 2012 6 次提交
  8. 17 7月, 2012 1 次提交
  9. 07 7月, 2012 4 次提交
  10. 14 5月, 2012 3 次提交
  11. 27 3月, 2012 6 次提交
  12. 10 1月, 2012 1 次提交
  13. 16 10月, 2011 1 次提交