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

📄 nand_drv_hynix.c

📁 MTK手机平台下载工具FLASHTOOL驱动源码
💻 C
字号:
/*******************************************************************************
*  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_HYNIX.c 
 *
 * Project:
 * --------
 *   FlashTool Download Agent 
 *
 * Description:
 * ------------
 *   HYNIX compatible NAND flash driver 
 *
 * Author:
 * -------
 *	 Amos Hsu 
 *
 *==============================================================================
 * 				HISTORY
 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
 *------------------------------------------------------------------------------
 * $Revision:   1.1  $
 * $Modtime:   Oct 27 2005 20:17:16  $
 * $Log:   //mtkvs01/vmdata/new_flash_tool/archives/DA/SRC/nand_drv_HYNIX.c-arc  $
 * 
 *    Rev 1.1   Nov 19 2005 00:46:12   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
 *  5. [DA][BUF FIX] Refill BootLoader header for BootROM to identify NAND flash organization.
 * Resolution for 149: [BROM_DLL v2.7.1011][New] Add UID Secure Booting feature and Bug Fix.
 * 
 *    Rev 1.0   Oct 19 2005 14:41:08   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!!
 *==============================================================================
 *******************************************************************************/
#include "nand_drv_HYNIX.h"
#include "nand_drv_COMMON.h"
#include "nand_util_func.h"
#include "NFI.h"

//------------------------------------------------------------------------------
// HYNIX Command Set                                                            
//------------------------------------------------------------------------------
const NAND_CommandSet_S		g_NAND_HYNIX_512_CMD_SET={
	 { 1, 0x90 }	// read id 
	,{ 1, 0x70 }	// read status 
	,{ 1, 0xFF }	// reset device 
	,{ 1, 0x00 }	// read 
	,{ 1, 0x50 }	// read spare area 
	,{ 0, 0 }		// read confirm 
	,{ 1, 0x00 }	// program 1st half page 
	,{ 1, 0x80 }	// program 
	,{ 1, 0x10 }	// program confirm 
	,{ 1, 0x60 }	// erase 
	,{ 1, 0xD0 }	// erase confirm 
	,{ 1, 0x00 }	// copyback read 
	,{ 0, 0 }		// copyback read confirm 
	,{ 1, 0x8A }	// copyback program 
	,{ 1, 0x10 }	// copyback program confirm 
};

const NAND_CommandSet_S		g_NAND_HYNIX_2048_CMD_SET={
	 { 1, 0x90 }	// read id 
	,{ 1, 0x70 }	// read status 
	,{ 1, 0xFF }	// reset device 
	,{ 1, 0x00 }	// read 
	,{ 0, 0 }		// read spare area 
	,{ 1, 0x30 }	// read confirm 
	,{ 0, 0 }		// program 1st half page 
	,{ 1, 0x80 }	// program 
	,{ 1, 0x10 }	// program confirm 
	,{ 1, 0x60 }	// erase 
	,{ 1, 0xD0 }	// erase confirm 
	,{ 1, 0x00 }	// copyback read 
	,{ 1, 0x35 }	// copyback read confirm 
	,{ 1, 0x85 }	// copyback program 
	,{ 1, 0x10 }	// copyback program confirm 
};

//------------------------------------------------------------------------------
// HYNIX Callback Function Set                                                  
//------------------------------------------------------------------------------

⌨️ 快捷键说明

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