Back to home page

OSCL-LXR

 
 

    


0001 What:           /sys/class/mtd/
0002 Date:           April 2009
0003 KernelVersion:  2.6.29
0004 Contact:        linux-mtd@lists.infradead.org
0005 Description:
0006                 The mtd/ class subdirectory belongs to the MTD subsystem
0007                 (MTD core).
0008 
0009 What:           /sys/class/mtd/mtdX/
0010 Date:           April 2009
0011 KernelVersion:  2.6.29
0012 Contact:        linux-mtd@lists.infradead.org
0013 Description:
0014                 The /sys/class/mtd/mtd{0,1,2,3,...} directories correspond
0015                 to each /dev/mtdX character device.  These may represent
0016                 physical/simulated flash devices, partitions on a flash
0017                 device, or concatenated flash devices.
0018 
0019 What:           /sys/class/mtd/mtdXro/
0020 Date:           April 2009
0021 KernelVersion:  2.6.29
0022 Contact:        linux-mtd@lists.infradead.org
0023 Description:
0024                 These directories provide the corresponding read-only device
0025                 nodes for /sys/class/mtd/mtdX/ .
0026 
0027 What:           /sys/class/mtd/mtdX/dev
0028 Date:           April 2009
0029 KernelVersion:  2.6.29
0030 Contact:        linux-mtd@lists.infradead.org
0031 Description:
0032                 Major and minor numbers of the character device corresponding
0033                 to this MTD device (in <major>:<minor> format).  This is the
0034                 read-write device so <minor> will be even.
0035 
0036 What:           /sys/class/mtd/mtdXro/dev
0037 Date:           April 2009
0038 KernelVersion:  2.6.29
0039 Contact:        linux-mtd@lists.infradead.org
0040 Description:
0041                 Major and minor numbers of the character device corresponding
0042                 to the read-only variant of thie MTD device (in
0043                 <major>:<minor> format).  In this case <minor> will be odd.
0044 
0045 What:           /sys/class/mtd/mtdX/erasesize
0046 Date:           April 2009
0047 KernelVersion:  2.6.29
0048 Contact:        linux-mtd@lists.infradead.org
0049 Description:
0050                 "Major" erase size for the device.  If numeraseregions is
0051                 zero, this is the eraseblock size for the entire device.
0052                 Otherwise, the MEMGETREGIONCOUNT/MEMGETREGIONINFO ioctls
0053                 can be used to determine the actual eraseblock layout.
0054 
0055 What:           /sys/class/mtd/mtdX/flags
0056 Date:           April 2009
0057 KernelVersion:  2.6.29
0058 Contact:        linux-mtd@lists.infradead.org
0059 Description:
0060                 A hexadecimal value representing the device flags, ORed
0061                 together:
0062 
0063                 0x0400: MTD_WRITEABLE - device is writable
0064                 0x0800: MTD_BIT_WRITEABLE - single bits can be flipped
0065                 0x1000: MTD_NO_ERASE - no erase necessary
0066                 0x2000: MTD_POWERUP_LOCK - always locked after reset
0067 
0068 What:           /sys/class/mtd/mtdX/name
0069 Date:           April 2009
0070 KernelVersion:  2.6.29
0071 Contact:        linux-mtd@lists.infradead.org
0072 Description:
0073                 A human-readable ASCII name for the device or partition.
0074                 This will match the name in /proc/mtd .
0075 
0076 What:           /sys/class/mtd/mtdX/numeraseregions
0077 Date:           April 2009
0078 KernelVersion:  2.6.29
0079 Contact:        linux-mtd@lists.infradead.org
0080 Description:
0081                 For devices that have variable eraseblock sizes, this
0082                 provides the total number of erase regions.  Otherwise,
0083                 it will read back as zero.
0084 
0085 What:           /sys/class/mtd/mtdX/oobsize
0086 Date:           April 2009
0087 KernelVersion:  2.6.29
0088 Contact:        linux-mtd@lists.infradead.org
0089 Description:
0090                 Number of OOB bytes per page.
0091 
0092 What:           /sys/class/mtd/mtdX/size
0093 Date:           April 2009
0094 KernelVersion:  2.6.29
0095 Contact:        linux-mtd@lists.infradead.org
0096 Description:
0097                 Total size of the device/partition, in bytes.
0098 
0099 What:           /sys/class/mtd/mtdX/type
0100 Date:           April 2009
0101 KernelVersion:  2.6.29
0102 Contact:        linux-mtd@lists.infradead.org
0103 Description:
0104                 One of the following ASCII strings, representing the device
0105                 type:
0106 
0107                 absent, ram, rom, nor, nand, mlc-nand, dataflash, ubi, unknown
0108 
0109 What:           /sys/class/mtd/mtdX/writesize
0110 Date:           April 2009
0111 KernelVersion:  2.6.29
0112 Contact:        linux-mtd@lists.infradead.org
0113 Description:
0114                 Minimal writable flash unit size.  This will always be
0115                 a positive integer.
0116 
0117                 In the case of NOR flash it is 1 (even though individual
0118                 bits can be cleared).
0119 
0120                 In the case of NAND flash it is one NAND page (or a
0121                 half page, or a quarter page).
0122 
0123                 In the case of ECC NOR, it is the ECC block size.
0124 
0125 What:           /sys/class/mtd/mtdX/ecc_strength
0126 Date:           April 2012
0127 KernelVersion:  3.4
0128 Contact:        linux-mtd@lists.infradead.org
0129 Description:
0130                 Maximum number of bit errors that the device is capable of
0131                 correcting within each region covering an ECC step (see
0132                 ecc_step_size).  This will always be a non-negative integer.
0133 
0134                 In the case of devices lacking any ECC capability, it is 0.
0135 
0136 What:           /sys/class/mtd/mtdX/bitflip_threshold
0137 Date:           April 2012
0138 KernelVersion:  3.4
0139 Contact:        linux-mtd@lists.infradead.org
0140 Description:
0141                 This allows the user to examine and adjust the criteria by which
0142                 mtd returns -EUCLEAN from mtd_read() and mtd_read_oob().  If the
0143                 maximum number of bit errors that were corrected on any single
0144                 region comprising an ecc step (as reported by the driver) equals
0145                 or exceeds this value, -EUCLEAN is returned.  Otherwise, absent
0146                 an error, 0 is returned.  Higher layers (e.g., UBI) use this
0147                 return code as an indication that an erase block may be
0148                 degrading and should be scrutinized as a candidate for being
0149                 marked as bad.
0150 
0151                 The initial value may be specified by the flash device driver.
0152                 If not, then the default value is ecc_strength.
0153 
0154                 The introduction of this feature brings a subtle change to the
0155                 meaning of the -EUCLEAN return code.  Previously, it was
0156                 interpreted to mean simply "one or more bit errors were
0157                 corrected".  Its new interpretation can be phrased as "a
0158                 dangerously high number of bit errors were corrected on one or
0159                 more regions comprising an ecc step".  The precise definition of
0160                 "dangerously high" can be adjusted by the user with
0161                 bitflip_threshold.  Users are discouraged from doing this,
0162                 however, unless they know what they are doing and have intimate
0163                 knowledge of the properties of their device.  Broadly speaking,
0164                 bitflip_threshold should be low enough to detect genuine erase
0165                 block degradation, but high enough to avoid the consequences of
0166                 a persistent return value of -EUCLEAN on devices where sticky
0167                 bitflips occur.  Note that if bitflip_threshold exceeds
0168                 ecc_strength, -EUCLEAN is never returned by the read operations.
0169                 Conversely, if bitflip_threshold is zero, -EUCLEAN is always
0170                 returned, absent a hard error.
0171 
0172                 This is generally applicable only to NAND flash devices with ECC
0173                 capability.  It is ignored on devices lacking ECC capability;
0174                 i.e., devices for which ecc_strength is zero.
0175 
0176 What:           /sys/class/mtd/mtdX/ecc_step_size
0177 Date:           May 2013
0178 KernelVersion:  3.10
0179 Contact:        linux-mtd@lists.infradead.org
0180 Description:
0181                 The size of a single region covered by ECC, known as the ECC
0182                 step.  Devices may have several equally sized ECC steps within
0183                 each writesize region.
0184 
0185                 It will always be a non-negative integer.  In the case of
0186                 devices lacking any ECC capability, it is 0.
0187 
0188 What:           /sys/class/mtd/mtdX/ecc_failures
0189 Date:           June 2014
0190 KernelVersion:  3.17
0191 Contact:        linux-mtd@lists.infradead.org
0192 Description:
0193                 The number of failures reported by this device's ECC. Typically,
0194                 these failures are associated with failed read operations.
0195 
0196                 It will always be a non-negative integer.  In the case of
0197                 devices lacking any ECC capability, it is 0.
0198 
0199 What:           /sys/class/mtd/mtdX/corrected_bits
0200 Date:           June 2014
0201 KernelVersion:  3.17
0202 Contact:        linux-mtd@lists.infradead.org
0203 Description:
0204                 The number of bits that have been corrected by means of the
0205                 device's ECC.
0206 
0207                 It will always be a non-negative integer.  In the case of
0208                 devices lacking any ECC capability, it is 0.
0209 
0210 What:           /sys/class/mtd/mtdX/bad_blocks
0211 Date:           June 2014
0212 KernelVersion:  3.17
0213 Contact:        linux-mtd@lists.infradead.org
0214 Description:
0215                 The number of blocks marked as bad, if any, in this partition.
0216 
0217 What:           /sys/class/mtd/mtdX/bbt_blocks
0218 Date:           June 2014
0219 KernelVersion:  3.17
0220 Contact:        linux-mtd@lists.infradead.org
0221 Description:
0222                 The number of blocks that are marked as reserved, if any, in
0223                 this partition. These are typically used to store the in-flash
0224                 bad block table (BBT).
0225 
0226 What:           /sys/class/mtd/mtdX/offset
0227 Date:           March 2015
0228 KernelVersion:  4.1
0229 Contact:        linux-mtd@lists.infradead.org
0230 Description:
0231                 For a partition, the offset of that partition from the start
0232                 of the parent (another partition or a flash device) in bytes.
0233                 This attribute is absent on flash devices, so it can be used
0234                 to distinguish them from partitions.
0235 
0236 What:           /sys/class/mtd/mtdX/oobavail
0237 Date:           April 2018
0238 KernelVersion:  4.16
0239 Contact:        linux-mtd@lists.infradead.org
0240 Description:
0241                 Number of bytes available for a client to place data into
0242                 the out of band area.