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

📄 flchkdef.h

📁 H3 M-system NAND flash driver in Linux OS, M-DOC driver
💻 H
📖 第 1 页 / 共 3 页
字号:
/****************************************************************************** *                                                                            * * 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/Testing/TrueFFS 6.3/Drop 2.5/3/common/flchkdef.h-arc  $
 * 
 *    Rev 1.78.2.16.1.1   Dec 04 2006 12:44:48   Yaniv.Iarovici
 * Change EQA to 18.
 * 
 *    Rev 1.78.2.16.1.0   Dec 03 2006 13:43:14   Yaniv.Iarovici
 * Header update
 * 
 *    Rev 1.78.2.17   Dec 03 2006 13:32:26   Yaniv.Iarovici
 * 1. Change EQA to 17.
 * 2. Removed DOCH_FLOORS.
 * Encapsulate auto wipe-sector operation for Dev1 under '#ifndef DOCH_NO_AUTO_WIPE_SECTORS_DEV1'
 * 
 *    Rev 1.78.2.16   Nov 30 2006 10:24:02   Yaniv.Iarovici
 * 1. Change EQA to 16.
 * 2. Add default customization for DOCH_WAIT_B4_DEV1_ID.
 * 
 *    Rev 1.78.2.15   Nov 21 2006 14:27:06   Yaniv.Iarovici
 * Update EQA to 15.
 * 
 *    Rev 1.78.2.14   Nov 13 2006 15:14:04   Yaniv.Iarovici
 * Change EQA to 14.
 * 
 *    Rev 1.78.2.13   Nov 12 2006 09:47:42   Yaniv.Iarovici
 * 1. Changed version to EQA12 RC2.
 * 2. Added default values for 
 * - FL_IPL_DELAY_CELL_CONFIG_READ
 * - FL_IPL_DELAY_CELL_CONFIG_WRITE
 * 
 *    Rev 1.78.2.12   Nov 01 2006 08:56:04   Yaniv.Iarovici
 * Change version to EQA12.
 * 
 *    Rev 1.78.2.11   Oct 31 2006 12:23:52   yaniv.iarovici
 * Change version to EQA11.
 * 
 *    Rev 1.78.2.10   Oct 30 2006 15:50:32   yaniv.iarovici
 * Change version to EQA10.
 * 
 *    Rev 1.78.2.9   Oct 29 2006 14:24:12   Yaniv.Iarovici
 * Change version to EQA9.
 * 
 *    Rev 1.78.2.8   Oct 29 2006 10:59:50   Yaniv.Iarovici
 * Change version to EQA8.
 * 
 *    Rev 1.78.2.7   Oct 25 2006 09:10:34   Yaniv.Iarovici
 * Change version to EQA7
 * 
 *    Rev 1.78.2.6   Oct 23 2006 11:29:20   yaniv.iarovici
 * Change EQA to 6
 * 
 *    Rev 1.78.2.5   Oct 09 2006 14:05:24   yaniv.iarovici
 * Removed legacy devices related code and definitions
 * 
 *    Rev 1.78.2.4   Oct 05 2006 11:48:12   yaniv.iarovici
 * Change version to 'DOC Driver 1.0, EQA4, RC1'
 * 
 *    Rev 1.78.2.3   Sep 13 2006 10:44:22   yaniv.iarovici
 * Update version to EQA3 Alpha2
 * 
 *    Rev 1.78.1.6   Sep 11 2006 13:45:20   yaniv.iarovici
 * Legal header added
 * 
 *    Rev 1.78.1.5   Sep 10 2006 10:04:00   Yaniv.Iarovici
 * Update version number - DOC Driver 1.0 EQA1 Alpha2.
 * 
 *    Rev 1.78.1.4   Sep 03 2006 14:44:50   Yaniv.Iarovici
 * 1. Define flReadEvenNumberOfBytes() instead of flRead512Bytes() to support DRQ>1
 * 2. Define flWriteEvenNumberOfBytes() instead of flWrite512Bytes() to support DRQ>1
 * 
 *    Rev 1.78.1.3   Aug 22 2006 13:24:40   Yaniv.Iarovici
 * Change FL_MAX_TL_PARTITIONS default to '14'
 * 
 *    Rev 1.78.1.2   Aug 16 2006 08:46:36   Yaniv.Iarovici
 * 1) Change 7.0.0.0 to 1.0.0.0
 * 2) Change TrueFFSVersion value to "1020"
 * 3) If FL_DOC_ADDRESS is NOT defined and FL_LOW_DOC_ADDRESS defined, set '#define FL_DOC_ADDRESS FL_LOW_DOC_ADDRESS'.
 * 
 *    Rev 1.78.1.0   Aug 08 2006 15:55:30   Polina.Marimont
 * DOC Driver 1.0 initial
 */

