14 May, 2012

4 commits

  • As of [mtd: nand: remove autoincrement 'sndcmd' code], the
    NAND_CMD_READ0 command is issued unconditionally.

    Thus, read_oob/read_oob_raw's 'sndcmd' argument is no longer needed, as
    well as their return code.

    Remove the 'sndcmd' parameter, and set the return code to 0.

    Signed-off-by: Shmulik Ladkani
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Shmulik Ladkani
     
  • New NAND controllers can perform read/write via HW engines which don't expose
    OOB data in their DMA mode. To reflect this, we should rework the nand_chip /
    nand_ecc_ctrl interfaces that assume that drivers will always read/write OOB
    data in the nand_chip.oob_poi buffer. A better interface includes a boolean
    argument that explicitly tells the callee when OOB data is requested by the
    calling layer (for reading/writing to/from nand_chip.oob_poi).

    This patch adds the 'oob_required' parameter to each relevant {read,write}_page
    interface; all 'oob_required' parameters are left unused for now. The next
    patch will set the parameter properly in the nand_base.c callers, and follow-up
    patches will make use of 'oob_required' in some of the callee functions.

    Note that currently, there is no harm in ignoring the 'oob_required' parameter
    and *always* utilizing nand_chip.oob_poi, but there can be
    performance/complexity/design benefits from avoiding filling oob_poi in the
    common case. I will try to implement this for some drivers which can be ported
    easily.

    Note: I couldn't compile-test all of these easily, as some had ARCH
    dependencies.

    [dwmw2: Merge later 1/0 vs. true/false cleanup]
    Signed-off-by: Brian Norris
    Reviewed-by: Shmulik Ladkani
    Acked-by: Jiandong Zheng
    Acked-by: Mike Dunn
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Brian Norris
     
  • No drivers use auto-increment NAND, so kill the NO_AUTOINCR option entirely.

    Signed-off-by: Brian Norris
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Brian Norris
     
  • The ecc.read_page() method for nand drivers is changed to return the maximum
    number of bitflips that were corrected on any one region covering an ecc step,
    This patch doesn't change what the nand code returns to mtd.

    This v2 includes the change to the fsl_ifc_nand driver requested by Scott¹.

    ¹ http://lists.infradead.org/pipermail/linux-mtd/2012-April/040883.html

    Signed-off-by: Mike Dunn
    Acked-by (freescale changes): Scott Wood
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Mike Dunn
     

27 Mar, 2012

3 commits

  • Flash device drivers initialize 'ecc_strength' in struct mtd_info, which is the
    maximum number of bit errors that can be corrected in one writesize region.

    Drivers using the nand interface intitialize 'strength' in struct nand_ecc_ctrl,
    which is the maximum number of bit errors that can be corrected in one ecc step.
    Nand infrastructure code translates this to 'ecc_strength'.

    Also for nand drivers, the nand infrastructure code sets ecc.strength for ecc
    modes NAND_ECC_SOFT, NAND_ECC_SOFT_BCH, and NAND_ECC_NONE. It is set in the
    driver for all other modes.

    Signed-off-by: Mike Dunn
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Mike Dunn
     
  • Gcc complains here:
    drivers/mtd/nand/docg4.c: In function ‘probe_docg4’:
    drivers/mtd/nand/docg4.c:1277:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘resource_size_t’ [-Wformat]
    drivers/mtd/nand/docg4.c:1277:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘resource_size_t’ [-Wformat]

    We have a standard way of printing these using a format string
    extension.

    Signed-off-by: Dan Carpenter
    Acked-by: Randy Dunlap
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Dan Carpenter
     
  • This patch adds a driver for the M-Sys / Sandisk diskonchip G4 nand flash found
    in various smartphones and PDAs, among them the Palm Treo680, HTC Prophet and
    Wizard, Toshiba Portege G900, Asus P526, and O2 XDA Zinc. It was tested on the
    Treo 680, but should work generically.

    Since v3, this patch adds power management functions, a scan of the factory bad
    block table during initialization, several fixes, and more extensive testing.
    Also, the platform data header file, which only contained partitioning
    information, was removed. Command-line partitioning can be used, at least until
    an mtd parser is written for the saftl format with which these chips are
    shipped.

    Signed-off-by: Mike Dunn
    Reviewed-by: Robert Jarzmik
    Signed-off-by: David Woodhouse

    Mike Dunn