1. 20 3月, 2014 13 次提交
  2. 24 2月, 2014 3 次提交
    • P
      mtd: nand: omap: fix ecclayout->oobfree->length · bb38eefb
      Pekon Gupta 提交于
      This patch excludes reserved-marker byte-position from oobfree->length
      calculation. Thus all bytes from oobfree->offset till end of OOB are free.
      
      CC: <stable@vger.kernel.org> # 3.13.x+
      Signed-off-by: NPekon Gupta <pekon@ti.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      bb38eefb
    • P
      mtd: nand: omap: fix ecclayout->oobfree->offset · aa6092f9
      Pekon Gupta 提交于
      1) In current implementation, ecclayout->oobfree->offset is calculated with
       respect to ecclayout->eccpos[0] which is incorrect because ECC bytes may not
       be stored contiguously in OOB.
       So, this patch calculates ecclayout->oobfree->offset with respect to last
       ECC byte-position 'eccpos[ecclayout->eccbytes-1]'.
      
      2) ECC layout of some ecc-schemes expects reserved-markers at specific eccpos[]
       which should not be over-written by any file-system metadata.
       So this patch aligns oobfree->offset taking into account of such markers.
      
      CC: <stable@vger.kernel.org> # 3.13.x+
      Tested-by: NEnric Balletbo i Serra <eballetbo@gmail.com>
      Tested-by: NStefan Roese <sr@denx.de>
      Signed-off-by: NPekon Gupta <pekon@ti.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      aa6092f9
    • P
      mtd: nand: omap: fix ecclayout to be in sync with u-boot NAND driver · eae39cb4
      Pekon Gupta 提交于
      Fixes: commit a919e511
             mtd: nand: omap2: clean-up BCHx_HW and BCHx_SW ECC configurations in device_probe
      
      Fixes ecclayout mismatch introduced in above commit for following ecc-schemes:
       - OMAP_ECC_BCH4_CODE_HW_DETECTION_SW
       - OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
       However, this patch also touches other ecc-schemes as the fix required
       refactoring common code, into ecc-scheme specific code.
      
      This patch aligns ecc-layout for below ecc-schemes as per reference [1],[2],[3]
      
       +---+------------+-------------++-------------+-------------+
       |OOB|BCH8_CODE_HW|BCH8_CODE_HW_||HAM1_CODE_HW |HAM1_CODE_HW |
       |pos|            | DETECTION_SW||(x8 device)  |(x16 device) |
       +---+------------+-------------++-------------+-------------+
       | 0 |BADBLK_MARK | BADBLK_MARK || BADBLK_MARK | BADBLK_MARK |
       | 1 |BADBLK_MARK | BADBLK_MARK || eccpos[0]   | BADBLK_MARK |
       | 2 | eccpos[0]  | eccpos[0]   || eccpos[1]   | eccpos[0]   |
       | 3 | eccpos[1]  | eccpos[1]   || eccpos[2]   | eccpos[1]   |
       | 4 | eccpos[2]  | eccpos[2]   || eccpos[3]   | eccpos[2]   |
       | 5 | eccpos[3]  | eccpos[3]   || eccpos[4]   | eccpos[3]   |
       | 6 | eccpos[4]  | eccpos[4]   || eccpos[5]   | eccpos[4]   |
       | 7 | eccpos[5]  | eccpos[5]   || eccpos[6]   | eccpos[5]   |
       | 8 | eccpos[6]  | eccpos[6]   || eccpos[7]   | eccpos[6]   |
       | 9 | eccpos[7]  | eccpos[7]   || eccpos[8]   | eccpos[7]   |
       |10 | eccpos[8]  | eccpos[8]   || eccpos[9]   | eccpos[8]   |
       |11 | eccpos[9]  | eccpos[9]   || eccpos[10]  | eccpos[9]   |
       |12 | eccpos[10] | eccpos[10]  || eccpos[11]  | eccpos[10]  |
       |13 | eccpos[11] | eccpos[11]  || oobfree[0]  | eccpos[11]  |
       |14 | eccpos[12] | eccpos[12]  || oobfree[1]  | oobfree[0]  |
       |15 | eccpos[13] | <reserved>  || oobfree[2]  | oobfree[1]  |
       +---+------------+-------------++-------------+-------------+
       |16 | eccpos[14] | eccpos[13]  || oobfree[3]  | oobfree[2]  |
       |...| [...]      | [...]       || [...]       | [...]       |
       |56 | eccpos[54] | eccpos[51]  || oobfree[43] | oobfree[42] |
       |57 | eccpos[55] | <reserved>  || oobfree[44] | oobfree[43] |
       +===+============+=============+==============+=============+
       |58 | oobfree[0] | oobfree[0]  || oobfree[45] | oobfree[44] |
       |59 | oobfree[1] | oobfree[1]  || oobfree[46] | oobfree[45] |
       |60 | oobfree[2] | oobfree[2]  || oobfree[47] | oobfree[46] |
       |61 | oobfree[3] | oobfree[3]  || oobfree[48] | oobfree[47] |
       |62 | oobfree[4] | oobfree[4]  || oobfree[49] | oobfree[48] |
       |63 | oobfree[5] | oobfree[5]  || oobfree[50] | oobfree[49] |
       +---+------------+-------------+--------------+-------------+
      
      [1] ecc-layout expected by ROM code, as specified in SoC TRM under:
            Chapter="Initialization"
              Section="Device Initialization by ROM code"
                  Sub-Section="Memory Booting"
                      Heading="NAND"
                      Figure="ECC Locations in NAND Spare Areas"
      
      [2] ecc-layout updates in u-boot
          http://lists.denx.de/pipermail/u-boot/2013-November/167551.html
      
      [3] u-boot configurations to match above ecc-layout are documented at
          https://processors.wiki.ti.com/index.php/Linux_Core_NAND_User%27s_Guide
      
      CC: <stable@vger.kernel.org> # 3.13.x+
      Reported-by: NEnric Balletbo Serra <eballetbo@iseebcn.com>
      Tested-by: NEnric Balletbo i Serra <eballetbo@gmail.com>
      Tested-by: NStefan Roese <sr@denx.de>
      Signed-off-by: NPekon Gupta <pekon@ti.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      eae39cb4
  3. 08 1月, 2014 1 次提交
  4. 07 11月, 2013 8 次提交
  5. 31 8月, 2013 1 次提交
  6. 30 8月, 2013 1 次提交
  7. 06 8月, 2013 1 次提交
  8. 05 4月, 2013 2 次提交
  9. 04 2月, 2013 2 次提交
    • P
      mtd: nand: omap2: Support for hardware BCH error correction. · 62116e51
      Philip Avinash 提交于
      ELM module can be used for hardware error correction of BCH 4 & 8 bit.
      ELM module functionality is verified by checking the availability of
      handle for ELM module in device tree. Hence supporting
      1. ELM module available, BCH error correction done by ELM module. Also
      support read & write page in one shot by adding custom read_page and
      write_page methods. This helps in optimizing code for NAND flashes with
      page size less than 4 KB.
      2. If ELM module not available fall back to software BCH error
      correction support.
      
      New structure member is added to omap_nand_info
      1. "is_elm_used" to know the status of whether the ELM module is used for
         error correction or not.
      2. "elm_dev" device pointer to elm device on detection of ELM module.
      
      Also being here update the device tree documentation of gpmc-nand for
      adding optional property elm_id.
      
      Note:
      ECC layout uses 1 extra bytes for 512 byte of data to handle erased
      pages. Extra byte programmed to zero for programmed pages. Also BCH8
      requires 14 byte ecc to maintain compatibility with RBL ECC layout.
      This results a common ecc layout across RBL, U-boot & Linux with BCH8.
      Signed-off-by: NPhilip Avinash <avinashphilip@ti.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      62116e51
    • P
      mtd: nand: omap2: Update nerrors using ecc.strength · c3e4b995
      Philip Avinash 提交于
      Remove check of ecc bytes with 13, number of errors can directly update
      from nand ecc strength. This will increase re-usability of the code.
      Also add macro definitions BCH8_ERROR_MAX & BCH4_ERROR_MAX for better
      readability and cleaner code.
      Signed-off-by: NPhilip Avinash <avinashphilip@ti.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      c3e4b995
  10. 15 1月, 2013 1 次提交
  11. 01 12月, 2012 1 次提交
    • T
      ARM: OMAP: Move plat-omap/dma-omap.h to include/linux/omap-dma.h · 45c3eb7d
      Tony Lindgren 提交于
      Based on earlier discussions[1] we attempted to find a suitable
      location for the omap DMA header in commit 2b6c4e73 (ARM: OMAP:
      DMA: Move plat/dma.h to plat-omap/dma-omap.h) until the conversion
      to dmaengine is complete.
      
      Unfortunately that was before I was able to try to test compile
      of the ARM multiplatform builds for omap2+, and the end result
      was not very good.
      
      So I'm creating yet another all over the place patch to cut the
      last dependency for building omap2+ for ARM multiplatform. After
      this, we have finally removed the driver dependencies to the
      arch/arm code, except for few drivers that are being worked on.
      
      The other option was to make the <plat-omap/dma-omap.h> path
      to work, but we'd have to add some new header directory to for
      multiplatform builds.
      
      Or we would have to manually include arch/arm/plat-omap/include
      again from arch/arm/Makefile for omap2+.
      
      Neither of these alternatives sound appealing as they will
      likely lead addition of various other headers exposed to the
      drivers, which we want to avoid for the multiplatform kernels.
      
      Since we already have a minimal include/linux/omap-dma.h,
      let's just use that instead and add a note to it to not
      use the custom omap DMA functions any longer where possible.
      
      Note that converting omap DMA to dmaengine depends on
      dmaengine supporting automatically incrementing the FIFO
      address at the device end, and converting all the remaining
      legacy drivers. So it's going to be few more merge windows.
      
      [1] https://patchwork.kernel.org/patch/1519591/#
      
      cc: Russell King <linux@arm.linux.org.uk>
      cc: Kevin Hilman <khilman@ti.com>
      cc: "Benoît Cousson" <b-cousson@ti.com>
      cc: Herbert Xu <herbert@gondor.apana.org.au>
      cc: "David S. Miller" <davem@davemloft.net>
      cc: Vinod Koul <vinod.koul@intel.com>
      cc: Dan Williams <djbw@fb.com>
      cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
      cc: David Woodhouse <dwmw2@infradead.org>
      cc: Kyungmin Park <kyungmin.park@samsung.com>
      cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      cc: Hans Verkuil <hans.verkuil@cisco.com>
      cc: Vaibhav Hiremath <hvaibhav@ti.com>
      cc: Lokesh Vutla <lokeshvutla@ti.com>
      cc: Rusty Russell <rusty@rustcorp.com.au>
      cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
      cc: Afzal Mohammed <afzal@ti.com>
      cc: linux-crypto@vger.kernel.org
      cc: linux-media@vger.kernel.org
      cc: linux-mtd@lists.infradead.org
      cc: linux-usb@vger.kernel.org
      cc: linux-fbdev@vger.kernel.org
      Acked-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      45c3eb7d
  12. 22 11月, 2012 1 次提交
  13. 16 10月, 2012 2 次提交
  14. 15 10月, 2012 3 次提交