/************************/
/* TrueFFS source files */
/* -------------------- */
/************************/

/*****************************************************************************
* File Header                                                                *
* -----------                                                                *
* Name : flchkdef.h                                                          *
*                                                                            *
* Description : Sanity check for flcustom.h files.                           *
*                                                                            *
*****************************************************************************/

#ifndef _FL_CHK_DEFS_H_
#define _FL_CHK_DEFS_H_

#include "flcustom.h"
#include "flsystem.h"

#define FL_MIGRATION_VERSION

#define FL_NEW_MAPSECTOR

#ifndef MTD_STANDALONE 

/* TrueFFS version
 *
 * Number written on the flash by INFTL format specifying the TrueFFS version
 * The media was formated with. the number bellow specifies version
 * 1.0.0.0
 */

#define TrueFFSVersion "1000"

/* Tracking number for TrueFFS configuration managment
 *
 * Number for configuration management of special purpose versions
 */

#define TrueFFS_EQA_Version   18
#define TrueFFS_RC_Version    2
#define TrueFFS_PATCH_Version 0
#define TrueFFS_Alpha_Version 0
#define TrueFFS_Beta_Version  0


/* Programmer type version 
 * 
 * This string is placed in the media header indicating the programmer
 * Name and version used to format the media 
 */

#ifndef FL_PROGRAMMER_NAME
#define FL_PROGRAMMER_NAME    "CORE"
#endif /* FL_PROGRAMMER_NAME */

#ifndef FL_PROGRAMMER_VERSION
#define FL_PROGRAMMER_VERSION "0000"
#endif /* FL_PROGRAMMER_VERSION */

/********************************************************************/
/* Device base address (Use previous versions definition if exits	*/
/* and FL_DOC_ADDRESS does not exist.								*/
/********************************************************************/
#if !defined(FL_DOC_ADDRESS) && defined(FL_LOW_DOC_ADDRESS)
#define FL_DOC_ADDRESS FL_LOW_DOC_ADDRESS
#endif

/*******************************************/
/* Validity check and overlapping defines  */
/*******************************************/

#if !defined(FL_READ_ONLY) && !defined(FS_READ_ONLY) && defined(READ_ONLY)
#define FL_READ_ONLY
#define FS_READ_ONLY
#endif

/* The format option needs some internal defintions */
#if !defined(FL_FORMAT_VOLUME) && defined(FORMAT_VOLUME)
#define FL_FORMAT_VOLUME
#endif 

#if (defined(FL_FORMAT_VOLUME) && defined(FL_READ_ONLY))
#error "You can not define FL_READ_ONLY and FL_FORMAT_VOLUME at the same time"
#endif /* (defined(FL_FORMAT_VOLUME) && defined(FL_READ_ONLY)) */

#if (defined(FS_FORMAT_VOLUME) && defined(FS_READ_ONLY))
#error "You can not define FS_READ_ONLY and FS_FORMAT_VOLUME at the same time"
#endif /* (defined(FS_FORMAT_VOLUME) && defined(FS_READ_ONLY)) */

#if (defined(FS_CREATE_LOGICAL_PARTITIONS) && defined(FS_READ_ONLY))
#error "You can not define FS_READ_ONLY and FS_CREATE_LOGICAL_PARTITIONS"
#endif 

/* VERIFY_ERASED_SECTOR should always come together with FL_VERIFY_WRITE */

#if !defined(FL_VERIFY_WRITE) && defined(VERIFY_WRITE)
#define FL_VERIFY_WRITE
#endif

#if defined (FL_VERIFY_WRITE) && !defined (VERIFY_ERASED_SECTOR)
#define VERIFY_ERASED_SECTOR
#endif 
#if !defined (FL_VERIFY_WRITE) && defined (VERIFY_ERASED_SECTOR)
#define FL_VERIFY_WRITE
#endif 

/* In case FL_READ_ONLY is defined FS_READ_ONLY needs to be defined as well */
#ifdef FL_READ_ONLY
#ifndef FS_READ_ONLY
#define FS_RED_ONLY
#endif /* FS_READ_ONLY */
#endif /* FL_READ_ONLY */

