• Masahiro Yamada's avatar
    mtd: nand: denali: set NAND_ECC_CUSTOM_PAGE_ACCESS · b21ff825
    Masahiro Yamada authored
    The denali_cmdfunc() actually does nothing valuable for
    NAND_CMD_{PAGEPROG,READ0,SEQIN}.
    
    For NAND_CMD_{READ0,SEQIN}, it copies "page" to "denali->page", then
    denali_read_page(_raw) compares them just for the sanity check.
    (Inconsistently, this check is missing from denali_write_page(_raw).)
    
    The Denali controller is equipped with high level read/write interface,
    so let's skip unneeded call of cmdfunc().
    
    If NAND_ECC_CUSTOM_PAGE_ACCESS is set, nand_write_page() will not
    call ->waitfunc hook.  So, ->write_page(_raw) hooks should directly
    return -EIO on failure.  The error handling of page writes will be
    much simpler.
    Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
    Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
    b21ff825
denali.c 44.9 KB