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

📄 nand_drv_samsung.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_SAMSUNG.c 
 *
 * Project:
 * --------
 *   FlashTool Download Agent 
 *
 * Description:
 * ------------
 *   SAMSUNG compatible NAND flash driver 
 *
 * Author:
 * -------
 *	 Amos Hsu 
 *
 *==============================================================================
 * 				HISTORY
 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
 *------------------------------------------------------------------------------
 * $Revision:   1.0  $
 * $Modtime:   Aug 09 2005 15:45:28  $
 * $Log:   //mtkvs01/vmdata/new_flash_tool/archives/DA/SRC/nand_drv_SAMSUNG.c-arc  $
 * 
 *    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_SAMSUNG.h"
#include "nand_drv_COMMON.h"
#include "nand_util_func.h"
#include "NFI.h"

//------------------------------------------------------------------------------
// SAMSUNG Command Set                                                          
//------------------------------------------------------------------------------
const NAND_CommandSet_S		g_NAND_SAMSUNG_512_NO_COPYBACK_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 
	,{ 0, 0 }		// copyback read 
	,{ 0, 0 }		// copyback read confirm 
	,{ 0, 0 }		// copyback program 
	,{ 0, 0 }		// copyback program confirm 
};

const NAND_CommandSet_S		g_NAND_SAMSUNG_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 
	,{ 0, 0 }		// copyback program confirm 
};

const NAND_CommandSet_S		g_NAND_SAMSUNG_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 
};

⌨️ 快捷键说明

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