1. 06 8月, 2013 1 次提交
  2. 05 4月, 2013 13 次提交
  3. 14 3月, 2013 1 次提交
  4. 03 12月, 2012 1 次提交
    • M
      mtd: nand: add NAND_BUSWIDTH_AUTO to autodetect bus width · 64b37b2a
      Matthieu CASTET 提交于
      The driver call nand_scan_ident in 8 bit mode, then
      readid or onfi detection are done (and detect bus width).
      The driver should update its bus width before calling nand_scan_tail.
      
      This work because readid and onfi are read work 8 byte mode.
      
      Note that nand_scan_ident send command (NAND_CMD_RESET, NAND_CMD_READID, NAND_CMD_PARAM), address and read data
      The ONFI specificication is not very clear for x16 device if high byte of address should be driven to 0,
      but according to [1] it should be ok to not drive it during autodetection.
      
      [1]
      3.3.2. Target Initialization
      
      [...]
      The Read ID and Read Parameter Page commands only use the lower 8-bits of the data bus.
      The host shall not issue commands that use a word data width on x16 devices until the host
      determines the device supports a 16-bit data bus width in the parameter page.
      Signed-off-by: NMatthieu CASTET <matthieu.castet@parrot.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      64b37b2a
  5. 15 11月, 2012 1 次提交
  6. 29 9月, 2012 8 次提交
  7. 07 7月, 2012 3 次提交
  8. 14 5月, 2012 5 次提交
  9. 27 3月, 2012 2 次提交
  10. 10 1月, 2012 1 次提交
  11. 11 9月, 2011 4 次提交
    • B
      mtd: nand: kill member `ops' of `struct nand_chip' · 4a89ff88
      Brian Norris 提交于
      The nand_chip.ops field is a struct that is passed around globally with
      no particular reason. Every time it is used, it could just as easily be
      replaced with a local struct that is updated on each operation. So make
      it local.
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@intel.com>
      4a89ff88
    • B
      mtd: support reading OOB without ECC · c46f6483
      Brian Norris 提交于
      This fixes issues with `nanddump -n' and the MEMREADOOB[64] ioctls on
      hardware that performs error correction when reading only OOB data. A
      driver for such hardware needs to know when we're doing a RAW vs. a
      normal write, but mtd_do_read_oob does not pass such information to the
      lower layers (e.g., NAND). We should pass MTD_OOB_RAW or MTD_OOB_PLACE
      based on the MTD file mode.
      
      For now, most drivers can get away with just setting:
      
        chip->ecc.read_oob_raw = chip->ecc.read_oob
      
      This is done by default; but for systems that behave as described above,
      you must supply your own replacement function.
      
      This was tested with nandsim as well as on actual SLC NAND.
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      Cc: Jim Quinlan <jim2101024@gmail.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@intel.com>
      c46f6483
    • B
      e9195edc
    • B
      mtd: support writing OOB without ECC · 9ce244b3
      Brian Norris 提交于
      This fixes issues with `nandwrite -n -o' and the MEMWRITEOOB[64] ioctls
      on hardware that writes ECC when writing OOB. The problem arises as
      follows: `nandwrite -n' can write page data to flash without applying
      ECC, but when used with the `-o' option, ECC is applied (incorrectly),
      contrary to the `--noecc' option.
      
      I found that this is the case because my hardware computes and writes
      ECC data to flash upon either OOB write or page write. Thus, to support
      a proper "no ECC" write, my driver must know when we're performing a raw
      OOB write vs. a normal ECC OOB write. However, MTD does not pass any raw
      mode information to the write_oob functions.  This patch addresses the
      problems by:
      
      1) Passing MTD_OOB_RAW down to lower layers, instead of just defaulting
         to MTD_OOB_PLACE
      2) Handling MTD_OOB_RAW within the NAND layer's `nand_do_write_oob'
      3) Adding a new (replaceable) function pointer in struct ecc_ctrl; this
         function should support writing OOB without ECC data. Current
         hardware often can use the same OOB write function when writing
         either with or without ECC
      
      This was tested with nandsim as well as on actual SLC NAND.
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      Cc: Jim Quinlan <jim2101024@gmail.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@intel.com>
      9ce244b3