1. 18 11月, 2018 1 次提交
    • J
      mtd: rawnand: atmel: fix OF child-node lookup · 5d1e9c22
      Johan Hovold 提交于
      Use the new of_get_compatible_child() helper to lookup the nfc child
      node instead of using of_find_compatible_node(), which searches the
      entire tree from a given start node and thus can return an unrelated
      (i.e. non-child) node.
      
      This also addresses a potential use-after-free (e.g. after probe
      deferral) as the tree-wide helper drops a reference to its first
      argument (i.e. the node of the device being probed).
      
      While at it, also fix a related nfc-node reference leak.
      
      Fixes: f88fc122 ("mtd: nand: Cleanup/rework the atmel_nand driver")
      Cc: stable <stable@vger.kernel.org>     # 4.11
      Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
      Cc: Josh Wu <rainyfeeling@outlook.com>
      Cc: Boris Brezillon <boris.brezillon@bootlin.com>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
      5d1e9c22
  2. 03 10月, 2018 15 次提交
  3. 05 9月, 2018 2 次提交
  4. 31 7月, 2018 4 次提交
  5. 18 7月, 2018 2 次提交
  6. 02 7月, 2018 1 次提交
  7. 16 2月, 2018 2 次提交
  8. 14 12月, 2017 2 次提交
    • B
      mtd: nand: force drivers to explicitly send READ/PROG commands · 25f815f6
      Boris Brezillon 提交于
      The core currently send the READ0 and SEQIN+PAGEPROG commands in
      nand_do_read/write_ops(). This is inconsistent with
      ->read/write_oob[_raw]() hooks behavior which are expected to send
      these commands.
      
      There's already a flag (NAND_ECC_CUSTOM_PAGE_ACCESS) to inform the core
      that a specific controller wants to send the READ/SEQIN+PAGEPROG
      commands on its own, but it's an opt-in flag, and existing drivers are
      unlikely to be updated to pass it.
      
      Moreover, some controllers cannot dissociate the READ/PAGEPROG commands
      from the associated data transfer and ECC engine activation, and
      developers have to hack things in their ->cmdfunc() implementation to
      handle such complex cases, or have to accept the perf penalty of sending
      twice the same command.
      To address this problem we are planning on adding a new interface which
      is passed all information about a NAND operation (including the amount
      of data to transfer) and replacing all calls to ->cmdfunc() to calls to
      this new ->exec_op() hook. But, in order to do that, we need to have all
      ->cmdfunc() calls placed near their associated ->read/write_buf/byte()
      calls.
      
      Modify the core and relevant drivers to make NAND_ECC_CUSTOM_PAGE_ACCESS
      the default case, and remove this flag.
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      [miquel.raynal@free-electrons.com: tested, fixed and rebased on nand/next]
      Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com>
      Acked-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      25f815f6
    • B
      mtd: nand: provide several helpers to do common NAND operations · 97d90da8
      Boris Brezillon 提交于
      This is part of the process of removing direct calls to ->cmdfunc()
      outside of the core in order to introduce a better interface to execute
      NAND operations.
      
      Here we provide several helpers and make use of them to remove all
      direct calls to ->cmdfunc(). This way, we can easily modify those
      helpers to make use of the new ->exec_op() interface when available.
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      [miquel.raynal@free-electrons.com: rebased and fixed some conflicts]
      Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com>
      Acked-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      97d90da8
  9. 14 10月, 2017 1 次提交
  10. 07 10月, 2017 1 次提交
    • R
      mtd: nand: atmel: Avoid ECC errors when leaving backup mode · 143b0ab9
      Romain Izard 提交于
      During backup mode, the contents of all registers will be cleared as the
      SoC will be completely powered down. For a product that boots on NAND
      Flash memory, the bootloader will obviously use the related controller
      to read the Flash and correct any detected error in the memory, before
      handling back control to the kernel's resuming entry point.
      
      But it does not clean the NAND controller registers after use and on its
      side the kernel driver expects the error locator to be powered down and
      in a clean state. Add a resume hook for the PMECC error locator, and
      reset its registers.
      Signed-off-by: NRomain Izard <romain.izard.pro@gmail.com>
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      143b0ab9
  11. 18 9月, 2017 1 次提交
  12. 05 9月, 2017 1 次提交
  13. 25 8月, 2017 1 次提交
  14. 23 8月, 2017 1 次提交
  15. 13 8月, 2017 1 次提交
  16. 02 8月, 2017 1 次提交
  17. 13 6月, 2017 1 次提交
  18. 01 6月, 2017 2 次提交