• Sascha Hauer's avatar
    mtd: nand: mxc: Fix failed/corrected values for v2/v3 controllers · 67b87f66
    Sascha Hauer authored
    Currently nand_read_page_hwecc() from nand_base calls
    mxc_nand_correct_data_v2_v3() for each subpage, but in this function we
    return the corrected/failed results for the whole page instead
    of a single subpage. On a 2k page size Nand this leads to results which
    are 4 times too high.
    The whole ecc.calculate/ecc.correct mechanism used by
    nand_read_page_hwecc() is not suitable for devices which correct the
    data in hardware, so fix this by using a driver specific read_page
    function which does the right thing. Also add read_page_raw and read_oob
    For proper raw and oob read support.
    Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
    Signed-off-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
    67b87f66
mxc_nand.c 51.3 KB