xref: /openbmc/linux/drivers/mtd/parsers/Kconfig (revision 4080d536)
1# SPDX-License-Identifier: GPL-2.0-only
2config MTD_AR7_PARTS
3	tristate "TI AR7 partitioning parser"
4	help
5	  TI AR7 partitioning parser support
6
7config MTD_BCM47XX_PARTS
8	tristate "BCM47XX partitioning parser"
9	depends on BCM47XX || ARCH_BCM_5301X
10	help
11	  This provides partitions parser for devices based on BCM47xx
12	  boards.
13
14config MTD_BCM63XX_PARTS
15	bool "BCM63XX CFE partitioning parser"
16	depends on BCM63XX || BMIPS_GENERIC || COMPILE_TEST
17	select CRC32
18	select MTD_PARSER_IMAGETAG
19	help
20	  This provides partition parsing for BCM63xx devices with CFE
21	  bootloaders.
22
23config MTD_BRCM_U_BOOT
24	tristate "Broadcom's U-Boot partition parser"
25	depends on ARCH_BCMBCA || COMPILE_TEST
26	help
27	  Broadcom uses a custom way of storing U-Boot environment variables.
28	  They are placed inside U-Boot partition itself at unspecified offset.
29	  It's possible to locate them by looking for a custom header with a
30	  magic value. This driver does that and creates subpartitions for
31	  each found environment variables block.
32
33config MTD_CMDLINE_PARTS
34	tristate "Command line partition table parsing"
35	depends on MTD
36	help
37	  Allow generic configuration of the MTD partition tables via the kernel
38	  command line. Multiple flash resources are supported for hardware where
39	  different kinds of flash memory are available.
40
41	  You will still need the parsing functions to be called by the driver
42	  for your particular device. It won't happen automatically. The
43	  SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for
44	  example.
45
46	  The format for the command line is as follows:
47
48	  mtdparts=<mtddef>[;<mtddef]
49	  <mtddef>  := <mtd-id>:<partdef>[,<partdef>]
50	  <partdef> := <size>[@offset][<name>][ro]
51	  <mtd-id>  := unique id used in mapping driver/device
52	  <size>    := standard linux memsize OR "-" to denote all
53	  remaining space
54	  <name>    := (NAME)
55
56	  Due to the way Linux handles the command line, no spaces are
57	  allowed in the partition definition, including mtd id's and partition
58	  names.
59
60	  Examples:
61
62	  1 flash resource (mtd-id "sa1100"), with 1 single writable partition:
63	  mtdparts=sa1100:-
64
65	  Same flash, but 2 named partitions, the first one being read-only:
66	  mtdparts=sa1100:256k(ARMboot)ro,-(root)
67
68	  If unsure, say 'N'.
69
70config MTD_OF_PARTS
71	tristate "OpenFirmware (device tree) partitioning parser"
72	default y
73	depends on OF
74	help
75	  This provides a open firmware device tree partition parser
76	  which derives the partition map from the children of the
77	  flash memory node, as described in
78	  Documentation/devicetree/bindings/mtd/mtd.yaml.
79
80config MTD_OF_PARTS_BCM4908
81	bool "BCM4908 partitioning support"
82	depends on MTD_OF_PARTS && (ARCH_BCMBCA || COMPILE_TEST)
83	default ARCH_BCMBCA
84	help
85	  This provides partitions parser for BCM4908 family devices
86	  that can have multiple "firmware" partitions. It takes care of
87	  finding currently used one and backup ones.
88
89config MTD_OF_PARTS_LINKSYS_NS
90	bool "Linksys Northstar partitioning support"
91	depends on MTD_OF_PARTS && (ARCH_BCM_5301X || ARCH_BCMBCA || COMPILE_TEST)
92	default ARCH_BCM_5301X
93	help
94	  This provides partitions parser for Linksys devices based on Broadcom
95	  Northstar architecture. Linksys commonly uses fixed flash layout with
96	  two "firmware" partitions. Currently used firmware has to be detected
97	  using CFE environment variable.
98
99config MTD_PARSER_IMAGETAG
100	tristate "Parser for BCM963XX Image Tag format partitions"
101	depends on BCM63XX || BMIPS_GENERIC || COMPILE_TEST
102	select CRC32
103	help
104	  Image Tag is the firmware header used by broadcom on their xDSL line
105	  of devices. It is used to describe the offsets and lengths of kernel
106	  and rootfs partitions.
107	  This driver adds support for parsing a partition with an Image Tag
108	  header and creates up to two partitions, kernel and rootfs.
109
110config MTD_AFS_PARTS
111	tristate "ARM Firmware Suite partition parsing"
112	depends on (ARM || ARM64)
113	help
114	  The ARM Firmware Suite allows the user to divide flash devices into
115	  multiple 'images'. Each such image has a header containing its name
116	  and offset/size etc.
117
118	  If you need code which can detect and parse these tables, and
119	  register MTD 'partitions' corresponding to each image detected,
120	  enable this option.
121
122	  You will still need the parsing functions to be called by the driver
123	  for your particular device. It won't happen automatically. The
124	  'physmap' map driver (CONFIG_MTD_PHYSMAP) does this, for example.
125
126config MTD_PARSER_TPLINK_SAFELOADER
127	tristate "TP-Link Safeloader partitions parser"
128	depends on MTD && (ARCH_BCM_5301X || ATH79 || SOC_MT7620 || SOC_MT7621 || COMPILE_TEST)
129	help
130	  TP-Link home routers use flash partitions to store various data. Info
131	  about flash space layout is stored in a partitions table using a
132	  custom ASCII-based format.
133
134	  That format was first found in devices with SafeLoader bootloader and
135	  was named after it. Later it was adapted to CFE and U-Boot
136	  bootloaders.
137
138	  This driver reads partitions table, parses it and creates MTD
139	  partitions.
140
141config MTD_PARSER_TRX
142	tristate "Parser for TRX format partitions"
143	depends on MTD && (BCM47XX || ARCH_BCM_5301X || ARCH_MEDIATEK || RALINK || COMPILE_TEST)
144	help
145	  TRX is a firmware format used by Broadcom on their devices. It
146	  may contain up to 3/4 partitions (depending on the version).
147	  This driver will parse TRX header and report at least two partitions:
148	  kernel and rootfs.
149
150config MTD_SHARPSL_PARTS
151	tristate "Sharp SL Series NAND flash partition parser"
152	depends on MTD_NAND_SHARPSL || COMPILE_TEST
153	help
154	  This provides the read-only FTL logic necessary to read the partition
155	  table from the NAND flash of Sharp SL Series (Zaurus) and the MTD
156	  partition parser using this code.
157
158config MTD_REDBOOT_PARTS
159	tristate "RedBoot partition table parsing"
160	help
161	  RedBoot is a ROM monitor and bootloader which deals with multiple
162	  'images' in flash devices by putting a table one of the erase
163	  blocks on the device, similar to a partition table, which gives
164	  the offsets, lengths and names of all the images stored in the
165	  flash.
166
167	  If you need code which can detect and parse this table, and register
168	  MTD 'partitions' corresponding to each image in the table, enable
169	  this option.
170
171	  You will still need the parsing functions to be called by the driver
172	  for your particular device. It won't happen automatically. The
173	  SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for
174	  example.
175
176if MTD_REDBOOT_PARTS
177
178config MTD_REDBOOT_DIRECTORY_BLOCK
179	int "Location of RedBoot partition table"
180	default "-1"
181	help
182	  This option is the Linux counterpart to the
183	  CYGNUM_REDBOOT_FIS_DIRECTORY_BLOCK RedBoot compile time
184	  option.
185
186	  The option specifies which Flash sectors holds the RedBoot
187	  partition table.  A zero or positive value gives an absolute
188	  erase block number. A negative value specifies a number of
189	  sectors before the end of the device.
190
191	  For example "2" means block number 2, "-1" means the last
192	  block and "-2" means the penultimate block.
193
194config MTD_REDBOOT_PARTS_UNALLOCATED
195	bool "Include unallocated flash regions"
196	help
197	  If you need to register each unallocated flash region as a MTD
198	  'partition', enable this option.
199
200config MTD_REDBOOT_PARTS_READONLY
201	bool "Force read-only for RedBoot system images"
202	help
203	  If you need to force read-only for 'RedBoot', 'RedBoot Config' and
204	  'FIS directory' images, enable this option.
205
206endif # MTD_REDBOOT_PARTS
207
208config MTD_QCOMSMEM_PARTS
209	tristate "Qualcomm SMEM flash partition parser"
210	depends on QCOM_SMEM
211	help
212	  This provides support for parsing partitions from Shared Memory (SMEM)
213	  for NAND and SPI flash on Qualcomm platforms.
214
215config MTD_SERCOMM_PARTS
216	tristate "Sercomm partition table parser"
217	depends on MTD && RALINK
218	help
219	  This provides partitions table parser for devices with Sercomm
220	  partition map. This partition table contains real partition
221	  offsets, which may differ from device to device depending on the
222	  number and location of bad blocks on NAND.
223