__s32 PHY_SimpleErase_2CH (struct boot_physical_param *eraseop ) { __s32 status; __s32 ret = 0; __u32 rb; for(NandIndex = 0; NandIndex<CHANNEL_CNT;NandIndex++) { ret = _erase_single_block(eraseop); if (ret) return -1; rb = _cal_real_rb(eraseop->chip); NFC_SelectChip(eraseop->chip); NFC_SelectRb(rb); /*get status*/ while(1){ status = _read_status(0x70,eraseop->chip); if (status & NAND_STATUS_READY) break; } if (status & NAND_OPERATE_FAIL) ret = -2; NFC_DeSelectChip(eraseop->chip); NFC_DeSelectRb(rb); if(NandIndex == (CHANNEL_CNT-1)) break; } NandIndex = 0; return ret; }