14 Jul, 2017

1 commit

  • Pull MTD updates from Brian Norris:
    "General updates:
    - Cleanups and additional flash support for "dataflash" driver
    - new driver for mchp23k256 SPI SRAM device
    - improve handling of MTDs without eraseblocks (i.e., MTD_NO_ERASE)
    - refactor and improve "sub-partition" handling with TRX partition
    parser; partitions can now be created as sub-partitions of another
    partition

    SPINOR updates, from Cyrille Pitchen and Marek Vasut:
    - introduce support to the SPI 1-2-2 and 1-4-4 protocols.
    - introduce support to the Double Data Rate (DDR) mode.
    - introduce support to the Octo SPI protocols.
    - add support to new memory parts for Spansion, Macronix and Winbond.
    - add fixes for the Aspeed, STM32 and Cadence QSPI controler drivers.
    - clean up the st_spi_fsm driver.

    NAND updates, from Boris Brezillon:
    - addition of on-die ECC support to Micron driver
    - addition of helpers to help drivers choose most appropriate ECC
    settings
    - deletion of dead-code (cached programming and ->errstat() hook)
    - make sure drivers that do not support the SET/GET FEATURES command
    return ENOTSUPP use a dummy ->set/get_features implementation
    returning -ENOTSUPP (required for Micron on-die ECC)
    - change the semantic of ecc->write_page() for drivers setting the
    NAND_ECC_CUSTOM_PAGE_ACCESS flag
    - support exiting 'GET STATUS' command in default ->cmdfunc()
    implementations
    - change the prototype of ->setup_data_interface()

    A bunch of driver related changes:
    - various cleanup, fixes and improvements of the MTK driver
    - OMAP DT bindings fixes
    - support for ->setup_data_interface() in the fsmc driver
    - support for imx7 in the gpmi driver
    - finalization of the denali driver rework (thanks to Masahiro for
    the work he's done on this driver)
    - fix "bitflips in erased pages" handling in the ifc driver
    - addition of PM ops and dynamic timing configuration to the atmel
    driver"

    * tag 'for-linus-20170713' of git://git.infradead.org/linux-mtd: (118 commits)
    Documentation: ABI: mtd: describe "offset" more precisely
    mtd: Fix check in mtd_unpoint()
    mtd: nand: mtk: release lock on error path
    mtd: st_spi_fsm: remove SPINOR_OP_RDSR2 and use SPINOR_OP_RDCR instead
    mtd: spi-nor: cqspi: remove duplicate const
    mtd: spi-nor: Add support for Spansion S25FL064L
    mtd: spi-nor: Add support for mx66u51235f
    mtd: nand: mtk: add ->setup_data_interface() hook
    mtd: nand: mtk: remove unneeded mtk_ecc_hw_init from mtk_ecc_resume
    mtd: nand: mtk: remove unneeded mtk_nfc_hw_init from mtk_nfc_resume
    mtd: nand: mtk: disable ecc irq when writing page with hwecc
    mtd: nand: mtk: fix incorrect register setting order about ecc irq
    mtd: partitions: fixup some allocate_partition() whitespace
    mtd: parsers: trx: fix pr_err format for printing offset
    MAINTAINERS: Update SPI NOR subsystem git repositories
    mtd: extract TRX parser out of bcm47xxpart into a separated module
    mtd: partitions: add support for partition parsers
    mtd: partitions: add support for subpartitions
    mtd: partitions: rename "master" to the "parent" where appropriate
    mtd: partitions: remove sysfs files when deleting all master's partitions
    ...

    Linus Torvalds
     

08 Jul, 2017

3 commits

  • From Boris:
    """
    This pull request contains the following core changes:

    * addition of on-ecc support to Micron driver
    * addition of helpers to help drivers choose most appropriate ECC
    settings
    * deletion of dead-code (cached programming and ->errstat() hook)
    * make sure drivers that do not support the SET/GET FEATURES command
    return ENOTSUPP use a dummy ->set/get_features implementation
    returning -ENOTSUPP (required for Micron on-die ECC)
    * change the semantic of ecc->write_page() for drivers setting the
    NAND_ECC_CUSTOM_PAGE_ACCESS flag
    * support exiting 'GET STATUS' command in default ->cmdfunc()
    implementations
    * change the prototype of ->setup_data_interface()

    A bunch of driver related changes:

    * various cleanup, fixes and improvements of the MTK driver
    * OMAP DT bindings fixes
    * support for ->setup_data_interface() in the fsmc driver
    * support for imx7 in the gpmi driver
    * finalization of the denali driver rework (thanks to Masahiro for the
    work he's done on this driver)
    * fix "bitflips in erased pages" handling in the ifc driver
    * addition of PM ops and dynamic timing configuration to the atmel
    driver

    And as usual we also have a few minor cleanup/fixes/improvements
    patches across the subsystem.
    """

    Brian Norris
     
  • From Cyrille:
    """
    This pull request contains the following notable changes:
    - introduce support to the SPI 1-2-2 and 1-4-4 protocols.
    - introduce support to the Double Data Rate (DDR) mode.
    - introduce support to the Octo SPI protocols.
    - add support to new memory parts for Spansion, Macronix and Winbond.
    - add fixes for the Aspeed, STM32 and Cadence QSPI controler drivers.
    - clean up the st_spi_fsm driver.
    """

    Brian Norris
     
  • The code checks that ->_point is not NULL, but we should actually check
    ->_unpoint value which is dereferenced a few lines after the check.

    Signed-off-by: Boris Brezillon
    Signed-off-by: Brian Norris

    Boris Brezillon
     

07 Jul, 2017

1 commit

  • Pull pin control updates from Linus Walleij:
    "This is the big bulk of pin control changes for the v4.13 series:

    Core:
    - The documentation is moved over to RST.
    - We now have agreed bindings for enabling input and output buffers
    without actually enabling input and/or output on a pin. We are
    chiseling out some details of pin control electronics.

    New drivers:
    - ZTE ZX
    - Renesas RZA1
    - MIPS Ingenic JZ47xx: also switch over existing drivers in the tree
    to use this pin controller and consolidate earlier spread out code.
    - Microschip MCP23S08: this driver is migrated from the GPIO
    subsystem and totally rewritten to use proper pin control. All
    users are switched over.

    New subdrivers:
    - Renesas R8A7743 and R8A7745.
    - Allwinner Sunxi A83T R_PIO.
    - Marvell MVEBU Armada CP110 and AP806.
    - Intel Cannon Lake PCH.
    - Qualcomm IPQ8074.

    Notable improvements:
    - IRQ support on the Marvell MVEBU Armada 37xx.
    - Meson driver supports HDMI CEC, AO, I2S, SPDIF and PWM.
    - Rockchip driver now supports iomux-route switching for RK3228,
    RK3328 and RK3399.
    - Rockchip A10 and A20 are merged into a single driver.
    - STM32 has improved GPIO support.
    - Samsung Exynos drivers are split per ARMv7 and ARMv8.
    - Marvell MVEBU is converted to use regmap for register access.

    Maintenance:
    - Several Renesas SH-PFC refactorings and updates.
    - Serious code size cut for Mediatek MT7623.
    - Misc janitorial and MAINTAINERS fixes"

    * tag 'pinctrl-v4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (137 commits)
    pinctrl: samsung: Remove bogus irq_[un]mask from resource management
    pinctrl: rza1: make structures rza1_gpiochip_template and rza1_pinmux_ops static
    pinctrl: rza1: Remove unneeded wrong check for wrong variable
    pinctrl: qcom: Add ipq8074 pinctrl driver
    pinctrl: freescale: imx7d: make of_device_ids const.
    pinctrl: DT: extend the pinmux property to support integers array
    pinctrl: generic: Add output-enable property
    pinctrl: armada-37xx: Fix number of pin in sdio_sb
    pinctrl: armada-37xx: Fix uart2 group selection register mask
    pinctrl: bcm2835: Avoid warning from __irq_do_set_handler
    pinctrl: sh-pfc: r8a7795: Add PWM support
    MAINTAINERS: Add Qualcomm pinctrl drivers section
    arm: dts: dt-bindings: Add Renesas RZ/A1 pinctrl header
    dt-bindings: pinctrl: Add RZ/A1 bindings doc
    pinctrl: Renesas RZ/A1 pin and gpio controller
    pinctrl: sh-pfc: r8a7792: Add SCIF1 and SCIF2 pin groups
    pinctrl.txt: move it to the driver-api book
    pinctrl: ingenic: checking for NULL instead of IS_ERR()
    pinctrl: uniphier: fix WARN_ON() of pingroups dump on LD20
    pinctrl: uniphier: fix WARN_ON() of pingroups dump on LD11
    ...

    Linus Torvalds
     

04 Jul, 2017

2 commits

  • Pull documentation updates from Jonathan Corbet:
    "There has been a fair amount of activity in the docs tree this time
    around. Highlights include:

    - Conversion of a bunch of security documentation into RST

    - The conversion of the remaining DocBook templates by The Amazing
    Mauro Machine. We can now drop the entire DocBook build chain.

    - The usual collection of fixes and minor updates"

    * tag 'docs-4.13' of git://git.lwn.net/linux: (90 commits)
    scripts/kernel-doc: handle DECLARE_HASHTABLE
    Documentation: atomic_ops.txt is core-api/atomic_ops.rst
    Docs: clean up some DocBook loose ends
    Make the main documentation title less Geocities
    Docs: Use kernel-figure in vidioc-g-selection.rst
    Docs: fix table problems in ras.rst
    Docs: Fix breakage with Sphinx 1.5 and upper
    Docs: Include the Latex "ifthen" package
    doc/kokr/howto: Only send regression fixes after -rc1
    docs-rst: fix broken links to dynamic-debug-howto in kernel-parameters
    doc: Document suitability of IBM Verse for kernel development
    Doc: fix a markup error in coding-style.rst
    docs: driver-api: i2c: remove some outdated information
    Documentation: DMA API: fix a typo in a function name
    Docs: Insert missing space to separate link from text
    doc/ko_KR/memory-barriers: Update control-dependencies example
    Documentation, kbuild: fix typo "minimun" -> "minimum"
    docs: Fix some formatting issues in request-key.rst
    doc: ReSTify keys-trusted-encrypted.txt
    doc: ReSTify keys-request-key.txt
    ...

    Linus Torvalds
     
  • Pull driver core updates from Greg KH:
    "Here is the big driver core update for 4.13-rc1.

    The large majority of this is a lot of cleanup of old fields in the
    driver core structures and their remaining usages in random drivers.
    All of those fixes have been reviewed by the various subsystem
    maintainers. There's also some small firmware updates in here, a new
    kobject uevent api interface that makes userspace interaction easier,
    and a few other minor things.

    All of these have been in linux-next for a long while with no reported
    issues"

    * tag 'driver-core-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (56 commits)
    arm: mach-rpc: ecard: fix build error
    zram: convert remaining CLASS_ATTR() to CLASS_ATTR_RO()
    driver-core: remove struct bus_type.dev_attrs
    powerpc: vio_cmo: use dev_groups and not dev_attrs for bus_type
    powerpc: vio: use dev_groups and not dev_attrs for bus_type
    USB: usbip: convert to use DRIVER_ATTR_RW
    s390: drivers: convert to use DRIVER_ATTR_RO/WO
    platform: thinkpad_acpi: convert to use DRIVER_ATTR_RO/RW
    pcmcia: ds: convert to use DRIVER_ATTR_RO
    wireless: ipw2x00: convert to use DRIVER_ATTR_RW
    net: ehea: convert to use DRIVER_ATTR_RO
    net: caif: convert to use DRIVER_ATTR_RO
    TTY: hvc: convert to use DRIVER_ATTR_RW
    PCI: pci-driver: convert to use DRIVER_ATTR_WO
    IB: nes: convert to use DRIVER_ATTR_RW
    HID: hid-core: convert to use DRIVER_ATTR_RO and drv_groups
    arm: ecard: fix dev_groups patch typo
    tty: serdev: use dev_groups and not dev_attrs for bus_type
    sparc: vio: use dev_groups and not dev_attrs for bus_type
    hid: intel-ish-hid: use dev_groups and not dev_attrs for bus_type
    ...

    Linus Torvalds
     

03 Jul, 2017

1 commit


29 Jun, 2017

1 commit


28 Jun, 2017

3 commits

  • The 35h instruction op code has two aliases/macro definitions:
    - SPINOR_OP_RDCR from include/linux/mtd/spi-nor.h
    - SPINOR_OP_RDSR2 from drivers/mtd/devices/serial_flash_cmds.h

    Actually, some manufacturers name the associated internal register Status
    Register 2 whereas other manufacturers name it Configuration Register
    hence the two different macros for the very same instruction op code.

    Since the spi-nor.h file is the reference file for all SPI NOR instruction
    op codes, this patch removes the definition of the SPINOR_OP_RDSR2 macro.

    Also the SPINOR_OP_RDSR2 macro will be associated to another instruction
    op code in a further patch so we need to avoid a conflict defining this
    macro twice. Indeed the JESD216 rev B specification, defining the SFDP
    tables, also refers to the 3Eh and 3Fh instruction op codes to write/read
    the Status Register 2 on some SPI NOR flash memories, the 35h op code
    still being used to read the Configuration Register/Status Register 2 on
    other memories.

    Signed-off-by: Cyrille Pitchen
    Acked-by: Marek Vasut

    Cyrille Pitchen
     
  • The variable was already marked 'const' before the previous
    patch, but the qualifier was in an unusual place, and now the
    extra 'const' causes a harmless warning:

    drivers/mtd/spi-nor/cadence-quadspi.c:1286:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]

    This removes the other 'const' instead.

    Fixes: f993c123b461 ("mtd: spi-nor: cqspi: make of_device_ids const")
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Cyrille Pitchen

    Arnd Bergmann
     
  • Instead move it to the callers. Those that either don't use bio_data() or
    page_address() or are specific to architectures that do not support highmem
    are skipped.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     

