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

📄 flioctl.h

📁 H3 M-system NAND flash driver in Linux OS, M-DOC driver
💻 H
📖 第 1 页 / 共 2 页
字号:
/****************************************************************************** *                                                                            * * 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/flioctl.h-arc  $
 * 
 *    Rev 1.14.1.1   Oct 29 2006 14:23:46   Yaniv.Iarovici
 * Update 'FL_IOCTL_PASS_THROUGH' structures.
 * 
 *    Rev 1.14.1.0   Oct 22 2006 14:53:58   yaniv.iarovici
 * Changed protectionType from FLByte to FLWord in flProtectionOutput stucture.
 * 
 *    Rev 1.14   Oct 09 2006 14:05:38   yaniv.iarovici
 * Removed #ifndef FL_DO_NOT_SUPPORT_H3
 * 
 *    Rev 1.13   Oct 05 2006 11:01:06   yaniv.iarovici
 * Fixed support for FL_IOCTL_PASS_THROUGH.
 * 
 *    Rev 1.12   Sep 11 2006 13:45:22   yaniv.iarovici
 * Legal header added
 * 
 *    Rev 1.11   Aug 16 2006 08:47:20   Yaniv.Iarovici
 * Encapsulate BDK related defines under '#ifdef BDK_ACCESS'.
 * 
 *    Rev 1.9   Aug 09 2006 16:52:50   Polina.Marimont
 * initial for DOC Driver 1.0
 */

#ifndef FLIOCTL_H
#define FLIOCTL_H

#include "flsystem.h"
#include "flstruct.h"
#include "_dochapi.h"


/* In every call to flIOctl function, the irFlags field in the structure
IOreq should hold one of the following: */
typedef enum{FL_IOCTL_GET_INFO = FL_IOCTL_START,
  FL_IOCTL_DEFRAGMENT,
  FL_IOCTL_NO_LONGER_SUPPORTED_0,	/* FL_IOCTL_WRITE_PROTECT             */
  FL_IOCTL_MOUNT_VOLUME,
  FL_IOCTL_NO_LONGER_SUPPORTED_1,	/* FL_IOCTL_FORMAT_VOLUME             */
#ifdef BDK_ACCESS
  FL_IOCTL_BDK_OPERATION,
#else /*BDK_ACCESS*/
  FL_IOCTL_RESERVED1,
#endif /*BDK_ACCESS*/
  FL_IOCTL_DELETE_SECTORS,
  FL_IOCTL_READ_SECTORS,
  FL_IOCTL_WRITE_SECTORS,
  FL_IOCTL_NO_LONGER_SUPPORTED_2,	/* FL_IOCTL_FORMAT_PHYSICAL_DRIVE     */
  FL_IOCTL_NO_LONGER_SUPPORTED_3,	/* FL_IOCTL_FORMAT_LOGICAL_DRIVE      */
  FL_IOCTL_BDTL_HW_PROTECTION,
#ifdef BDK_ACCESS
  FL_IOCTL_BINARY_HW_PROTECTION,
#else /*BDK_ACCESS*/
  FL_IOCTL_RESERVED2,
#endif /*BDK_ACCESS*/
  FL_IOCTL_OTP,
  FL_IOCTL_CUSTOMER_ID,
  FL_IOCTL_UNIQUE_ID,
  FL_IOCTL_NUMBER_OF_PARTITIONS,
  FL_IOCTL_NO_LONGER_SUPPORTED_4,	/* FL_IOCTL_INQUIRE_CAPABILITIES      */ 
  FL_IOCTL_NO_LONGER_SUPPORTED_5,	/* FL_IOCTL_SET_ENVIRONMENT_VARIABLES */
  FL_IOCTL_NO_LONGER_SUPPORTED_6,	/* FL_IOCTL_PLACE_EXB_BY_BUFFER       */
  FL_IOCTL_NO_LONGER_SUPPORTED_7,	/* FL_IOCTL_WRITE_IPL                 */
  FL_IOCTL_DEEP_POWER_DOWN_MODE,
  FL_IOCTL_EXTENDED_ENVIRONMENT_VARIABLES, 
  FL_IOCTL_VERIFY_VOLUME,	 
  FL_IOCTL_SET_ACCESS_ROUTINE,
  FL_IOCTL_GET_ACCESS_ROUTINE,
  FL_IOCTL_NO_LONGER_SUPPORTED_8,	/* FL_IOCTL_EXTENDED_WRITE_IPL        */  
  FL_IOCTL_NO_LONGER_SUPPORTED_9,	/* FL_IOCTL_OPEN_TRANSACTION          */
  FL_IOCTL_NO_LONGER_SUPPORTED_10,	/* FL_IOCTL_COMMIT_TRANSACTION        */
  FL_IOCTL_NO_LONGER_SUPPORTED_11,	/* FL_IOCTL_IS_VOLUME_RUGGEDIZED      */
  FL_IOCTL_IS_QUICK_MOUNT_VALID,      
  FL_IOCTL_WRITE_QUICK_MOUNT_INFO,
  FL_IOCTL_CLEAR_QUICK_MOUNT_INFO,
  FL_IOCTL_NO_LONGER_SUPPORTED_12,	/* FL_IOCTL_COMPLETE_OPERATION        */
  FL_IOCTL_FLASH_FORMAT, /* Replacing FL_IOCTL_FORMAT_PHYSICAL_DRIVE       */
  FL_IOCTL_ERASE_BD,                  /* Added in TrueFFS 6.3.0            */
  FL_IOCTL_FLASH_UNFORMAT,            /* Added in TrueFFS 6.3.0            */
  FL_IOCTL_WRITE_IPL,                 /* Changed in TrueFFS 6.3.0          */
  FL_IOCTL_MCOTP,
  FL_IOCTL_PASS_THROUGH,
  FL_IOCTL_IPL_HW_PROTECTION
} flIOctlFunctionNo;


/* In every call to flIOctl function, the irData field in the structure
IOreq should point to the structure defined below. The fields
inputRecord and outputRecord should point to structures which are
specific to each IOctl function as defined in this file. */
typedef struct {
	void FAR1 *inputRecord;
	void FAR1 *outputRecord;
} flIOctlRecord;


/* General output record that returns only status. */
typedef struct {
	FLStatus status;
} flOutputStatusRecord;

#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */

TFFS_DLL_API FLStatus NAMING_CONVENTION bdIOctl(IOreq FAR2 *);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#ifndef flIOctl
#define flIOctl bdIOctl
#endif


/* Input and output records for the different IOCTL functions: */
/* =========================================================== */


/*************************************************************************/
/* Get disk information (FL_IOCTL_GET_INFO) */
/* Input record: NULL */
/* Output record: */
typedef struct 
{
    VolumeInfoRecord info;  
	FLStatus status;
} flDiskInfoOutput;
/* Output record: flOutputStatusRecord */

/*************************************************************************/
/* Defragment volume (FL_IOCTL_DEFRAGMENT) */
/* Input record: */
typedef struct {
	FLSDword requiredNoOfSectors;   /* Minimum number of sectors to make */
	/* available.                        */ 
} flDefragInput;
/* Outout record: */
typedef struct {
	FLSDword actualNoOfSectors;     /* Actual number of sectors available */
	FLStatus status;
} flDefragOutput;

/*************************************************************************/
/* Mount volume (FL_IOCTL_MOUNT_VOLUME) */
/* Input record: */
typedef struct {
	FLByte  type;        /*  type of operation: FL_MOUNT\FL_DISMOUNT */
} flMountInput;
#define FL_MOUNT          0
#define FL_DISMOUNT        1
/* Output record: flOutputStatusRecord */

/*************************************************************************/
/* Delete logical sectors (FL_IOCTL_DELETE_SECTORS) */
/* Input record: */
typedef struct {
	FLSDword firstSector;                /* First logical sector to delete */
	FLSDword numberOfSectors;                /* Number of sectors to delete */
} flDeleteSectorsInput;
/* Output record: flOutputStatusRecord */

/*************************************************************************/
/* Format flash device (FL_IOCTL_FLASH_FORMAT) */
/* Input record: */
typedef struct {
	FLDword dwFormatFlags;  /* type of format as defined in blockdev.h             */
	FLSDword sdwNoOfKeeps;
	FormatParams3 * fpPtr;     /* Format parameters structure (defined in flformat.h) */
} flFlashFormatInput;
/* Output record: flOutputStatusRecord */

/*************************************************************************/
/* Erase existing disk partition (FL_IOCTL_ERASE_BD) */
/* Input record: */
typedef struct {
	FLDword dwFlags;  /* Reserved - Must be set to 0 */
} flEraseBDInput;
/* Output record: flOutputStatusRecord */

/*************************************************************************/
/* Format flash device (FL_IOCTL_FLASH_UNFORMAT) */
/* Input record: */
typedef struct {
	FLDword dwFlags;  /* Reserved - Must be set to 0 */
} flFlashUnformatInput;
/* Output record: flOutputStatusRecord */

/*************************************************************************/
/* BDK and BDTL protection operations: (FL_IOCTL_BINARY_HW_PROTECTION) */
/*                                     (FL_IOCTL_BDTL_HW_PROTECTION)   */
/*   insert key \ remove key \ identify \ change key \                 */
/*   change protection type \ change lock status                       */
/* Input record: */
typedef struct {
    FLByte protectionType;            /* Protection attributes. The following        */
                                      /*attributes can be ored: PROTECTABLE,         */
                                      /*READ_PROTECTED, WRITE_PROTECTED, LOCK_ENABLED*/
                                      /*CHANGEABLE_PROTECTION, OTW_PROTECTED,        */
    FLByte key[8];                    /* The new key to the change Key call          */

⌨️ 快捷键说明

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