/* Validity check for system files MACROES */
#ifndef FL_FOPEN
#define FL_FOPEN
#endif /* FL_FOPEN */
#ifndef FL_FCLOSE
#define FL_FCLOSE
#endif /* FL_FCLOSE */
#ifndef FL_FPRINTF
#define FL_FPRINTF
#endif /* FL_FPRINTF */


/* Number of file system - logical partitions
 *
 * Defines Maximum Number of logical partitons on a BDTL partition
 *
 * The actual number of partitions depends on the format placed on each device.
 */

#ifndef FS_MAX_LOGICAL_PARTITIONS
#define FS_MAX_LOGICAL_PARTITIONS	4	/* per TL partition. There is no hard limit */
#endif /* FS_MAX_LOGICAL_PARTITIONS */


/* Validity check of FL_VOLUMES and FL_SOCKETS parameters. */

#if !defined(FL_VOLUMES) && defined(VOLUMES)
#define FL_VOLUMES VOLUMES
#endif

#if !defined(FS_VOLUMES) && defined(FL_VOLUMES)
#define FS_VOLUMES FL_VOLUMES
#endif

#if !defined(FL_SOCKETS) && defined(SOCKETS)
#define FL_SOCKETS SOCKETS
#endif

#if !defined(FS_SOCKETS) && defined(FL_SOCKETS)
#define FS_SOCKETS FL_SOCKETS
#endif


#if !defined(FL_VOLUMES) && defined(FL_SOCKETS)
#define FL_VOLUMES FL_SOCKETS
#endif /* SOCKETS && ! VOLUMES */

#if !defined(FS_VOLUMES) && defined(FS_SOCKETS)
#define FS_VOLUMES FS_SOCKETS
#endif /* SOCKETS && ! VOLUMES */

#if !defined(FL_SOCKETS) && defined(FL_VOLUMES)
#define FL_SOCKETS FL_VOLUMES
#endif /* ! SOCKETS && VOLUMES */

#if !defined(FS_SOCKETS) && defined(FS_VOLUMES)
#define FS_SOCKETS FS_VOLUMES
#endif /* ! SOCKETS && VOLUMES */

#if (FL_SOCKETS > FL_VOLUMES) || (FS_SOCKETS > FS_VOLUMES)
#error "SOCKETS should not be bigger then VOLUMES"
#endif /* SOCKETS > VOLUMES */

/* The POLLING_INTERVAL definition is not really relevant to DiskOnChip
 * Starting from TrueFFS 6.1 it was removed from flcustom.h, but TrueFFS
 * still support this functionality.
 */
#ifndef POLLING_INTERVAL
#define POLLING_INTERVAL 0
#endif /* POLLING_INTERVAL */

/* TrueFFS 5.2 used the FL_QUICK_MOUNT_INFO_EXIST defintion. TrueFFS 6.1
 * uses simple FL_ON and FL_OFF instead.
 */

#define FL_QUICK_MOUNT_INFO_EXIST				FL_ON

/* Starting from TrueFFS 6.1 this flag does not reduce code and therfore was
 * added as a default.
 *
 */

#define FL_LOW_LEVEL

/* Some S/W modules like boot SDK do not need the read bad blocks tables routine.
 * However for TrueFFS these defintion is vital
 */

/* 12-bit FAT support
 *
 * Comment the following line if you do not need support for DOS media with
 * 12-bit FAT (typically media of 8 MBytes or less).
 */

#define FS_FAT_12BIT


#define MTD_READ_BBT        /* Compile the read BBT routine code         */

#else  /* MTD_STANDALONE */

#ifndef NO_READ_BBT_CODE

/* When compiled in the BDK mode, the read BBT code will be compiled unless
 * NO_READ_BBT_CODE was defined.
 */
#define MTD_READ_BBT        /* Compile the read BBT routine code         */

#endif /* NO_READ_BBT_CODE */

#ifndef FL_SOCKETS
#define FL_SOCKETS            1 /* The only available number */
#endif
#define FIXED_MEDIA
#define DO_NOT_YIELD_CPU

#endif /* MTD_STANDALONE */


/* Number of translation layer partitions
 *
 * Defines Maximum Number of Translation layer partitions on a physical device
 *
 * The actual number of partitions depends on the format placed on each device.
 */