27 Jun, 2017

2 commits


25 Jun, 2017

5 commits

  • Currently, we use the fixed ACC timing 0x10804211. This is not the best
    setting for each case. Actually, MTK NAND controller can adapt ACC timings
    dynamically according to nfi clock frequence.
    Implement the ->setup_data_interface() hook to optimize driver performance.

    Signed-off-by: Xiaolei Li
    Signed-off-by: Boris Brezillon

    Xiaolei Li
     
  • There is no need to add mtk_ecc_hw_init during ecc resume, because there
    always takes mtk_ecc_wait_idle in the function mtk_ecc_enable.

    Signed-off-by: Xiaolei Li
    Signed-off-by: Boris Brezillon

    Xiaolei Li
     
  • chip->select_chip will do nfc runtime configuration. There is no need to
    do mtk_nfc_hw_init before it.

    Signed-off-by: Xiaolei Li
    Signed-off-by: Boris Brezillon

    Xiaolei Li
     
  • Currently, ecc encode irq is enabled when writing page with hwecc, but
    we actually do not wait for this irq done. Because NFI and ECC work in
    parallel, nfi irq and ecc irq almost come together.

    Now, there are two steps to check whether page data are totally written.
    First, wait for nfi irq INTR_AHB_DONE. This is to ensure all data
    in RAM are received by NFI.
    Second, polling the register NFI_ADDRCNTR till all data include ecc
    parity data runtime generated by ECC are sent to NAND device.

    So, it is redunant to enable ecc irq without waiting for it.

    Signed-off-by: Xiaolei Li
    Signed-off-by: Boris Brezillon

    Xiaolei Li
     
  • Currently, we trigger ECC HW before setting ecc irq. It is incorrect.
    Because ECC starts working once the register ECC_CTL_REG is set as
    ECC_OP_ENABLE. And this may lead an abnormal behavior of ecc irq.
    So, should enable ecc irq at first, then trigger ECC.

    Fixes: 1d6b1e464950 ("mtd: mediatek: driver for MTK Smart Device")
    Signed-off-by: Xiaolei Li
    Signed-off-by: Boris Brezillon

    Xiaolei Li
     

