1. 20 4月, 2016 1 次提交
    • R
      mtd: nand: add new enum for storing ECC algorithm · b0fcd8ab
      Rafał Miłecki 提交于
      Our nand_ecc_modes_t is already a bit abused by value NAND_ECC_SOFT_BCH.
      This enum should store ECC mode only and putting algorithm details there
      is a bad idea. It would result in too many values impossible to support
      in a sane way.
      
      To solve this problem let's add a new enum. We'll have to modify all
      drivers to set it properly but once it's done it'll be possible to drop
      NAND_ECC_SOFT_BCH. That will result in a cleaner design and more
      possibilities like setting ECC algorithm for hardware ECC mode.
      Signed-off-by: NRafał Miłecki <zajec5@gmail.com>
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      b0fcd8ab
  2. 11 3月, 2016 1 次提交
    • A
      mtd: nand: don't select chip in nand_chip's block_bad op · 9f3e0429
      Archit Taneja 提交于
      One of the arguments passed to struct nand_chip's block_bad op is
      'getchip', which, if true, is supposed to get and select the nand device,
      and later unselect and release the device.
      
      This op is intended to be replaceable by drivers. The drivers shouldn't
      be responsible for selecting/unselecting chip. Like other ops, the chip
      should already be selected before the block_bad op is called.
      
      Remove the getchip argument from the block_bad op and
      nand_block_checkbad. Move the chip selection to nand_block_isbad, since it
      is the only caller to nand_block_checkbad which requires chip selection.
      
      Modify nand_block_bad (the default function for the op) such that it
      doesn't select the chip.
      
      Remove the getchip argument from the bad_block funcs in cafe_nand,
      diskonchip and docg4 drivers.
      Reviewed-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      9f3e0429
  3. 27 1月, 2016 1 次提交
  4. 23 1月, 2016 1 次提交
  5. 08 1月, 2016 1 次提交
  6. 07 1月, 2016 2 次提交
  7. 19 12月, 2015 3 次提交
  8. 09 12月, 2015 2 次提交
  9. 02 12月, 2015 2 次提交
  10. 20 11月, 2015 1 次提交
  11. 12 11月, 2015 1 次提交
  12. 14 10月, 2015 1 次提交
    • 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
  13. 02 10月, 2015 1 次提交
  14. 22 9月, 2015 1 次提交
  15. 12 9月, 2015 1 次提交
  16. 08 7月, 2015 1 次提交
  17. 12 5月, 2015 1 次提交
    • B
      mtd: nand: add common DT init code · 5844feea
      Brian Norris 提交于
      These are already-documented common bindings for NAND chips. Let's
      handle them in nand_base.
      
      If NAND controller drivers need to act on this data before bringing up
      the NAND chip (e.g., fill out ECC callback functions, change HW modes,
      etc.), then they can do so between calling nand_scan_ident() and
      nand_scan_tail().
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      5844feea
  18. 07 5月, 2015 1 次提交
  19. 26 11月, 2014 1 次提交
  20. 20 11月, 2014 1 次提交
  21. 23 9月, 2014 1 次提交
  22. 20 8月, 2014 2 次提交
  23. 22 7月, 2014 2 次提交
  24. 09 7月, 2014 1 次提交
  25. 21 5月, 2014 1 次提交
  26. 10 5月, 2014 1 次提交
    • B
      mtd: nand: refactor erase_cmd() to return chip status · 49c50b97
      Brian Norris 提交于
      The nand_chip::erase_cmd callback previously served a dual purpose; for
      one, it allowed a per-flash-chip override, so that AG-AND devices could
      use a different erase command than other NAND. These AND devices were
      dropped in commit 14c65786 (mtd: nand:
      remove AG-AND support). On the other hand, some drivers (denali and
      doc-g4) need to use this sort of callback to implement
      controller-specific erase operations.
      
      To make the latter operation easier for some drivers (e.g., ST's new BCH
      NAND driver), it helps if the command dispatch and wait functions can be
      lumped together, rather than called separately.
      
      This patch does two things:
       1. Pull the call to chip->waitfunc() into chip->erase_cmd(), and return
          the status from this callback
       2. Rename erase_cmd() to just erase(), since this callback does a
          little more than just send a command
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      Tested-by: NLee Jones <lee.jones@linaro.org>
      49c50b97
  27. 26 3月, 2014 1 次提交
  28. 11 3月, 2014 6 次提交