1. 03 9月, 2015 3 次提交
  2. 26 8月, 2015 1 次提交
  3. 15 8月, 2015 1 次提交
  4. 22 7月, 2015 1 次提交
    • B
      mtd: m25p80: allow arbitrary OF matching for "jedec,spi-nor" · 43163022
      Brian Norris 提交于
      When we added the "jedec,spi-nor" compatible string for use in this
      driver, we added it as a modalias option. The modalias can be derived in
      different ways for platform devices vs. device tree (of_*) matching. But
      for device tree matching (the primary target of this identifier string),
      the modalias is determined from the first entry in the 'compatible'
      property. IOW, the following properties would bind to this driver:
      
      	// Option (a), modalias = "spi-nor"
      	compatible = "jedec,spi-nor";
      
      	// Option (b), modalias = "spi-nor"
      	compatible = "idontknowwhatimdoing,spi-nor";
      
      But the following would not:
      
      	// Option (c), modalias = "shinynewdevice"
      	compatible = "myvendor,shinynewdevice", "jedec,spi-nor";
      
      So, we'd like to match (a) and (c) (even when we don't have an explicit
      entry for "shinynewdevice"), and we'd rather not allow (b).
      
      To do this, we
        (1) always (for devices without specific platform data) pass the
            modalias to the spi-nor library;
        (2) rework the spi-nor library to not reject "bad" names, and
            instead just fall back to autodetection; and
        (3) add the .of_match_table to properly catch all "jedec,spi-nor".
      
      This allows (a) and (c) without warnings, and rejects (b).
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      43163022
  5. 21 7月, 2015 1 次提交
  6. 21 5月, 2015 2 次提交
  7. 07 5月, 2015 2 次提交
  8. 06 4月, 2015 4 次提交
  9. 28 3月, 2015 1 次提交
  10. 21 1月, 2015 1 次提交
  11. 08 1月, 2015 1 次提交
    • B
      mtd: spi-nor: Add quad I/O support for Micron SPI NOR · 548cd3ab
      Bean Huo 霍斌斌 (beanhuo) 提交于
      This patch adds code which enables Quad I/O mode on Micron SPI NOR flashes.
      
      For Micron SPI NOR flash, enabling or disabling quad I/O protocol can be
      done By two methods, which are to use EVCR (Enhanced Volatile
      Configuration Register) and the ENTER QUAD I/O MODE command. There is no
      difference between these two methods. Unfortunately, for some Micron SPI
      NOR flashes, there no ENTER Quad I/O command (35h), such as n25q064. But
      for all current Micron SPI NOR, if it support quad I/O mode, using EVCR
      definitely be supported. It is a recommended method to enable Quad I/O
      mode by EVCR, Quad I/O protocol bit 7. When EVCR bit 7 is reset to 0,
      the SPI NOR flash will operate in quad I/O mode.
      
      This patch has been tested on N25Q512A and MT25TL256BAA1ESF. Micron SPI
      NOR of spi_nor_ids[] table all support this method.
      Signed-off-by: NBean Huo <beanhuo@micron.com>
      Acked-by: NMarek Vasut <marex@denx.de>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      548cd3ab
  12. 02 12月, 2014 1 次提交
  13. 01 12月, 2014 4 次提交
  14. 26 11月, 2014 2 次提交
  15. 06 11月, 2014 3 次提交
  16. 05 11月, 2014 5 次提交
  17. 22 10月, 2014 2 次提交
    • B
      spi-nor: Remove spi_nor::read_id operation · e66fcf72
      Ben Hutchings 提交于
      There is currently no useful way to override the default
      implementation of this operation.  The returned struct spi_device_id
      must have a pointer to struct flash_info in its private data, but this
      structure is defined inside spi-nor.
      Signed-off-by: NBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      e66fcf72
    • B
      mtd: m25p80,spi-nor: Fix module aliases for m25p80 · a5b7616c
      Ben Hutchings 提交于
      m25p80's device ID table is now spi_nor_ids, defined in spi-nor.  The
      MODULE_DEVICE_TABLE() macro doesn't work with extern definitions, but
      its use was also removed at the same time.  Now if m25p80 is built as
      a module it doesn't get the necessary aliases to be loaded
      automatically.
      
      A clean solution to this will involve defining the list of device
      IDs in spi-nor.h and removing struct spi_device_id from the spi-nor
      API, but this is quite a large change.
      
      As a quick fix suitable for stable, copy the device IDs back into
      m25p80.
      
      Fixes: 03e296f6 ("mtd: m25p80: use the SPI nor framework")
      Cc: <stable@vger.kernel.org> # 3.16.x: 32f1b7c8: mtd: move support for struct flash_platform_data into m25p80
      Cc: <stable@vger.kernel.org> # 3.16.x: 90e55b38: mtd: m25p80: get rid of spi_get_device_id
      Cc: <stable@vger.kernel.org> # 3.16.x: 70f3ce05: mtd: spi-nor: make spi_nor_scan() take a chip type name, not spi_device_id
      Cc: <stable@vger.kernel.org> # 3.16.x
      Signed-off-by: NBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      a5b7616c
  18. 18 10月, 2014 1 次提交
  19. 29 9月, 2014 2 次提交
    • R
      mtd: move support for struct flash_platform_data into m25p80 · 32f1b7c8
      Rafał Miłecki 提交于
      This "type" seems to be an extra hint for m25p80 about the flash. Some
      archs register flash_platform_data with "name" set to "m25p80" and then
      with a real flash name set in "type". It seems to be a trick specific
      to the m25p80 so let's move it out of spi-nor.
      Btw switch to the spi_nor_match_id instead of iterating spi_nor_ids.
      Signed-off-by: NRafał Miłecki <zajec5@gmail.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      32f1b7c8
    • R
      mtd: spi-nor: add Kconfig option to disable 4K sectors · 57cf26c1
      Rafał Miłecki 提交于
      Current situation with 4K sectors is quite messy. First of all, some
      MTD "users" don't work with such small size. An example may be UBIFS
      which requires 15 KiB erase blocks as a minimum. In theory spi-nor
      should provide multiple erase regions and MTD "users" should use the
      one they need. Unforunately that is not implemented.
      
      In the result our flashes database in spi-nor is hackish. For some
      flashes we pretend they don't support 4K sectors just because some
      distribution uses UBIFS on it. This ofc leads to conflicts, like
      Samsung using w25q128 with 4K sectors vs. OpenWrt requiring it to
      pretend it's 64 KiB blocks only.
      
      My idea (plan?) for fixing this situation:
      1) Use real hw info (this requires a way for disabling 4K for now)
      2) Provide detailed info about erase regions
      3) Make UBIFS work with devices that support 4K sectors
      Signed-off-by: NRafał Miłecki <zajec5@gmail.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      57cf26c1
  20. 20 8月, 2014 2 次提交