24 Jun, 2017

2 commits


23 Jun, 2017

6 commits

  • This makes TRX parsing code reusable with other platforms and parsers.

    Please note this patch doesn't really change anything in the existing
    code, just moves it. There is still some place for improvement (e.g.
    working on non-hacky method of checking rootfs format) but it's not
    really a subject of this change.

    Signed-off-by: Rafał Miłecki
    Signed-off-by: Brian Norris

    Rafał Miłecki
     
  • Some devices have partitions that are kind of containers with extra
    subpartitions / volumes instead of e.g. a simple filesystem data. To
    support such cases we need to first create normal flash device
    partitions and then take care of these special ones.

    It's very common case for home routers. Depending on the vendor there
    are formats like TRX, Seama, TP-Link, WRGG & more. All of them are used
    to embed few partitions into a single one / single firmware file.

    Ideally all vendors would use some well documented / standardized format
    like UBI (and some probably start doing so), but there are still
    countless devices on the market using these poor vendor specific
    formats.

    This patch extends MTD subsystem by allowing to specify list of parsers
    that should be tried for a given partition. Supporting such poor formats
    is highly unlikely to be the top priority so these changes try to
    minimize maintenance cost to the minimum. It reuses existing code for
    these new parsers and just adds a one property and one new function.

    This implementation requires setting partition parsers in a flash
    parser. A proper change of bcm47xxpart will follow and in the future we
    will hopefully also find a solution for doing it with ofpart
    ("fixed-partitions").

    Signed-off-by: Rafał Miłecki
    Signed-off-by: Brian Norris

    Rafał Miłecki
     
  • Some flash device partitions can be containers with extra subpartitions
    (volumes). All callbacks are already capable of this additional level of
    indirection.

    This patch makes sure we always display subpartitions using a tree
    structure and takes care of deleting subpartitions when parent gets
    removed.

    Signed-off-by: Rafał Miłecki
    Signed-off-by: Brian Norris

    Rafał Miłecki
     
  • This prepares mtd subsystem for the new feature: subpartitions. In some
    cases flash device partition can be a container with extra subpartitions
    (volumes).

    So far there was a flat structure implemented. One master (flash device)
    could be partitioned into few partitions. Every partition got its master
    and it was enough to get things running.

    To support subpartitions we need to store pointer to the parent for each
    partition. This is required to implement more natural tree structure and
    handle all recursion and offsets calculation.

    To make code consistent this patch renamed "master" to the "parent" in
    places where we can be dealing with subpartitions.

    Signed-off-by: Rafał Miłecki
    Signed-off-by: Brian Norris

    Rafał Miłecki
     
  • When support for sysfs "offset" file was added it missed to update the
    del_mtd_partitions function. It deletes partitions just like
    mtd_del_partition does so both should also take care of removing sysfs
    files.

    This change moves sysfs_remove_files call to the shared function to fix
    this issue.

    Fixes: a62c24d755291 ("mtd: part: Add sysfs variable for offset of partition")
    Cc: Dan Ehrenberg
    Signed-off-by: Rafał Miłecki
    Signed-off-by: Brian Norris

    Rafał Miłecki
     
  • There are two similar functions handling deletion. One handles single
    partition and another the whole MTD flash device. They share (duplicate)
    some code so it makes sense to add a small helper for that part.

    Function del_mtd_partitions has been moved a bit to keep all deleting
    stuff together.

    Signed-off-by: Rafał Miłecki
    Signed-off-by: Brian Norris

    Rafał Miłecki
     

