📄 nand_drv_common.h
字号:
/*******************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2005
*
*******************************************************************************/
/*******************************************************************************
*
* Filename:
* ---------
* nand_drv_COMMON.h
*
* Project:
* --------
* FlashTool Download Agent
*
* Description:
* ------------
* General NAND flash driver compatible with most of SAMSUNG devices.
*
* Author:
* -------
* Amos Hsu
*
*==============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* $Revision: 1.0 $
* $Modtime: Jun 08 2005 22:03:44 $
* $Log: //mtkvs01/vmdata/new_flash_tool/archives/DA/INC/nand_drv_COMMON.h-arc $
*
* Rev 1.0 Oct 19 2005 14:40:20 mtk00539
* Initial revision.
* Resolution for 140: [BROM_DLL v2.7.1008][New] Support NFB download and many new features.
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*==============================================================================
*******************************************************************************/
#ifndef _NAND_DRV_COMMON_H_
#define _NAND_DRV_COMMON_H_
#include "SW_TYPES.H"
#include "DOWNLOAD.H"
#include "nand_dev_tbl.h"
#ifdef __cplusplus
extern "C" {
#endif
//------------------------------------------------------------------------------
// COMMON Callback Function Set
//------------------------------------------------------------------------------
extern const NAND_CMD_Callback_S g_NAND_COMMON_CB_FUNC_SET;
//------------------------------------------------------------------------------
// COMMON Callback Function Set Without H/W CopyBack Function
//------------------------------------------------------------------------------
extern const NAND_CMD_Callback_S g_NAND_COMMON_CB_FUNC_SET_WITHOUT_COPYBACK;
//------------------------------------------------------------------------------
// Read Device ID Callback Function
//------------------------------------------------------------------------------
STATUS_E NAND_COMMON_ReadID(
const NAND_DeviceInfo_S *nand_info
,const uint32 c_timeout
,uint16 *p_maker_code
,uint16 *p_device_code
,uint16 *p_ext_code1
,uint16 *p_ext_code2);
//------------------------------------------------------------------------------
// Reset Device Callback Function
//------------------------------------------------------------------------------
STATUS_E NAND_COMMON_Reset(
const NAND_DeviceInfo_S *nand_info
,const uint32 c_timeout);
//------------------------------------------------------------------------------
// Read Status Callback Function
//------------------------------------------------------------------------------
STATUS_E NAND_COMMON_ReadStatus(
const NAND_DeviceInfo_S *nand_info
,const uint32 c_timeout);
//------------------------------------------------------------------------------
// Block Erase Related Callback Function
//------------------------------------------------------------------------------
STATUS_E NAND_COMMON_BlockErase(
const NAND_DeviceInfo_S *nand_info
,const uint32 row_addr);
//------------------------------------------------------------------------------
// Bad Block Symbol Identification Related Callback Function
//------------------------------------------------------------------------------
STATUS_E NAND_COMMON_BadBlockSymbol_Check(
const NAND_DeviceInfo_S *nand_info
,const uint32 *p_spare32 /* MUST be 32bits alignment addr */);
STATUS_E NAND_COMMON_BadBlockSymbol_Set(
const NAND_DeviceInfo_S *nand_info
,uint32 *p_spare32 /* MUST be 32bits alignment addr */);
//------------------------------------------------------------------------------
// Page Read Callback Function
//------------------------------------------------------------------------------
STATUS_E NAND_COMMON_PageRead(
const NAND_DeviceInfo_S *nand_info
,const uint32 c_timeout
,const uint32 row_addr
,uint32 *p_data32 /* MUST be 32bits alignment addr */
,uint32 ecc_parity_from_reg[4]);
//------------------------------------------------------------------------------
// Page Program Callback Function
//------------------------------------------------------------------------------
STATUS_E NAND_COMMON_PageProgram(
const NAND_DeviceInfo_S *nand_info
,const uint32 c_timeout
,const uint32 row_addr
,const uint32 *p_data32 /* MUST be 32bits alignment addr */
,uint32 ecc_parity_from_reg[4]);
//------------------------------------------------------------------------------
// Spare Read Callback Function
//------------------------------------------------------------------------------
STATUS_E NAND_COMMON_SpareRead(
const NAND_DeviceInfo_S *nand_info
,const uint32 c_timeout
,const uint32 row_addr
,uint32 *p_spare32 /* MUST be 32bits alignment addr */);
//------------------------------------------------------------------------------
// Spare Program Callback Function
//------------------------------------------------------------------------------
STATUS_E NAND_COMMON_SpareProgram(
const NAND_DeviceInfo_S *nand_info
,const uint32 c_timeout
,const uint32 row_addr
,const uint32 *p_spare32 /* MUST be 32bits alignment addr */);
//------------------------------------------------------------------------------
// CopyBack Callback Function
//------------------------------------------------------------------------------
STATUS_E NAND_COMMON_CopyBack(
const NAND_DeviceInfo_S *nand_info
,const uint32 c_timeout
,const uint32 src_row_addr
,const uint32 dest_row_addr);
#ifdef __cplusplus
}
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -