?? flash_drv_renesas.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) 2004
*
*******************************************************************************/
/*******************************************************************************
*
* Filename:
* ---------
* flash_drv_RENESAS.h
*
* Project:
* --------
* FlashTool Download Agent
*
* Description:
* ------------
* This Module defines the RENESAS flash driver.
*
* Author:
* -------
* Amos Hsu
*
*==============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* $Revision: 1.3 $
* $Modtime: Jun 14 2005 16:31:38 $
* $Log: //mtkvs01/vmdata/flash_tool/archives/DA/INC/flash_drv_RENESAS.h-arc $
*
* Rev 1.3 Jun 15 2005 12:21:42 mtk00539
* 1. [DA][New] Support new flash devices TV0057A002AABD and TV0057A002AABD.
* 2. [DA][New] Support RENESAS flash with F-WP#(LOW).
* Resolution for 118: [BROM_DLL v2.4.1013][New] Support RENESAS flash with F-WP#(LOW).
*
* Rev 1.2 Nov 30 2004 17:20:18 mtk00539
* [FIX BUG] DON'T use fixed 128 WORDs Page-Program method.
* Because when length_in_word is less than 128, Page-Program will fail!
* Therefore, we have to use another program method.
* First, load variant length data to Page-Buffer, then flush Page-Buffer to flash.
* Resolution for 99: [BROM_DLL v2.4.1008][New] Support INTEL family flash Buffered-Program method.
*
* Rev 1.1 Nov 22 2004 12:23:50 mtk00539
* 1. [DA][BUG FIX] Add data verification in status polling during erase or program operation.
* 2. [DA][BUG FIX] Fix two dies flash detection fail in INTEL_CheckDevID().
* 3. [DA][Change Behavior] When RX_BUFFER_FULL occurs, flush data queued in UART ring buffer til data is less than 512KB.
* 4. [DA][New] Support Buffered-Program method for INTEL family flashes.
* 5. [DA][New] Support new flashes [SHARP]LRS1828C and [RENESAS]M6MGB64BM34CDG.
* Resolution for 99: [BROM_DLL v2.4.1008][New] Support INTEL family flash Buffered-Program method.
*
* Rev 1.0 Aug 03 2004 10:43:20 mtk00539
* Initial revision.
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*==============================================================================
*******************************************************************************/
#ifndef _FLASH_DRV_RENESAS_H_
#define _FLASH_DRV_RENESAS_H_
#include "flash_drv_INTEL.h"
// READ CMD
// PROGRAM CMD
#define RENESAS_CMD_PAGE_PGM 0x41
#define RENESAS_CMD_DATA_LOAD_TO_PAGE_BUF 0x74
#define RENESAS_CMD_PAGE_BUF_TO_FLASH 0x0E
#define RENESAS_CMD_PAGE_BUF_TO_FLASH_CNF 0xD0
// ERASE
// LOCK/UNLOCK
#define RENESAS_CMD_SWLOCK_RELEASE_CMD_1 0x60
#define RENESAS_CMD_SWLOCK_RELEASE_CMD_2 0xAC
#define RENESAS_CMD_SWLOCK_RELEASE_CMD_3 0x7B
// Status Register Bit
#define RENESAS_SR7_DWS_BIT 0x0080
#define RENESAS_SR6_SS_BIT 0x0040
#define RENESAS_SR5_ES_BIT 0x0020
#define RENESAS_SR4_PS_BIT 0x0010
#define RENESAS_SR3_BSAE_BIT 0x0008
#ifdef __cplusplus
extern "C" {
#endif
//------------------------------------------------------------------------------
// Callback Function Set
//------------------------------------------------------------------------------
extern const NOR_CMD_Callback_S RENESAS_CMD_CB_WORD_PGM;
extern const NOR_CMD_Callback_S RENESAS_CMD_CB_128WORD_PAGE_PGM;
//------------------------------------------------------------------------------
// Memory Sector Layout Set
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// Check Device ID Callback Function
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// Check If Device Is Idle Callback Function
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// Erase Related Callback Function
//------------------------------------------------------------------------------
extern void RENESAS_Erase_Block_CMD(const uint32 blockaddr);
extern STATUS_E RENESAS_CheckDone(const uint32 blockaddr);
//------------------------------------------------------------------------------
// Program Related Callback Function
//------------------------------------------------------------------------------
extern void RENESAS_PreProcess_128WORD_BUFPGM(const uint16 dev);
extern void RENESAS_Word_Program(const uint32 blockaddr, const uint32 prog_addr, const uint16 data);
extern void RENESAS_FixedPage_Program(const uint32 blockaddr, const uint32 prog_addr, const uint16 *data, const uint32 length_in_word);
#if 0
extern void RENESAS_DynamicBuf_Program(const uint32 blockaddr, const uint32 prog_addr, const uint16 *data, const uint32 length_in_word);
#endif
//------------------------------------------------------------------------------
// Protection Related Callback Function
//------------------------------------------------------------------------------
extern void RENESAS_SoftwareLockRelease_Preprocess(const uint32 blockaddr);
#ifdef __cplusplus
}
#endif
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -