~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/mtd/ftl.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * Derived from (and probably identical to):
  3  * ftl.h 1.7 1999/10/25 20:23:17
  4  *
  5  * The contents of this file are subject to the Mozilla Public License
  6  * Version 1.1 (the "License"); you may not use this file except in
  7  * compliance with the License. You may obtain a copy of the License
  8  * at http://www.mozilla.org/MPL/
  9  *
 10  * Software distributed under the License is distributed on an "AS IS"
 11  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 12  * the License for the specific language governing rights and
 13  * limitations under the License.
 14  *
 15  * The initial developer of the original code is David A. Hinds
 16  * <dahinds@users.sourceforge.net>.  Portions created by David A. Hinds
 17  * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
 18  *
 19  * Alternatively, the contents of this file may be used under the
 20  * terms of the GNU General Public License version 2 (the "GPL"), in
 21  * which case the provisions of the GPL are applicable instead of the
 22  * above.  If you wish to allow the use of your version of this file
 23  * only under the terms of the GPL and not to allow others to use
 24  * your version of this file under the MPL, indicate your decision by
 25  * deleting the provisions above and replace them with the notice and
 26  * other provisions required by the GPL.  If you do not delete the
 27  * provisions above, a recipient may use your version of this file
 28  * under either the MPL or the GPL.
 29  */
 30 
 31 #ifndef _LINUX_FTL_H
 32 #define _LINUX_FTL_H
 33 
 34 typedef struct erase_unit_header_t {
 35     uint8_t     LinkTargetTuple[5];
 36     uint8_t     DataOrgTuple[10];
 37     uint8_t     NumTransferUnits;
 38     uint32_t    EraseCount;
 39     uint16_t    LogicalEUN;
 40     uint8_t     BlockSize;
 41     uint8_t     EraseUnitSize;
 42     uint16_t    FirstPhysicalEUN;
 43     uint16_t    NumEraseUnits;
 44     uint32_t    FormattedSize;
 45     uint32_t    FirstVMAddress;
 46     uint16_t    NumVMPages;
 47     uint8_t     Flags;
 48     uint8_t     Code;
 49     uint32_t    SerialNumber;
 50     uint32_t    AltEUHOffset;
 51     uint32_t    BAMOffset;
 52     uint8_t     Reserved[12];
 53     uint8_t     EndTuple[2];
 54 } erase_unit_header_t;
 55 
 56 /* Flags in erase_unit_header_t */
 57 #define HIDDEN_AREA             0x01
 58 #define REVERSE_POLARITY        0x02
 59 #define DOUBLE_BAI              0x04
 60 
 61 /* Definitions for block allocation information */
 62 
 63 #define BLOCK_FREE(b)           ((b) == 0xffffffff)
 64 #define BLOCK_DELETED(b)        (((b) == 0) || ((b) == 0xfffffffe))
 65 
 66 #define BLOCK_TYPE(b)           ((b) & 0x7f)
 67 #define BLOCK_ADDRESS(b)        ((b) & ~0x7f)
 68 #define BLOCK_NUMBER(b)         ((b) >> 9)
 69 #define BLOCK_CONTROL           0x30
 70 #define BLOCK_DATA              0x40
 71 #define BLOCK_REPLACEMENT       0x60
 72 #define BLOCK_BAD               0x70
 73 
 74 #endif /* _LINUX_FTL_H */
 75 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php