summaryrefslogtreecommitdiff
path: root/Documentation/ABI/testing/sysfs-class-mtd
blob: 4d55a18889813be097af27112b9e647031bf8fff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
What:		/sys/class/mtd/
Date:		April 2009
KernelVersion:	2.6.29
Contact:	linux-mtd@lists.infradead.org
Description:
		The mtd/ class subdirectory belongs to the MTD subsystem
		(MTD core).

What:		/sys/class/mtd/mtdX/
Date:		April 2009
KernelVersion:	2.6.29
Contact:	linux-mtd@lists.infradead.org
Description:
		The /sys/class/mtd/mtd{0,1,2,3,...} directories correspond
		to each /dev/mtdX character device.  These may represent
		physical/simulated flash devices, partitions on a flash
		device, or concatenated flash devices.  They exist regardless
		of whether CONFIG_MTD_CHAR is actually enabled.

What:		/sys/class/mtd/mtdXro/
Date:		April 2009
KernelVersion:	2.6.29
Contact:	linux-mtd@lists.infradead.org
Description:
		These directories provide the corresponding read-only device
		nodes for /sys/class/mtd/mtdX/ .  They are only created
		(for the benefit of udev) if CONFIG_MTD_CHAR is enabled.

What:		/sys/class/mtd/mtdX/dev
Date:		April 2009
KernelVersion:	2.6.29
Contact:	linux-mtd@lists.infradead.org
Description:
		Major and minor numbers of the character device corresponding
		to this MTD device (in <major>:<minor> format).  This is the
		read-write device so <minor> will be even.

What:		/sys/class/mtd/mtdXro/dev
Date:		April 2009
KernelVersion:	2.6.29
Contact:	linux-mtd@lists.infradead.org
Description:
		Major and minor numbers of the character device corresponding
		to the read-only variant of thie MTD device (in
		<major>:<minor> format).  In this case <minor> will be odd.

What:		/sys/class/mtd/mtdX/erasesize
Date:		April 2009
KernelVersion:	2.6.29
Contact:	linux-mtd@lists.infradead.org
Description:
		"Major" erase size for the device.  If numeraseregions is
		zero, this is the eraseblock size for the entire device.
		Otherwise, the MEMGETREGIONCOUNT/MEMGETREGIONINFO ioctls
		can be used to determine the actual eraseblock layout.

What:		/sys/class/mtd/mtdX/flags
Date:		April 2009
KernelVersion:	2.6.29
Contact:	linux-mtd@lists.infradead.org
Description:
		A hexadecimal value representing the device flags, ORed
		together:

		0x0400: MTD_WRITEABLE - device is writable
		0x0800: MTD_BIT_WRITEABLE - single bits can be flipped
		0x1000: MTD_NO_ERASE - no erase necessary
		0x2000: MTD_POWERUP_LOCK - always locked after reset

What:		/sys/class/mtd/mtdX/name
Date:		April 2009
KernelVersion:	2.6.29
Contact:	linux-mtd@lists.infradead.org
Description:
		A human-readable ASCII name for the device or partition.
		This will match the name in /proc/mtd .

What:		/sys/class/mtd/mtdX/numeraseregions
Date:		April 2009
KernelVersion:	2.6.29
Contact:	linux-mtd@lists.infradead.org
Description:
		For devices that have variable eraseblock sizes, this
		provides the total number of erase regions.  Otherwise,
		it will read back as zero.

What:		/sys/class/mtd/mtdX/oobsize
Date:		April 2009
KernelVersion:	2.6.29
Contact:	linux-mtd@lists.infradead.org
Description:
		Number of OOB bytes per page.

What:		/sys/class/mtd/mtdX/size
Date:		April 2009
KernelVersion:	2.6.29
Contact:	linux-mtd@lists.infradead.org
Description:
		Total size of the device/partition, in bytes.

What:		/sys/class/mtd/mtdX/type
Date:		April 2009
KernelVersion:	2.6.29
Contact:	linux-mtd@lists.infradead.org
Description:
		One of the following ASCII strings, representing the device
		type:

		absent, ram, rom, nor, nand, dataflash, ubi, unknown

What:		/sys/class/mtd/mtdX/writesize
Date:		April 2009
KernelVersion:	2.6.29
Contact:	linux-mtd@lists.infradead.org
Description:
		Minimal writable flash unit size.  This will always be
		a positive integer.

		In the case of NOR flash it is 1 (even though individual
		bits can be cleared).

		In the case of NAND flash it is one NAND page (or a
		half page, or a quarter page).

		In the case of ECC NOR, it is the ECC block size.