22 Jun, 2017

1 commit

  • The segment registers of the SMC controller provide a way to configure
    the mapping windows of the chips on the AHB bus. The settings are
    required to be correct when the controller operates in Command mode,
    which is the case for DMAs and the LPC mapping.

    This tries to set the segment registers of each chip depending on the
    size of the flash device and depending on the previous segment
    settings, in order to have a contiguous window across multiple chips.

    Unfortunately, the AST2500 SPI controller has a bug and it is not
    possible to configure a full 128MB window for a chip of the same
    size. The window size needs to be restricted to 120MB. This issue only
    applies to CE0.

    Signed-off-by: Cédric Le Goater
    Reviewed-by: Marek Vasut
    Signed-off-by: Cyrille Pitchen

    Cédric Le Goater
     

21 Jun, 2017

6 commits


20 Jun, 2017

6 commits

  • All IFC version >= 1.0 use 28nm technology for SRAM. Here SRAM has
    a requirement to initialize before any read operation performed for
    avoiding ECC Error.

    So update condition check to initialize SRAM for all IFC version >= 1.0.0

    Signed-off-by: Prabhakar Kushwaha
    Signed-off-by: Boris Brezillon

    Prabhakar Kushwaha
     
  • Introduce some macros and helpers to avoid magic numbers and
    rename macros/functions for clarification.

    - We see '| 2' in several places. This means Data Cycle in MAP11 mode.
    The Denali User's Guide says bit[1:0] of MAP11 is like follows:

    b'00 = Command Cycle
    b'01 = Address Cycle
    b'10 = Data Cycle

    So, this commit added DENALI_MAP11_{CMD,ADDR,DATA} macros.

    - We see 'denali->flash_mem + 0x10' in several places, but 0x10 is a
    magic number. Actually, this accesses the data port of the Host
    Data/Command Interface. So, this commit added DENALI_HOST_DATA.
    On the other hand, 'denali->flash_mem' gets access to the address
    port, so DENALI_HOST_ADDR was also added.

    - We see 'index_addr(denali, cmd, 0x1)' in denali_erase(), but 0x1
    is a magic number. 0x1 means the erase operation. Replace 0x1
    with DENALI_ERASE.

    - Rename index_addr() to denali_host_write() for clarification

    - Denali User's Guide says MAP{00,01,10,11} for access mode. Match
    the macros with terminology in the IP document.

    - Rename struct members as follows:
    flash_bank -> active_bank (currently selected bank)
    flash_reg -> reg (base address of registers)
    flash_mem -> host (base address of host interface)
    devnum -> devs_per_cs (devices connected in parallel)
    bbtskipbytes -> oob_skip_bytes (number of bytes to skip in OOB)

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Boris Brezillon

    Masahiro Yamada
     
  • Now this driver is ready to remove NAND_SKIP_BBTSCAN.

    The BBT descriptors in denali.c are equivalent to the ones in
    nand_bbt.c. There is no need to duplicate the equivalent structures.
    The with-oob decriptors do not work for this driver anyway.

    The bbt_pattern (offs = 8) and the version (veroffs = 12) area
    overlaps the ECC area. Set NAND_BBT_NO_OOB flag to use the no_oob
    variant of the BBT descriptors.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Boris Brezillon

    Masahiro Yamada
     
  • As Russell and Lars stated in the discussion [1], using
    devm_k*alloc() with DMA is not a good idea.

    Let's use kmalloc (not kzalloc because no need for zero-out).
    Also, allocate the buffer as late as possible because it must be
    freed for any error that follows.

    [1] https://lkml.org/lkml/2017/3/8/693

    Signed-off-by: Masahiro Yamada
    Cc: Russell King
    Cc: Lars-Peter Clausen
    Acked-by: Robin Murphy
    Signed-off-by: Boris Brezillon

    Masahiro Yamada
     
  • For ecc->read_page() and ecc->write_page(), it is possible to call
    dma_map_single() against the given buffer. This bypasses the driver
    internal bounce buffer and save the memcpy().

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Boris Brezillon

    Masahiro Yamada
     
  • Recent versions of this IP support automatic erased page detection.
    If an erased page is detected on reads, the controller does not set
    INTR__ECC_UNCOR_ERR, but INTR__ERASED_PAGE.

    The detection of erased pages is based on the number of zeros in a
    page; if the number of zeros is less than the value in the field
    ERASED_THRESHOLD, the page is assumed as erased.

    Please note ERASED_THRESHOLD specifies the number of zeros in a _page_
    instead of an ECC chunk. Moreover, the controller does not provide a
    way to know the actual number of bitflips.

    Actually, an erased page (all 0xff) is not an ECC correctable pattern
    on the Denali ECC engine. In other words, there may be overlap between
    the following two:

    [1] a bit pattern reachable from a valid payload + ECC pattern within
    ecc.strength bitflips
    [2] a bit pattern reachable from an erased state (all 0xff) within
    ecc.strength bitflips

    So, this feature may intercept ECC correctable patterns, then replace
    [1] with [2].

    After all, this feature can work safely only when ECC_THRESHOLD == 1,
    i.e. detect erased pages without any bitflips. This should be the
    case most of the time. If there is a bitflip or more, the driver will
    fallback to the software method by using nand_check_erased_ecc_chunk().

    Strangely enough, the driver still has to fill the buffer with 0xff
    in case of INTR__ERASED_PAGE because the ECC correction engine has
    already manipulated the data in the buffer before it judges erased
    pages.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Boris Brezillon

    Masahiro Yamada