1. 16 7月, 2016 1 次提交
  2. 30 5月, 2016 1 次提交
    • C
      mtd: nand: omap2: Support parsing dma channel information from DT · aa7abd31
      Cooper Jr., Franklin 提交于
      Switch from dma_request_channel to allow passing dma channel
      information from DT rather than hardcoding a value.
      
      Also provide a handle to the GPMC's dev so it can be used to parse the DMA
      channel information within the GPMC's DT node.
      
      Performance Numbers via mtd_speedtest now that EDMA based prefetch works:
      
      AM335x Performance numbers:
      DMA
        CPULOAD Write: 54%  Read: 35%
        page write speed	-23% (vs non dma)
        page read speed	-35% (vs non dma)
      
      NO DMA (prefetch-polled)
        CPULOAD Write: 98%  Read: 98%
      
      AM437x Performance numbers:
      DMA
        CPU LOAD Write: 56% Read: 36%
        page write speed	-16% (vs non dma)
        page read speed	-22% (vs non dma)
      
      NO DMA (prefetch-polled)
        CPULOAD Write: 93%  Read: 93%
      Signed-off-by: NFranklin S Cooper Jr <fcooper@ti.com>
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      aa7abd31
  3. 06 5月, 2016 5 次提交
  4. 20 4月, 2016 2 次提交
  5. 15 4月, 2016 5 次提交
  6. 08 3月, 2016 1 次提交
  7. 07 1月, 2016 1 次提交
  8. 19 12月, 2015 3 次提交
  9. 09 12月, 2015 1 次提交
  10. 12 11月, 2015 1 次提交
    • B
      mtd: nand: drop unnecessary partition parser data · a61ae81a
      Brian Norris 提交于
      All of these drivers set up a parser data struct just to communicate DT
      partition data. This field has been deprecated and is instead supported
      by telling nand_scan_ident() about the 'flash_node'.
      
      This patch:
       * sets chip->flash_node for those drivers that didn't already (but used
         OF partitioning)
       * drops the parser data
       * switches to the simpler mtd_device_register() where possible, now
         that we've eliminated one of the auxiliary parameters
      
      Now that we've assigned chip->flash_node for these drivers, we can
      probably rely on nand_dt_init() to do more of the DT parsing for us, but
      for now, I don't want to fiddle with each of these drivers. The parsing
      is done in duplicate for now on some drivers. I don't think this should
      break things. (Famous last words.)
      
      (Rolled in some changes by Boris Brezillon)
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      Reviewed-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      a61ae81a
  11. 14 10月, 2015 2 次提交
    • B
      mtd: nand: pass page number to ecc->write_xxx() methods · 45aaeff9
      Boris BREZILLON 提交于
      The ->read_xxx() methods are all passed the page number the NAND controller
      is supposed to read, but ->write_xxx() do not have such a parameter.
      
      This is a problem if we want to properly implement data
      scrambling/randomization in order to mitigate MLC sensibility to repeated
      pattern: to prevent bitflips in adjacent pages in the same block we need
      to avoid repeating the same pattern at the same offset in those pages,
      hence the randomizer/scrambler engine need to be passed the page value
      in order to adapt its seed accordingly.
      
      Moreover, adding the page parameter to the ->write_xxx() methods add some
      consistency to the current API.
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      CC: Josh Wu <josh.wu@atmel.com>
      CC: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
      CC: Maxime Ripard <maxime.ripard@free-electrons.com>
      CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      CC: Huang Shijie <shijie.huang@arm.com>
      CC: Stefan Agner <stefan@agner.ch>
      CC: devel@driverdev.osuosl.org
      CC: linux-arm-kernel@lists.infradead.org
      CC: linux-kernel@vger.kernel.org
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      45aaeff9
    • F
      mtd: nand: omap2: show parent device structure in sysfs · 853f1c58
      Frans Klaver 提交于
      Make sure the device structure is properly shown in sysfs by properly
      filling in dev.parent.
      
      While at it, make use of the default owner and name values set by
      mtdcore.
      Signed-off-by: NFrans Klaver <fransklaver@gmail.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      853f1c58
  12. 06 2月, 2015 1 次提交
  13. 26 11月, 2014 1 次提交
  14. 06 11月, 2014 1 次提交
  15. 22 10月, 2014 1 次提交
  16. 20 10月, 2014 1 次提交
  17. 23 9月, 2014 2 次提交
  18. 17 9月, 2014 1 次提交
    • E
      nand: omap2: Add support for flash-based bad block table · fef775ca
      Ezequiel García 提交于
      This commit adds a new platform-data boolean property that enables use
      of a flash-based bad block table. This can also be enabled by setting
      the 'nand-on-flash-bbt' devicetree property.
      
      If the flash BBT is not enabled, the driver falls back to use OOB
      bad block markers only, as before. If the flash BBT is enabled the
      kernel will keep track of bad blocks using a BBT, in addition to
      the OOB markers.
      
      As explained by Brian Norris the reasons for using a BBT are:
      
      ""
      The primary reason would be that NAND datasheets specify it these days.
      A better argument is that nobody guarantees that you can write a
      bad block marker to a worn out block; you may just get program failures.
      
      This has been acknowledged by several developers over the last several
      years.
      
      Additionally, you get a boot-time performance improvement if you only
      have to read a few pages, instead of a page or two from every block on
      the flash.
      ""
      Signed-off-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
      Acked-by: NRoger Quadros <rogerq@ti.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      fef775ca
  19. 26 8月, 2014 2 次提交
    • R
      mtd: nand: omap: Fix 1-bit Hamming code scheme, omap_calculate_ecc() · 40ddbf50
      Roger Quadros 提交于
      commit 65b97cf6 introduced in v3.7 caused a regression
      by using a reversed CS_MASK thus causing omap_calculate_ecc to
      always fail. As the NAND base driver never checks for .calculate()'s
      return value, the zeroed ECC values are used as is without showing
      any error to the user. However, this won't work and the NAND device
      won't be guarded by any error code.
      
      Fix the issue by using the correct mask.
      
      Code was tested on omap3beagle using the following procedure
      - flash the primary bootloader (MLO) from the kernel to the first
      NAND partition using nandwrite.
      - boot the board from NAND. This utilizes OMAP ROM loader that
      relies on 1-bit Hamming code ECC.
      
      Fixes: 65b97cf6 (mtd: nand: omap2: handle nand on gpmc)
      
      Cc: <stable@vger.kernel.org>	[3.7+]
      Signed-off-by: NRoger Quadros <rogerq@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      40ddbf50
    • R
      mtd: nand: omap: Revert to using software ECC by default · 7d5929c1
      Roger Quadros 提交于
      For v3.12 and prior, 1-bit Hamming code ECC via software was the
      default choice. Commit c66d0391 in v3.13 changed the behaviour
      to use 1-bit Hamming code via Hardware using a different ECC layout
      i.e. (ROM code layout) than what is used by software ECC.
      
      This ECC layout change causes NAND filesystems created in v3.12
      and prior to be unusable in v3.13 and later. So revert back to
      using software ECC by default if an ECC scheme is not explicitely
      specified.
      
      This defect can be observed on the following boards during legacy boot
      
      -omap3beagle
      -omap3touchbook
      -overo
      -am3517crane
      -devkit8000
      -ldp
      -3430sdp
      Signed-off-by: NRoger Quadros <rogerq@ti.com>
      Tested-by: NGrazvydas Ignotas <notasas@gmail.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      7d5929c1
  20. 29 5月, 2014 1 次提交
  21. 21 5月, 2014 2 次提交
    • P
      mtd: nand: omap: add support for BCH16_ECC - NAND driver updates · 9748fff9
      pekon gupta 提交于
      This patch add support for BCH16 ecc-scheme in OMAP NAND driver, by extending
      following functions:
       - omap_enable_hwecc (nand_chip->ecc.hwctl): configure GPMC controller
       - omap_calculate_ecc_bch (nand_chip->ecc.calculate): fetch ECC signature from GPMC controller
       - omap_elm_correct_data (nand_chip->ecc.correct): detect and correct ECC errors using ELM
      
      (a) BCH16 ecc-scheme can detect and correct 16 bit-flips per 512Bytes of data.
      (b) BCH16 ecc-scheme generates 26-bytes of ECC syndrome / 512B.
      Due to (b) this scheme can only be used with NAND devices which have enough
      OOB to satisfy the relation: "OOBsize per page >= 26 * (page-size / 512)"
      Signed-off-by: NPekon Gupta <pekon@ti.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      9748fff9
    • P
      mtd: nand: omap: fix BCHx ecc.correct to return detected bit-flips in erased-page · f306e8c3
      pekon gupta 提交于
      fixes: commit 62116e51
             mtd: nand: omap2: Support for hardware BCH error correction.
      
      In omap_elm_correct_data(), if bitflip_count in an erased-page is within the
      correctable limit (< ecc.strength), then it is not indicated back to the caller
      ecc->read_page().
      
      This mis-guides upper layers like MTD and UBIFS layer to assume erased-page as
      perfectly clean and use it for writing even if actual bitflip_count was
      dangerously high (bitflip_count > mtd->bitflip_threshold).
      
      This patch fixes this above issue, by returning 'stats' to caller
      ecc->read_page() under all scenarios.
      Reported-by: NBrian Norris <computersforpeace@gmail.com>
      Signed-off-by: NPekon Gupta <pekon@ti.com>
      Cc: <stable@vger.kernel.org> # 3.9.x+
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      f306e8c3
  22. 16 4月, 2014 1 次提交
  23. 26 3月, 2014 2 次提交
  24. 20 3月, 2014 1 次提交