• Xiaolei Li's avatar
    mtd: nand: mtk: disable ecc irq when writing page with hwecc · 88404312
    Xiaolei Li authored
    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: default avatarXiaolei Li <xiaolei.li@mediatek.com>
    Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
    88404312
mtk_ecc.c 12.2 KB