xref: /openbmc/linux/drivers/mtd/parsers/Kconfig (revision 887069f4)
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_CMDLINE_PARTS
24	tristate "Command line partition table parsing"
25	depends on MTD
26	help
27	  Allow generic configuration of the MTD partition tables via the kernel
28	  command line. Multiple flash resources are supported for hardware where
29	  different kinds of flash memory are available.
30
31	  You will still need the parsing functions to be called by the driver
32	  for your particular device. It won't happen automatically. The
33	  SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for
34	  example.
35
36	  The format for the command line is as follows:
37
38	  mtdparts=<mtddef>[;<mtddef]
39	  <mtddef>  := <mtd-id>:<partdef>[,<partdef>]
40	  <partdef> := <size>[@offset][<name>][ro]
41	  <mtd-id>  := unique id used in mapping driver/device
42	  <size>    := standard linux memsize OR "-" to denote all
43	  remaining space
44	  <name>    := (NAME)
45
46	  Due to the way Linux handles the command line, no spaces are
47	  allowed in the partition definition, including mtd id's and partition
48	  names.
49
50	  Examples:
51
52	  1 flash resource (mtd-id "sa1100"), with 1 single writable partition:
53	  mtdparts=sa1100:-
54
55	  Same flash, but 2 named partitions, the first one being read-only:
56	  mtdparts=sa1100:256k(ARMboot)ro,-(root)
57
58	  If unsure, say 'N'.
59
60config MTD_OF_PARTS
61	tristate "OpenFirmware (device tree) partitioning parser"
62	default y
63	depends on OF
64	help
65	  This provides a open firmware device tree partition parser
66	  which derives the partition map from the children of the
67	  flash memory node, as described in
68	  Documentation/devicetree/bindings/mtd/partition.txt.
69
70config MTD_OF_PARTS_BCM4908
71	bool "BCM4908 partitioning support"
72	depends on MTD_OF_PARTS && (ARCH_BCM4908 || COMPILE_TEST)
73	default ARCH_BCM4908
74	help
75	  This provides partitions parser for BCM4908 family devices
76	  that can have multiple "firmware" partitions. It takes care of
77	  finding currently used one and backup ones.
78
79config MTD_OF_PARTS_LINKSYS_NS
80	bool "Linksys Northstar partitioning support"
81	depends on MTD_OF_PARTS && (ARCH_BCM_5301X || ARCH_BCM4908 || COMPILE_TEST)
82	default ARCH_BCM_5301X
83	help
84	  This provides partitions parser for Linksys devices based on Broadcom
85	  Northstar architecture. Linksys commonly uses fixed flash layout with
86	  two "firmware" partitions. Currently used firmware has to be detected
87	  using CFE environment variable.
88
89config MTD_PARSER_IMAGETAG
90	tristate "Parser for BCM963XX Image Tag format partitions"
91	depends on BCM63XX || BMIPS_GENERIC || COMPILE_TEST
92	select CRC32
93	help
94	  Image Tag is the firmware header used by broadcom on their xDSL line
95	  of devices. It is used to describe the offsets and lengths of kernel
96	  and rootfs partitions.
97	  This driver adds support for parsing a partition with an Image Tag
98	  header and creates up to two partitions, kernel and rootfs.
99
100config MTD_AFS_PARTS
101	tristate "ARM Firmware Suite partition parsing"
102	depends on (ARM || ARM64)
103	help
104	  The ARM Firmware Suite allows the user to divide flash devices into
105	  multiple 'images'. Each such image has a header containing its name
106	  and offset/size etc.
107
108	  If you need code which can detect and parse these tables, and
109	  register MTD 'partitions' corresponding to each image detected,
110	  enable this option.
111
112	  You will still need the parsing functions to be called by the driver
113	  for your particular device. It won't happen automatically. The
114	  'physmap' map driver (CONFIG_MTD_PHYSMAP) does this, for example.
115
116config MTD_PARSER_TRX
117	tristate "Parser for TRX format partitions"
118	depends on MTD && (BCM47XX || ARCH_BCM_5301X || ARCH_MEDIATEK || COMPILE_TEST)
119	help
120	  TRX is a firmware format used by Broadcom on their devices. It
121	  may contain up to 3/4 partitions (depending on the version).
122	  This driver will parse TRX header and report at least two partitions:
123	  kernel and rootfs.
124
125config MTD_SHARPSL_PARTS
126	tristate "Sharp SL Series NAND flash partition parser"
127	depends on MTD_NAND_SHARPSL || MTD_NAND_TMIO || COMPILE_TEST
128	help
129	  This provides the read-only FTL logic necessary to read the partition
130	  table from the NAND flash of Sharp SL Series (Zaurus) and the MTD
131	  partition parser using this code.
132
133config MTD_REDBOOT_PARTS
134	tristate "RedBoot partition table parsing"
135	help
136	  RedBoot is a ROM monitor and bootloader which deals with multiple
137	  'images' in flash devices by putting a table one of the erase
138	  blocks on the device, similar to a partition table, which gives
139	  the offsets, lengths and names of all the images stored in the
140	  flash.
141
142	  If you need code which can detect and parse this table, and register
143	  MTD 'partitions' corresponding to each image in the table, enable
144	  this option.
145
146	  You will still need the parsing functions to be called by the driver
147	  for your particular device. It won't happen automatically. The
148	  SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for
149	  example.
150
151if MTD_REDBOOT_PARTS
152
153config MTD_REDBOOT_DIRECTORY_BLOCK
154	int "Location of RedBoot partition table"
155	default "-1"
156	help
157	  This option is the Linux counterpart to the
158	  CYGNUM_REDBOOT_FIS_DIRECTORY_BLOCK RedBoot compile time
159	  option.
160
161	  The option specifies which Flash sectors holds the RedBoot
162	  partition table.  A zero or positive value gives an absolute
163	  erase block number. A negative value specifies a number of
164	  sectors before the end of the device.
165
166	  For example "2" means block number 2, "-1" means the last
167	  block and "-2" means the penultimate block.
168
169config MTD_REDBOOT_PARTS_UNALLOCATED
170	bool "Include unallocated flash regions"
171	help
172	  If you need to register each unallocated flash region as a MTD
173	  'partition', enable this option.
174
175config MTD_REDBOOT_PARTS_READONLY
176	bool "Force read-only for RedBoot system images"
177	help
178	  If you need to force read-only for 'RedBoot', 'RedBoot Config' and
179	  'FIS directory' images, enable this option.
180
181endif # MTD_REDBOOT_PARTS
182
183config MTD_QCOMSMEM_PARTS
184	tristate "Qualcomm SMEM flash partition parser"
185	depends on QCOM_SMEM
186	help
187	  This provides support for parsing partitions from Shared Memory (SMEM)
188	  for NAND and SPI flash on Qualcomm platforms.
189