#ifndef FL_MAX_TL_PARTITIONS
#define FL_MAX_TL_PARTITIONS 14
#endif /* FL_MAX_TL_PARTITIONS */

/* The Maximum number of partitions is limited to 8 due to SAFTL buffers  */
 
#if (FL_MAX_TL_PARTITIONS > 14)
#error "Can not define more then 14 partitions\r\n"
#endif /* (FL_MAX_TL_PARTITIONS > 8) */


/* Max Number of binary partitions */
#ifndef MAX_BINARY_PARTITIONS_PER_DRIVE
#define MAX_BINARY_PARTITIONS_PER_DRIVE 3  
#endif /* MAX_BINARY_PARTITIONS_PER_DRIVE */

/* There can not be more binary partition, then total supported partitions */
#if (MAX_BINARY_PARTITIONS_PER_DRIVE >= FL_MAX_TL_PARTITIONS)
#error "MAX_BINARY_PARTITIONS_PER_DRIVE must be smaller then FL_MAX_TL_PARTITIONS\r\n"
#endif /* (MAX_BINARY_PARTITIONS_PER_DRIVE >= FL_MAX_TL_PARTITIONS) */

/* Default file system TL partitions */
#if !defined(FS_MAX_TL_PARTITIONS) && defined(FL_MAX_TL_PARTITIONS)
#define FS_MAX_TL_PARTITIONS	FL_MAX_TL_PARTITIONS
#endif
 
/* The TLS and MTDS constants where changed in TrueFFS 6.2 to a
 * more generic name : FL_TLS and FL_MTDS
 */

#ifndef FL_TLS
#define FL_TLS TLS
#endif /* FL_TLS */
#ifndef FL_MTDS
#define FL_MTDS MTDS
#endif /* FL_MTDS */

/* Make sure that the CHARSIZE is well defined */ 
#ifndef CHARSIZE 
#define CHARSIZE        8  /*The default char size is 8*/ 
#endif 

/* Make sure flPack and flspread are well defined */
#if (CHARSIZE == 8)
#ifndef flspread
#define flspread(source,length)
#endif /* flspread */

#ifndef flpack
#define flpack(source,length)
#endif /* flpack */
#endif /* (CHARSIZE == 8) */

/* Make sure FL2BYTE is well defined */
#ifndef FL2BYTE
#if (CHARSIZE == 8)
#define FL2BYTE(var) ((FLByte)(var))
#else
#define FL2BYTE(var) ((FLByte)((var) & 0x00FF))
#endif /* (CHARSIZE == 8) */
#endif /* FL2BYTE */


#ifndef FL_PACKED_STRUCTURES_BEFORE
#define FL_PACKED_STRUCTURES_BEFORE
#endif /* FL_PACKED_STRUCTURES_BEFORE */

#ifndef FL_PACKED_STRUCTURES_AFTER
#ifdef FL_PACKED_STRUCTURES
#define FL_PACKED_STRUCTURES_AFTER FL_PACKED_STRUCTURES
#else
#define FL_PACKED_STRUCTURES_AFTER
#endif /* FL_PACKED_STRUCTURES */
#endif /* FL_PACKED_STRUCTURES_AFTER */

/* Starting from TrueFFS version 6.x the ASSUMED_NFTL_UNIT_SIZE was changed to
 * FL_ASSUMED_MIN_UNIT_SIZE. 
 */

#ifndef FL_ASSUMED_MIN_UNIT_SIZE
#define FL_ASSUMED_MIN_UNIT_SIZE        ASSUMED_NFTL_UNIT_SIZE
#endif /* FL_ASSUMED_MIN_UNIT_SIZE */

/* Starting from TrueFFS version 6.x the MAX_VOLUME_MBYTES was changed to
 * FL_ASSUMED_MAX_VOLUME_MBYTES. 
 */

#ifndef FL_ASSUMED_MAX_VOLUME_MBYTES
#ifdef MAX_VOLUME_MBYTES
#define FL_ASSUMED_MAX_VOLUME_MBYTES        MAX_VOLUME_MBYTES
#else

/* TrueFFS sets the sector size according to this definitions. As a result customers 
   that do not customize this definition will be limited to a very small media (32MB)
   without even knowing it.
 */

#define FL_ASSUMED_MAX_VOLUME_MBYTES        64
#endif /* MAX_VOLUME_MBYTES */
#endif /* FL_ASSUMED_MAX_VOLUME_MBYTES */

⌨️ 快捷键说明

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