/* enable or disable the EXMC NAND ECC function  */
void exmc_nand_ecc_config(uint32_t exmc_nand_bank, ControlStatus newvalue)
/* enable or disable the EXMC NAND ECC function  */
void exmc_nand_ecc_config(uint32_t exmc_nand_bank, ControlStatus newvalue)
{
    if(ENABLE == newvalue) {
        EXMC_NPCTL(exmc_nand_bank) |= EXMC_NPCTL_ECCEN;
    } else {
        EXMC_NPCTL(exmc_nand_bank) &= ~EXMC_NPCTL_ECCEN;
    }
}