Пример #1
0
/*
************************************************************************************************************************
*                       SWITCH BLOCK MAPPING TABLE
*
*Description: Switch block mapping table.
*
*Arguments  : nZone     zone number which block mapping table need be accessed.
*
*Return     : switch result;
*               = 0     switch successful;
*               = -1    switch failed.
************************************************************************************************************************
*/
__s32 BMM_SwitchMapTbl(__u32 nZone)
{
    __s32   result = NAND_OP_TRUE;

    if(NAND_OP_TRUE != _blk_map_tbl_cache_hit(nZone))
    {
        MAPPING_DBG("BMM_SwitchMapTbl : post zone %d cache\n",nZone);
        result = (_blk_map_tbl_cache_post(nZone));
    }

    _CalBlkTblAccessCount();

    return result;
}
Пример #2
0
/*
************************************************************************************************************************
*                       SWITCH BLOCK MAPPING TABLE
*
*Description: Switch block mapping table.
*
*Arguments  : nZone     zone number which block mapping table need be accessed.
*
*Return     : switch result;
*               = 0     switch successful;
*               = -1    switch failed.
************************************************************************************************************************
*/
__s32 BMM_SwitchMapTbl(__u32 nZone)
{
    __s32   result = NAND_OP_TRUE;

	if(tmpLogicalBlk!= 0xffff)
	{
		PRINT("log release thread is runing!!!!\n");
		while(1);
	}

    if(NAND_OP_TRUE != _blk_map_tbl_cache_hit(nZone))
    {
        MAPPING_DBG("BMM_SwitchMapTbl : post zone %d cache\n",nZone);
		result = (_blk_map_tbl_cache_post(nZone));
    }

    _CalBlkTblAccessCount();

    return result;
}