⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flash_drv_amd.h

📁 MTK手机平台下载工具FLASHTOOL驱动源码
💻 H
📖 第 1 页 / 共 2 页
字号:
/*******************************************************************************
*  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_AMD.h 
 *
 * Project:
 * --------
 *    FlashTool Download Agent 
 *
 * Description:
 * ------------
 *    This Module defines the AMD family flash driver. 
 *
 * Author:
 * -------
 *	  Amos Hsu
 *
 *==============================================================================
 * 				HISTORY
 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
 *------------------------------------------------------------------------------
 * $Revision:   1.12  $ 
 * $Modtime:   Jan 05 2006 17:36:42  $
 * $Log:   //mtkvs01/vmdata/flash_tool/archives/DA/INC/flash_drv_AMD.h-arc  $
 * 
 *    Rev 1.12   Jan 14 2006 00:18:18   mtk00539
 * Re-org source code.
 * Resolution for 159: [FlashTool v2.7.1015]
 * 
 *    Rev 1.11   Jan 04 2006 14:35:48   mtk00539
 * Bug fixes:
 *  1. [DA] Fix Spansion S71PLXXXN detection problem by reading CFI info.
 * 
 * New features:
 *  1. [DA] Supports Spansion MirrorBit Buffer-Program method.
 *  2. [DA] Supports new NOR flash device.
 * 		[SPANSION] S71PL129N
 * 
 * Enhancements:
 *  1. [DA] Halt program when external RAM is less than 128KB.
 * Resolution for 158: [FlashTool v2.7.1014][New] Support Spansion MirrorBit Buffer-Program method.
 * 
 *    Rev 1.10   Jan 02 2006 13:16:22   mtk00539
 * Add new flash [SPANSION] S71PL256NC0HAW5B
 * Resolution for 156: [FlashTool v2.7.1013][BUG FIX] Fix BootROM start command failure while manually selecting NMT6226 or MT6227 baseband chip.
 * 
 *    Rev 1.9   Dec 29 2005 10:54:24   mtk00539
 *  1. [DA] Supports new NOR flash device.
 * 		[SPANSION] S71PL127N
 * 		[SILICON7] SV6D2832UTA
 * 		[SILICON7] SV6D2832UBA
 * 		[SILICON7] SV6C2832UTA
 * 		[SILICON7] SV6C2832UBA
 * 		[SHARP] LH28F16
 * 		[TOSHIBA] TV00578002DABD
 * 		[TOSHIBA] TV00578003DABD
 * Resolution for 156: [FlashTool v2.7.1013][BUG FIX] Fix BootROM start command failure while manually selecting NMT6226 or MT6227 baseband chip.
 * 
 *    Rev 1.8   Nov 19 2005 00:43:20   mtk00539
 *  1. [BROM_DLL&DA][New] Add UID Secure Booting feature.
 *  2. [BROM_DLL&DA][BUG FIX] Fix RTC date-time value could not be initialized problem. 
 *  3. [DA][New] Supports new NOR flash device.
 * 				[INTEL] 38F1010C0ZBL0
 * 				[INTEL] 28F1602C3BD70
 * 				[TOSHIBA] TY0068B012APGG
 * 				[TOSHIBA] TY0068B013APGG
 *  4. [DA][New] Supports new NAND flash device.
 * 				[HYNIX] HY27XG082G2M
 * Resolution for 149: [BROM_DLL v2.7.1011][New] Add UID Secure Booting feature and Bug Fix.
 * 
 *    Rev 1.7   Oct 18 2005 13:36:40   mtk00539
 *  1. [DA][New] New NOR flash device support
 * 		[SILICON7] S7_SV7E160XT,
 * 		[SILICON7] S7_SV7E160XB,
 * 		[SILICON7] S7_SV7E320XT,
 * 		[SILICON7] S7_SV7E320XB,
 * 		[SPANSION] S71GL032R3_T,
 * 		[SPANSION] S71GL032R4_B,
 * 		[SPANSION] S71GL032R1R2,
 * 		[TOSHIBA] TV00569002BABD,
 * 		[TOSHIBA] TV00569003BABD,
 * 		[TOSHIBA] TV00569002AABD,
 * 		[TOSHIBA] TV00569003AABD,
 * Resolution for 137: [BROM_DLL v2.4.1017][New] Enable SID feature and add new flash device supoprt.
 * 
 *    Rev 1.6   Feb 16 2005 17:23:58   mtk00539
 *  1. [DA][BUG FIX] Fix INTEL W18/W30 series flash program fail. this series don't support Buffered-Program method, we can only use WORD program.
 *  2. [DA][BUG FIX] Fix format %x bug in UART_Printf().
 *  3. [DA][BUG FIX] Fix small size EXT_SRAM detection error. Shrink the EXT_SRAM detection unit from 512KB to 128KB in Board_Schematic().
 *  4. [DA][New] Extend max sector region to 4 for SPANSION S71AL016D flash.
 *  5. [DA][New] Add SPANSION S71AL016D T/B and SHARP LRS18C8A flash support. 
 * Resolution for 105: [BROM_DLL v2.4.1009][New] Fix INTEL W18/W30 series bug and add SPANSION S71AL016D and SHARP LRS18C8A flash support.
 * 
 *    Rev 1.5   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.4   Nov 05 2004 10:37:30   mtk00539
 *  1. [DA][BUG FIX] Fix format progress report error, percentage variable should not just use uint8.
 *  2. [DA][BUG FIX] Fix command error for AMD protection routines.
 *  3. [DA][Enhance] Fix UART_Printf compile warning in UART.C
 * Resolution for 96: [BROM_DLL v2.4.1007][New] Implement S/W compatible mechanism for MT6218B_FN and MT6218B_GN.
 * 
 *    Rev 1.3   Oct 29 2004 11:47:16   mtk00539
 *  1. [DA][BUG FIX] Read CFI boot sector flag to determine AM49DL3208GT and S71PL032J, since both flashes have the same id, but different layout.
 *  2. [DA][BUG FIX] Fix INTEL and RENESAS status checking flow.
 *  3. [DA][Enhance] Dump more logs in TEST_ExtSRAM().
 *  4. [DA][New] Support new flashes
 * 				[SAMSUNG] K5J6316CTM
 * 				[TOSHIBA] TH50VPF5682CDSB
 * 				[TOSHIBA] TH50VPF5683CDSB
 * 				[ISSI] IS75V16F128GS32
 * 				[RENESAS] M6MGT64BM34CDG
 * 				[ST] M30L0T7000T0, M36L0T7050T0
 * 				[ST] M30L0T7000B0, M36L0T7050B0
 * 				[SHARP] LRS1862
 * 				[SHARP] LRS1806A
 * 				[AMD] AM49DL3208GT
 * 				[SPANSION] S29PL032J, S71PL032J
 * Resolution for 92: [BROM_DLL v2.4.1006][BUG FIX] Fix AM49DL3208GT & S71PL032J download fail problem and some enhancement.
 * 
 *    Rev 1.2   Aug 23 2004 19:57:58   mtk00539
 * [DA][BUG FIX] Fix AM49DL3208G sector layout error.
 * Resolution for 86: [BROM_DLL v2.4.1003] Fix AM49DL3208G sector layout error.
 * 
 *    Rev 1.1   Aug 03 2004 10:42:44   mtk00539
 *  1. [DA][BUG FIX] Invoke Board_Schematic()(old name is HW_Init()) before FUTL_CheckDevice(). Because FUTL_CheckDevice() must know the absolute address for each bank.
 *  2. [DA][New] Add 12 new flash devices support 
 * 				[SAMSUNG]K5A3280YT,
 * 				[TOSHIBA]TH50VPF6782AASB,
 * 				[TOSHIBA]TH50VPF6783AASB,
 * 				[TOSHIBA]TV00578002AABD,
 * 				[TOSHIBA]TV00578003AABD,
 * 				[Fujitsu]MB84VP24581HK,
 * 				[INTEL]INTEL_28F640W30_B,
 * 				[SPANSION]AM49PDL127BH,
 * 				[SPANSION]AM49PDL129BH,
 * 				[RENESAS]M6MGD13BW66CDG,
 * 				[Winbond]W19B322TM,
 * 				[Winbond]W19B323TM,
 *  3. [DA][New] Readback check after WORD program is done, so that DA won't have to keep the chksum.
 *  4. [DA][New] Auto-detect baseband chip type.
 *  5. [DA][New] Auto-detect external SRAM size.
 *  6. [DA][New] Merge MT6205B, MT6218B and MT6219 to an all-in-one DA.
 *  7. [DA][New] Merge flash stress test module.
 *  8. [DA][New] Modify makefile to build ARM or THUMB code.
 *  9. [DA][New] Construct a customization kit for customers to add new flash or SOC checking algorithm by themselves.
 * 10. [DA][Enhance] Split out AM29PDL128G function to improve the performance of general AMD callback functions.
 * 11. [DA][Enhance] Enhance RX_BUFF_FULL behavior to prevent always retry two times.
 * Resolution for 83: [BROM_DLL v2.4.1002] Merge all the DAs into all-in-one DA and fix many bugs and enhancement.
 * 
 *    Rev 1.0   Jul 19 2004 01:45:30   mtk00539
 * Initial revision.
 * 
 *------------------------------------------------------------------------------
 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
 *==============================================================================
 *******************************************************************************/
#ifndef _FLASH_DRV_AMD_H_
#define _FLASH_DRV_AMD_H_

#include "flash.h"

// AMD Command Address 
#define AMD_CMD_ADDR1						0x555
#define AMD_CMD_ADDR2						0x2AA
#define AMD_SA_ADDR							0x0

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -