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

📄 bdkemul.h

📁 H3 M-system NAND flash driver in Linux OS, M-DOC driver
💻 H
字号:
/****************************************************************************** *                                                                            * * Project: DOC Driver for Linux 2.4 Block device driver for mDOC H3  family  * * of devices under Linux kernel 2.4.                                         * *                                                                            * *   Version: 1.0                                                             * *   Email questions to: oemsupport@sandisk.com                               * *   Copyright (C) SanDisk IL Ltd. 1995 - 2007                                * *   SanDisk IL Ltd., 7 Atir Yeda Street, Kfar Saba 44425, Israel             * *                                                                            * ****************************************************************************** *                                                                            * * This program is free software; you can redistribute it and/or modify it    * * under the terms of the GNU General Public License as published by the Free * * Software Foundation; either version 2 of the License, or any later version.* * This program is distributed in the hope that it will be useful, but WITHOUT* * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or      * * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for  * * more details, which is set forth in the readme.txt file.                   * * You should have received a copy of the GNU General Public License along    * * with this program; if not, write to the Free Software Foundation, Inc., 51 * * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA                    * *                                                                            * * This License does not grant you any right to use the trademarks, service   * * marks or logos of SanDisk IL Ltd. or SanDisk Corporation.                  * * Subject to the foregoing, SanDisk IL Ltd., for itself and on behalf of its * * licensors, hereby reserves all intellectual property rights in the program,* * except for the rights expressly granted in this License.                   * *                                                                            * ******************************************************************************//*
 * $Log:   V:/PVCSDB/DiskOnChip/archives/Test for 7.x/src/H3/bdkemul.h-arc  $
 * 
 *    Rev 1.13   Sep 11 2006 13:45:10   yaniv.iarovici
 * Legal header added
 * 
 *    Rev 1.12   Aug 09 2006 17:34:14   Polina.Marimont
 * initial for DOC Driver 1.0
 * 
 *    Rev 1.11   May 28 2006 12:48:42   polina.marimont
 * comments
 * 
 *    Rev 1.10   May 17 2006 12:51:04   polina.marimont
 * 1. DOCH_DiskUserAttrWithBinary - changed to support floors
 * 2. DOCH macros use instead of numerical constants
 * 
 *    Rev 1.9   Mar 22 2006 17:35:46   DoronC
 * Bug fix - add signature to disk attributes in order to use only 
 * format made by TrueFFS 7.1 and not by host SDK.
 * Other format will force reformating of the media.
 * 
 *    Rev 1.8   Feb 16 2006 11:32:36   DoronC
 * Store binary partition flags in the attributes and return then 
 * when requested by extendedInfo for compatability with legacy 
 * devices.
 * 
 *    Rev 1.7   Feb 14 2006 10:50:04   DoronC
 * Remove large variables from stack. use one global buffer for 
 * all large buffers needs.
 */
#ifndef BDKEMUL_H
#define BDKEMUL_H

#include "part_inf.h"

/*Unit size*/
#define BDK_SECTORS_IN_UNIT 0x200
#define BDK_UNIT_SIZE (BDK_SECTORS_IN_UNIT<<DOCH_SECTOR_SIZE_BITS)

/*Partition User Attributes*/
#define SUB_PARTITIONS_PER_BINARY	10

/*16Byte overall*/
typedef struct {
	FLByte	bSignature[4];			/*Partition signature*/
	FLDword dwOffset;				/*From start of binary partition in sectors */
	FLDword dwSize;					/*Total sub-partition size in sectors */
	FLDword dwUsedSize;				/*Used size in sectors */
} DOCH_BinarySubPartitionEmulation;

/*164Byte overall*/
typedef struct {
	FLByte	bNumOfSubPartitions;		/*Number of created sub-partitions*/
	FLByte  bReserved[3];
    FLDword dwPartitionFlags;
	DOCH_BinarySubPartitionEmulation subPartitions[SUB_PARTITIONS_PER_BINARY];
} DOCH_BinaryPartitionEmulation;

/*512Byte overall (1 sector)*/
typedef struct { 
	FLByte	bReservedSDK[DOCH_PART_INFO_SDK_RESERVED_BYTES];		/*Reserved for SDK use*/
	FLByte	bType;					/*DOCH_PartitionType*/
	FLByte	breserved1[3];
	DOCH_BinaryPartitionEmulation	binPartHeader;	/*Valid only if type = PARTITION_TYPE_BINARY*/
	FLByte  bDPSFwd;				/*Next partition has same passkey (!=0)*/
	FLByte  bDPSBwd;				/*Previous partition has same passkey (!=0)*/
	FLByte	bProtected;				/*Partition was defined with PROTECTABLE flag*/
	FLByte	bChangableProtection;	/*Partition was defined with CHANGEABLE_PROTECTION flag*/
	FLByte  bReserved2[0x110];
} DOCH_PartitionUserAttrWithBinary;

typedef struct {
	FLByte bReservedSDK[DOCH_DEVICE_INFO_SDK_RESERVED_BYTES];		/*Reserved for SDK use*/
	FLByte bIplPresent;				/*Exists in DOCH_DeviceAttributes as well !*/
	FLByte bOtpPresent;				/*OTP partition is present*/		
	FLByte bNumOfBinaryPartitions;	/*Number of emulated binary partitions*/
	FLByte bReserved1;
	FLByte bProgrammerName[4];
	FLByte bProgrammerVersion[4];
	FLByte bTFFSVersion[10];
    FLByte bMigrationSignature[10];
	FLByte bReserved[0x19A];
} DOCH_DiskUserAttrWithBinary;

#endif /*BDKEMUL_H*/

⌨️ 快捷键说明

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