1. 10 5月, 2018 1 次提交
  2. 20 3月, 2018 12 次提交
  3. 16 2月, 2018 1 次提交
  4. 20 1月, 2018 1 次提交
  5. 16 1月, 2018 2 次提交
  6. 12 1月, 2018 1 次提交
    • M
      mtd: nand: Fix nand_do_read_oob() return value · 87e89ce8
      Miquel Raynal 提交于
      Starting from commit 041e4575 ("mtd: nand: handle ECC errors in
      OOB"), nand_do_read_oob() (from the NAND core) did return 0 or a
      negative error, and the MTD layer expected it.
      
      However, the trend for the NAND layer is now to return an error or a
      positive number of bitflips. Deciding which status to return to the user
      belongs to the MTD layer.
      
      Commit e47f6858 ("mtd: check for max_bitflips in mtd_read_oob()")
      brought this logic to the mtd_read_oob() function while the return value
      coming from nand_do_read_oob() (called by the ->_read_oob() hook) was
      left unchanged.
      
      Fixes: e47f6858 ("mtd: check for max_bitflips in mtd_read_oob()")
      Cc: stable@vger.kernel.org
      Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com>
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      87e89ce8
  7. 06 1月, 2018 1 次提交
  8. 16 12月, 2017 1 次提交
    • M
      mtd: nand: add ->exec_op() implementation · 8878b126
      Miquel Raynal 提交于
      Introduce a new interface to instruct NAND controllers to send specific
      NAND operations. The new interface takes the form of a single method
      called ->exec_op(). This method is designed to replace ->cmd_ctrl(),
      ->cmdfunc() and ->read/write_byte/word/buf() hooks.
      
      ->exec_op() is passed a set of instructions describing the operation
      to execute. Each instruction has a type (ADDR, CMD, DATA, WAITRDY)
      and delay. The delay is here to help simple controllers wait enough
      time between each instruction, advanced controllers with integrated
      timings control can ignore these delays.
      
      Controllers that natively support complex operations (operations
      formed of several instructions) can use the NAND op parser
      infrastructure. This infrastructure allows controller drivers to
      describe the sequence of instructions they support (called
      nand_op_pattern) and a hook for each of these supported sequences. The
      core then tries to find the best match for a given NAND operation, and
      calls the associated hook.
      
      Various other helpers are also added to ease NAND controller drivers
      writing.
      
      This new interface should ease support of vendor specific operations
      in that NAND manufacturer drivers now have a way to check if the
      controller they are connected to supports a specific operation, and
      complain or refuse to probe the NAND chip when that's not the case.
      Suggested-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com>
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      8878b126
  9. 14 12月, 2017 6 次提交
  10. 01 12月, 2017 1 次提交
  11. 30 11月, 2017 1 次提交
    • M
      mtd: nand: fix interpretation of NAND_CMD_NONE in nand_command[_lp]() · df467899
      Miquel Raynal 提交于
      Some drivers (like nand_hynix.c) call ->cmdfunc() with NAND_CMD_NONE
      and a column address and expect the controller to only send address
      cycles. Right now, the default ->cmdfunc() implementations provided by
      the core do not filter out the command cycle in this case and forwards
      the request to the controller driver through the ->cmd_ctrl() method.
      The thing is, NAND controller drivers can get this wrong and send a
      command cycle with a NAND_CMD_NONE opcode and since NAND_CMD_NONE is
      -1, and the command field is usually casted to an u8, we end up sending
      the 0xFF command which is actually a RESET operation.
      
      Add conditions in nand_command[_lp]() functions to sending the initial
      command cycle when command == NAND_CMD_NONE.
      Signed-off-by: NMiquel Raynal <miquel.raynal@free-electrons.com>
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      df467899
  12. 31 10月, 2017 1 次提交
  13. 14 10月, 2017 1 次提交
  14. 18 9月, 2017 3 次提交
  15. 30 8月, 2017 1 次提交
    • L
      mtd: nand: make Samsung SLC NAND usable again · 69fc0129
      Lothar Waßmann 提交于
      commit c51d0ac5 ("mtd: nand: Move Samsung specific init/detection
      logic in nand_samsung.c") introduced a regression for Samsung SLC NAND
      chips. Prior to this commit chip->bits_per_cell was initialized by calling
      nand_get_bits_per_cell() before using nand_is_slc().
      With the offending commit this call is skipped, leaving
      chip->bits_per_cell cleared to zero when the manufacturer specific
      '.detect' function calls nand_is_slc() which in turn interprets
      bits_per_cell != 1 as indication for an MLC chip.
      The effect is that e.g. a K9F1G08U0F NAND chip is falsely detected as
      MLC NAND with 4KiB page size rather than SLC with 2KiB page size.
      
      Add a call to nand_get_bits_per_cell() before calling the .detect hook
      function in nand_manufacturer_detect(), so that the nand_is_slc()
      calls in the manufacturer specific code will return correct results.
      
      Fixes: c51d0ac5 ("mtd: nand: Move Samsung specific init/detection logic in nand_samsung.c")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NLothar Waßmann <LW@KARO-electronics.de>
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      69fc0129
  16. 23 8月, 2017 2 次提交
  17. 13 8月, 2017 1 次提交
  18. 03 8月, 2017 1 次提交
  19. 02 8月, 2017 2 次提交