/* function : wb_ebios_get_status(u32 sel) description : get last frame write back status parameters : sel <controller select> return : 0 writeback finish 1 overflow 2 timeout 3 not start  */
u32 wb_ebios_get_status(u32 sel)
/* function : wb_ebios_get_status(u32 sel) description : get last frame write back status parameters : sel <controller select> return : 0 writeback finish 1 overflow 2 timeout 3 not start  */
u32 wb_ebios_get_status(u32 sel)
{
    u32 status;
    status = wb_dev[sel]->status.dwval & 0x71;
    wb_dev[sel]->status.dwval = 0x71;
    if (status & 0x10)
        return 0;
    else if (status & 0x20)
        return 1;
    else if (status & 0x40)
        return 2;
    else
        return 3;
}