1. 25 4月, 2017 1 次提交
    • B
      mtd: nand: Cleanup/rework the atmel_nand driver · f88fc122
      Boris Brezillon 提交于
      This is a complete rewrite of the driver whose main purpose is to
      support the new DT representation where the NAND controller node is now
      really visible in the DT and appears under the EBI bus. With this new
      representation, we can add other devices under the EBI bus without
      risking pinmuxing conflicts (the NAND controller is under the EBI
      bus logic and as such, share some of its pins with other devices
      connected on this bus).
      
      Even though the goal of this rework was not necessarily to add new
      features, the new driver has been designed with this in mind. With a
      clearer separation between the different blocks and different IP
      revisions, adding new functionalities should be easier (we already
      have plans to support SMC timing configuration so that we no longer
      have to rely on the configuration done by the bootloader/bootstrap).
      
      Also note that we no longer have a custom ->cmdfunc() implementation,
      which means we can now benefit from new features added in the core
      implementation for free (support for new NAND operations for example).
      
      The last thing that we gain with this rework is support for multi-chips
      and multi-dies chips, thanks to the clean NAND controller <-> NAND
      devices representation.
      
      During this transition we also dropped support for AVR32 SoCs which
      should soon disappear from mainline (removal of the AVR32 arch is
      planned for 4.12).
      
      This new driver has been tested on several platforms (at91sam9261,
      at91sam9g45, at91sam9x5, sama5d3 and sama5d4) to make sure it did not
      introduce regressions, and it's worth mentioning that old bindings are
      still supported (which partly explain the positive diffstat).
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      Acked-by: NNicolas Ferre <nicolas.ferre@microchip.com>
      f88fc122
  2. 09 3月, 2017 7 次提交
  3. 07 11月, 2016 1 次提交
  4. 22 10月, 2016 1 次提交
  5. 11 7月, 2016 1 次提交
  6. 11 3月, 2016 1 次提交
    • A
      mtd: nand: Qualcomm NAND controller driver · c76b78d8
      Archit Taneja 提交于
      The Qualcomm NAND controller is found in SoCs like IPQ806x, MSM7xx,
      MDM9x15 series.
      
      It exists as a sub block inside the IPs EBI2 (External Bus Interface 2)
      and QPIC (Qualcomm Parallel Interface Controller). These IPs provide a
      broader interface for external slow peripheral devices such as LCD and
      NAND/NOR flash memory or SRAM like interfaces.
      
      We add support for the NAND controller found within EBI2. For the SoCs
      of our interest, we only use the NAND controller within EBI2. Therefore,
      it's safe for us to assume that the NAND controller is a standalone block
      within the SoC.
      
      The controller supports 512B, 2kB, 4kB and 8kB page 8-bit and 16-bit NAND
      flash devices. It contains a HW ECC block that supports BCH ECC (4, 8 and
      16 bit correction/step) and RS ECC(4 bit correction/step) that covers main
      and spare data. The controller contains an internal 512 byte page buffer
      to which we read/write via DMA. The EBI2 type NAND controller uses ADM DMA
      for register read/write and data transfers. The controller performs page
      reads and writes at a codeword/step level of 512 bytes. It can support up
      to 2 external chips of different configurations.
      
      The driver prepares register read and write configuration descriptors for
      each codeword, followed by data descriptors to read or write data from the
      controller's internal buffer. It uses a single ADM DMA channel that we get
      via dmaengine API. The controller requires 2 ADM CRCIs for command and
      data flow control. These are passed via DT.
      
      The ecc layout used by the controller is syndrome like, but we can't use
      the standard syndrome ecc ops because of several reasons. First, the amount
      of data bytes covered by ecc isn't same in each step. Second, writing to
      free oob space requires us writing to the entire step in which the oob
      lies. This forces us to create our own ecc ops.
      
      One more difference is how the controller accesses the bad block marker.
      The controller ignores reading the marker when ECC is enabled. ECC needs
      to be explicity disabled to read or write to the bad block marker. The
      nand_bbt helpers library hence can't access BBMs for the controller.
      For now, we skip the creation of BBT and populate chip->block_bad and
      chip->block_markbad helpers instead.
      Reviewed-by: NAndy Gross <agross@codeaurora.org>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Reviewed-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      c76b78d8
  7. 08 1月, 2016 1 次提交
  8. 30 9月, 2015 1 次提交
    • S
      mtd: nand: vf610_nfc: Freescale NFC for VF610, MPC5125 and others · 456930d8
      Stefan Agner 提交于
      This driver supports Freescale NFC (NAND flash controller) found on
      Vybrid (VF610), MPC5125, MCF54418 and Kinetis K70. The driver has
      been tested using 8-bit and 16-bit NAND interface on the ARM based
      Vybrid SoC VF500 and VF610 platform.
      parameter page reading.
      
      Limitations:
      - Untested on MPC5125 and M54418.
      - DMA and pipelining not used.
      - 2K pages or less.
      - No chip select, one NAND chip per controller.
      - No hardware ECC.
      
      Some paths have been hand-optimized and evaluated by measurements
      made using mtd_speedtest.ko on a 100MB MTD partition.
      
      Colibri VF50
              eb write     %   eb read     %   page write      %   page read     %
      rel/opt     5175           11537                4560             11039
      opt         5164 -0.21     11420 -1.01          4737 +3.88       10918 -1.10
      none        5113 -1.20     11352 -1.60          4490 -1.54       10865 -1.58
      
      Colibri VF61
              eb write     %   eb read     %   page write      %   page read     %
      rel/opt     5766           13096                5459             12846
      opt         5883 +2.03     13064 -0.24          5561 +1.87       12802 -0.34
      none        5701 -1.13     12980 -0.89          5488 +0.53       12735 -0.86
      
      rel = using readl_relaxed/writel_relaxed in optimized paths
      opt = hand-optimized by combining multiple accesses into one read/write
      
      The measurements have not been statistically verfied, hence use them
      with care. The author came to the conclusion that using the relaxed
      variants of readl/writel are not worth the additional code.
      Signed-off-by: NBill Pringlemeir <bpringlemeir@nbsps.com>
      Tested-by: NAlbert ARIBAUD <albert.aribaud@3adev.fr>
      Signed-off-by: NStefan Agner <stefan@agner.ch>
      Reviewed-by: NAlexey Klimov <klimov.linux@gmail.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      456930d8
  9. 03 9月, 2015 1 次提交
  10. 16 5月, 2015 1 次提交
  11. 08 2月, 2015 1 次提交
  12. 30 10月, 2014 1 次提交
  13. 07 10月, 2014 1 次提交
  14. 23 9月, 2014 1 次提交
  15. 22 7月, 2014 1 次提交
  16. 31 8月, 2013 1 次提交
  17. 05 4月, 2013 3 次提交
  18. 22 11月, 2012 3 次提交
  19. 15 11月, 2012 3 次提交
  20. 29 9月, 2012 2 次提交
  21. 07 7月, 2012 2 次提交
  22. 27 3月, 2012 1 次提交
    • M
      mtd: nand: add support for diskonchip G4 nand flash device · 570469f3
      Mike Dunn 提交于
      This patch adds a driver for the M-Sys / Sandisk diskonchip G4 nand flash found
      in various smartphones and PDAs, among them the Palm Treo680, HTC Prophet and
      Wizard, Toshiba Portege G900, Asus P526, and O2 XDA Zinc.  It was tested on the
      Treo 680, but should work generically.
      
      Since v3, this patch adds power management functions, a scan of the factory bad
      block table during initialization, several fixes, and more extensive testing.
      Also, the platform data header file, which only contained partitioning
      information, was removed.  Command-line partitioning can be used, at least until
      an mtd parser is written for the saftl format with which these chips are
      shipped.
      Signed-off-by: NMike Dunn <mikedunn@newsguy.com>
      Reviewed-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      570469f3
  23. 16 3月, 2012 1 次提交
  24. 11 9月, 2011 2 次提交
  25. 12 3月, 2011 1 次提交
    • I
      mtd: nand: add software BCH ECC support · 193bd400
      Ivan Djelic 提交于
      This patch adds software BCH ECC support to mtd, in order to handle recent
      NAND device ecc requirements (4 bits or more).
      
      It does so by adding a new ecc mode (NAND_ECC_SOFT_BCH) for use by board
      drivers, and a new Kconfig option to enable BCH support. It relies on the
      generic BCH library introduced in a previous patch.
      
      When a board driver uses mode NAND_ECC_SOFT_BCH, it should also set fields
      chip->ecc.size and chip->ecc.bytes to select BCH ecc data size and required
      error correction capability. See nand_bch_init() documentation for details.
      
      It has been tested on the following platforms using mtd-utils, UBI and
      UBIFS: x86 (with nandsim), arm926ejs.
      Signed-off-by: NIvan Djelic <ivan.djelic@parrot.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      193bd400