1. 22 11月, 2012 2 次提交
  2. 07 7月, 2012 1 次提交
    • J
      mtd: nand: teach write_page and write_page_raw return an error code · fdbad98d
      Josh Wu 提交于
      There is an implemention of hardware ECC write page function which may return an
      error indication.
      For instance, using Atmel HW PMECC to write one page into a nand flash, the hardware
      engine will compute the BCH ecc code for this page. so we need read a the
      status register to theck whether the ecc code is generated.
      But we cannot assume the status register always can be ready, for example,
      incorrect hardware configuration or hardware issue, in such case we need
      write_page() to return a error code.
      
      Since the definition of 'write_page' function in struct nand_ecc_ctrl is 'void'.
      So this patch will:
        1. add return 'int' value for 'write_page' function.
        2. to be consitent, add return 'int' value for 'write_page_raw' fuctions too.
        3. add code to test the return value, and if negative, indicate an
        error happend when write page with ECC.
        4. fix the compile warning in all impacted nand flash driver.
      
      Note: I couldn't compile-test all of these easily, as some had ARCH dependencies.
      Signed-off-by: NJosh Wu <josh.wu@atmel.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      fdbad98d
  3. 14 5月, 2012 1 次提交
    • B
      mtd: nand: add 'oob_required' argument to NAND {read,write}_page interfaces · 1fbb938d
      Brian Norris 提交于
      New NAND controllers can perform read/write via HW engines which don't expose
      OOB data in their DMA mode. To reflect this, we should rework the nand_chip /
      nand_ecc_ctrl interfaces that assume that drivers will always read/write OOB
      data in the nand_chip.oob_poi buffer. A better interface includes a boolean
      argument that explicitly tells the callee when OOB data is requested by the
      calling layer (for reading/writing to/from nand_chip.oob_poi).
      
      This patch adds the 'oob_required' parameter to each relevant {read,write}_page
      interface; all 'oob_required' parameters are left unused for now. The next
      patch will set the parameter properly in the nand_base.c callers, and follow-up
      patches will make use of 'oob_required' in some of the callee functions.
      
      Note that currently, there is no harm in ignoring the 'oob_required' parameter
      and *always* utilizing nand_chip.oob_poi, but there can be
      performance/complexity/design benefits from avoiding filling oob_poi in the
      common case. I will try to implement this for some drivers which can be ported
      easily.
      
      Note: I couldn't compile-test all of these easily, as some had ARCH
      dependencies.
      
      [dwmw2: Merge later 1/0 vs. true/false cleanup]
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      Reviewed-by: NShmulik Ladkani <shmulik.ladkani@gmail.com>
      Acked-by: NJiandong Zheng <jdzheng@broadcom.com>
      Acked-by: NMike Dunn <mikedunn@newsguy.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      1fbb938d
  4. 27 3月, 2012 1 次提交
    • M
      mtd: flash drivers set ecc strength · 6a918bad
      Mike Dunn 提交于
      Flash device drivers initialize 'ecc_strength' in struct mtd_info, which is the
      maximum number of bit errors that can be corrected in one writesize region.
      
      Drivers using the nand interface intitialize 'strength' in struct nand_ecc_ctrl,
      which is the maximum number of bit errors that can be corrected in one ecc step.
      Nand infrastructure code translates this to 'ecc_strength'.
      
      Also for nand drivers, the nand infrastructure code sets ecc.strength for ecc
      modes NAND_ECC_SOFT, NAND_ECC_SOFT_BCH, and NAND_ECC_NONE.  It is set in the
      driver for all other modes.
      Signed-off-by: NMike Dunn <mikedunn@newsguy.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      6a918bad
  5. 25 5月, 2011 1 次提交
  6. 25 10月, 2010 1 次提交
  7. 13 9月, 2010 2 次提交
  8. 05 8月, 2010 7 次提交
  9. 10 5月, 2010 1 次提交
  10. 06 6月, 2009 2 次提交
  11. 20 3月, 2009 3 次提交
  12. 01 8月, 2008 6 次提交
  13. 25 4月, 2008 1 次提交
  14. 22 4月, 2008 1 次提交
  15. 03 2月, 2008 3 次提交
  16. 30 10月, 2007 1 次提交
  17. 13 10月, 2007 1 次提交
    • B
      [MTD] [NAND] Blackfin on-chip NAND Flash Controller driver · b37bde14
      Bryan Wu 提交于
      This is the driver for latest Blackfin on-chip nand flash controller
      
       - use nand_chip and mtd_info common nand driver interface
       - provide both PIO and dma operation
       - compiled with ezkit bf548 configuration
       - use hardware 1-bit ECC
       - tested with YAFFS2 and can mount YAFFS2 filesystem as rootfs
      
      ChangeLog from try#1
       - use hweight32() instead of count_bits()
       - replace bf54x with bf5xx and BF54X with BF5XX
       - compare against plat->page_size in 2 cases when enable hardware ECC
      
      ChangeLog from try#2
       - passed nand_test suites
       - use cpu_relax() instead of busy wait loop
       - some coding style issue pointed out by Andrew
      Signed-off-by: NBryan Wu <bryan.wu@analog.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      b37bde14