1. 07 1月, 2018 1 次提交
  2. 07 10月, 2017 1 次提交
  3. 13 8月, 2017 1 次提交
  4. 30 5月, 2017 1 次提交
  5. 07 11月, 2016 2 次提交
  6. 23 9月, 2016 1 次提交
  7. 06 5月, 2016 1 次提交
  8. 20 4月, 2016 1 次提交
  9. 08 3月, 2016 1 次提交
  10. 05 3月, 2016 1 次提交
  11. 13 2月, 2016 1 次提交
    • T
      mtd: nand: pxa3xx_nand: add support for partial chunks · c2cdace7
      Thomas Petazzoni 提交于
      This commit is needed to properly support the 8-bits ECC configuration
      with 4KB pages.
      
      When pages larger than 2 KB are used on platforms using the PXA3xx
      NAND controller, the reading/programming operations need to be split
      in chunks of 2 KBs or less because the controller FIFO is limited to
      about 2 KB (i.e a bit more than 2 KB to accommodate OOB data). Due to
      this requirement, the data layout on NAND is a bit strange, with ECC
      interleaved with data, at the end of each chunk.
      
      When a 4-bits ECC configuration is used with 4 KB pages, the physical
      data layout on the NAND looks like this:
      
      | 2048 data | 32 spare | 30 ECC | 2048 data | 32 spare | 30 ECC |
      
      So the data chunks have an equal size, 2080 bytes for each chunk,
      which the driver supports properly.
      
      When a 8-bits ECC configuration is used with 4KB pages, the physical
      data layout on the NAND looks like this:
      
      | 1024 data | 30 ECC | 1024 data | 30 ECC | 1024 data | 30 ECC | 1024 data | 30 ECC | 64 spare | 30 ECC |
      
      So, the spare area is stored in its own chunk, which has a different
      size than the other chunks. Since OOB is not used by UBIFS, the initial
      implementation of the driver has chosen to not support reading this
      additional "spare" chunk of data.
      
      Unfortunately, Marvell has chosen to store the BBT signature in the
      OOB area. Therefore, if the driver doesn't read this spare area, Linux
      has no way of finding the BBT. It thinks there is no BBT, and rewrites
      one, which U-Boot does not recognize, causing compatibility problems
      between the bootloader and the kernel in terms of NAND usage.
      
      To fix this, this commit implements the support for reading a partial
      last chunk. This support is currently only useful for the case of 8
      bits ECC with 4 KB pages, but it will be useful in the future to
      enable other configurations such as 12 bits and 16 bits ECC with 4 KB
      pages, or 8 bits ECC with 8 KB pages, etc. All those configurations
      have a "last" chunk that doesn't have the same size as the other
      chunks.
      
      In order to implement reading of the last chunk, this commit:
      
       - Adds a number of new fields to the pxa3xx_nand_info to describe how
         many full chunks and how many chunks we have, the size of full
         chunks and partial chunks, both in terms of data area and spare
         area.
      
       - Fills in the step_chunk_size and step_spare_size variables to
         describe how much data and spare should be read/written for the
         current read/program step.
      
       - Reworks the state machine to accommodate doing the additional read
         or program step when a last partial chunk is used.
      
      This commit has been tested on a Marvell Armada 398 DB board, with a
      4KB page NAND, tested in both 4 bits ECC and 8 bits ECC
      configurations. Robert Jarzmik has tested on some PXA platforms.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Tested-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Acked-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      c2cdace7
  12. 02 2月, 2016 1 次提交
  13. 08 1月, 2016 1 次提交
  14. 19 12月, 2015 2 次提交
  15. 09 12月, 2015 1 次提交
  16. 20 11月, 2015 1 次提交
  17. 17 11月, 2015 6 次提交
  18. 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
  19. 27 10月, 2015 4 次提交
  20. 20 10月, 2015 2 次提交
  21. 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: pxa3xx_nand: show parent device in sysfs · 550dab5b
      Frans Klaver 提交于
      Fix a bug where parent device symlinks aren't shown in sysfs.
      
      While at it, make use of the default owner value set by mtdcore.
      Signed-off-by: NFrans Klaver <fransklaver@gmail.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      550dab5b
  22. 29 9月, 2015 1 次提交
    • R
      mtd: nand: pxa3xx-nand: prevent DFI bus lockup on removal · e971affa
      Robert Jarzmik 提交于
      After the conversion of pxa architecture to common clock framework, the
      NAND clock can be disabled on driver exit.
      
      In this case, it happens that if the driver used the NAND and set the
      DFI arbitration bit, the next access to a static memory controller area,
      such as an ethernet card, will stall the system bus, and the core will
      be stalled forever.
      
      This is especially true on pxa31x SoCs, where the NDCR was augmented
      with a new bit to prevent this lockups by giving full ownership of the
      DFI arbiter to the SMC, in change SCr#6.
      
      Fix this by clearing the DFI arbritration bit in driver exit. This
      effectively prevents a lockup on zylonite when removing pxa3xx-nand
      module, and using ethernet afterwards.
      Signed-off-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      e971affa
  23. 28 9月, 2015 1 次提交
  24. 03 9月, 2015 1 次提交
  25. 20 8月, 2015 3 次提交
  26. 19 8月, 2015 1 次提交