xref: /linux/drivers/mtd/parsers/Kconfig (revision b597cc75f7fe76708bc6ab3f0e09bbff6f09ae4a)
1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only
25a4a335aSLinus Walleijconfig MTD_AR7_PARTS
35a4a335aSLinus Walleij	tristate "TI AR7 partitioning parser"
45a4a335aSLinus Walleij	help
55a4a335aSLinus Walleij	  TI AR7 partitioning parser support
65a4a335aSLinus Walleij
711f74023SLinus Walleijconfig MTD_BCM47XX_PARTS
811f74023SLinus Walleij	tristate "BCM47XX partitioning parser"
911f74023SLinus Walleij	depends on BCM47XX || ARCH_BCM_5301X
1011f74023SLinus Walleij	help
1111f74023SLinus Walleij	  This provides partitions parser for devices based on BCM47xx
1211f74023SLinus Walleij	  boards.
1311f74023SLinus Walleij
14ac37d352SLinus Walleijconfig MTD_BCM63XX_PARTS
15*b597cc75SFlorian Fainelli	bool "BCM63XX CFE partitioning parser"
16ac37d352SLinus Walleij	depends on BCM63XX || BMIPS_GENERIC || COMPILE_TEST
17ac37d352SLinus Walleij	select CRC32
18ac37d352SLinus Walleij	select MTD_PARSER_IMAGETAG
19ac37d352SLinus Walleij	help
20ac37d352SLinus Walleij	  This provides partition parsing for BCM63xx devices with CFE
21ac37d352SLinus Walleij	  bootloaders.
22ac37d352SLinus Walleij
23a3f12a35SLinus Walleijconfig MTD_CMDLINE_PARTS
24a3f12a35SLinus Walleij	tristate "Command line partition table parsing"
25a3f12a35SLinus Walleij	depends on MTD
26a3f12a35SLinus Walleij	help
27a3f12a35SLinus Walleij	  Allow generic configuration of the MTD partition tables via the kernel
28a3f12a35SLinus Walleij	  command line. Multiple flash resources are supported for hardware where
29a3f12a35SLinus Walleij	  different kinds of flash memory are available.
30a3f12a35SLinus Walleij
31a3f12a35SLinus Walleij	  You will still need the parsing functions to be called by the driver
32a3f12a35SLinus Walleij	  for your particular device. It won't happen automatically. The
33a3f12a35SLinus Walleij	  SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for
34a3f12a35SLinus Walleij	  example.
35a3f12a35SLinus Walleij
36a3f12a35SLinus Walleij	  The format for the command line is as follows:
37a3f12a35SLinus Walleij
38a3f12a35SLinus Walleij	  mtdparts=<mtddef>[;<mtddef]
39a3f12a35SLinus Walleij	  <mtddef>  := <mtd-id>:<partdef>[,<partdef>]
40a3f12a35SLinus Walleij	  <partdef> := <size>[@offset][<name>][ro]
41a3f12a35SLinus Walleij	  <mtd-id>  := unique id used in mapping driver/device
42a3f12a35SLinus Walleij	  <size>    := standard linux memsize OR "-" to denote all
43a3f12a35SLinus Walleij	  remaining space
44a3f12a35SLinus Walleij	  <name>    := (NAME)
45a3f12a35SLinus Walleij
46a3f12a35SLinus Walleij	  Due to the way Linux handles the command line, no spaces are
47a3f12a35SLinus Walleij	  allowed in the partition definition, including mtd id's and partition
48a3f12a35SLinus Walleij	  names.
49a3f12a35SLinus Walleij
50a3f12a35SLinus Walleij	  Examples:
51a3f12a35SLinus Walleij
52a3f12a35SLinus Walleij	  1 flash resource (mtd-id "sa1100"), with 1 single writable partition:
53a3f12a35SLinus Walleij	  mtdparts=sa1100:-
54a3f12a35SLinus Walleij
55a3f12a35SLinus Walleij	  Same flash, but 2 named partitions, the first one being read-only:
56a3f12a35SLinus Walleij	  mtdparts=sa1100:256k(ARMboot)ro,-(root)
57a3f12a35SLinus Walleij
58a3f12a35SLinus Walleij	  If unsure, say 'N'.
59a3f12a35SLinus Walleij
60c5da56f7SLinus Walleijconfig MTD_OF_PARTS
61c5da56f7SLinus Walleij	tristate "OpenFirmware (device tree) partitioning parser"
62c5da56f7SLinus Walleij	default y
63c5da56f7SLinus Walleij	depends on OF
64c5da56f7SLinus Walleij	help
65c5da56f7SLinus Walleij	  This provides a open firmware device tree partition parser
66c5da56f7SLinus Walleij	  which derives the partition map from the children of the
67c5da56f7SLinus Walleij	  flash memory node, as described in
68c5da56f7SLinus Walleij	  Documentation/devicetree/bindings/mtd/partition.txt.
69c5da56f7SLinus Walleij
70dd84cb02SJonas Gorskiconfig MTD_PARSER_IMAGETAG
71dd84cb02SJonas Gorski	tristate "Parser for BCM963XX Image Tag format partitions"
72dd84cb02SJonas Gorski	depends on BCM63XX || BMIPS_GENERIC || COMPILE_TEST
73dd84cb02SJonas Gorski	select CRC32
74dd84cb02SJonas Gorski	help
75dd84cb02SJonas Gorski	  Image Tag is the firmware header used by broadcom on their xDSL line
76dd84cb02SJonas Gorski	  of devices. It is used to describe the offsets and lengths of kernel
77dd84cb02SJonas Gorski	  and rootfs partitions.
78dd84cb02SJonas Gorski	  This driver adds support for parsing a partition with an Image Tag
79dd84cb02SJonas Gorski	  header and creates up to two partitions, kernel and rootfs.
80dd84cb02SJonas Gorski
812aa3b8e1SLinus Walleijconfig MTD_AFS_PARTS
822aa3b8e1SLinus Walleij	tristate "ARM Firmware Suite partition parsing"
832aa3b8e1SLinus Walleij	depends on (ARM || ARM64)
842aa3b8e1SLinus Walleij	help
852aa3b8e1SLinus Walleij	  The ARM Firmware Suite allows the user to divide flash devices into
862aa3b8e1SLinus Walleij	  multiple 'images'. Each such image has a header containing its name
872aa3b8e1SLinus Walleij	  and offset/size etc.
882aa3b8e1SLinus Walleij
892aa3b8e1SLinus Walleij	  If you need code which can detect and parse these tables, and
902aa3b8e1SLinus Walleij	  register MTD 'partitions' corresponding to each image detected,
912aa3b8e1SLinus Walleij	  enable this option.
922aa3b8e1SLinus Walleij
932aa3b8e1SLinus Walleij	  You will still need the parsing functions to be called by the driver
942aa3b8e1SLinus Walleij	  for your particular device. It won't happen automatically. The
952aa3b8e1SLinus Walleij	  'physmap' map driver (CONFIG_MTD_PHYSMAP) does this, for example.
962aa3b8e1SLinus Walleij
9799352afeSRafał Miłeckiconfig MTD_PARSER_TRX
9899352afeSRafał Miłecki	tristate "Parser for TRX format partitions"
9999352afeSRafał Miłecki	depends on MTD && (BCM47XX || ARCH_BCM_5301X || COMPILE_TEST)
10099352afeSRafał Miłecki	help
10199352afeSRafał Miłecki	  TRX is a firmware format used by Broadcom on their devices. It
10299352afeSRafał Miłecki	  may contain up to 3/4 partitions (depending on the version).
10399352afeSRafał Miłecki	  This driver will parse TRX header and report at least two partitions:
10499352afeSRafał Miłecki	  kernel and rootfs.
1058a4580e4SAndrea Adami
1068a4580e4SAndrea Adamiconfig MTD_SHARPSL_PARTS
1078a4580e4SAndrea Adami	tristate "Sharp SL Series NAND flash partition parser"
1088a4580e4SAndrea Adami	depends on MTD_NAND_SHARPSL || MTD_NAND_TMIO || COMPILE_TEST
1098a4580e4SAndrea Adami	help
1108a4580e4SAndrea Adami	  This provides the read-only FTL logic necessary to read the partition
1118a4580e4SAndrea Adami	  table from the NAND flash of Sharp SL Series (Zaurus) and the MTD
1128a4580e4SAndrea Adami	  partition parser using this code.
11343f1fd01SLinus Walleij
11443f1fd01SLinus Walleijconfig MTD_REDBOOT_PARTS
11543f1fd01SLinus Walleij	tristate "RedBoot partition table parsing"
11643f1fd01SLinus Walleij	help
11743f1fd01SLinus Walleij	  RedBoot is a ROM monitor and bootloader which deals with multiple
11843f1fd01SLinus Walleij	  'images' in flash devices by putting a table one of the erase
11943f1fd01SLinus Walleij	  blocks on the device, similar to a partition table, which gives
12043f1fd01SLinus Walleij	  the offsets, lengths and names of all the images stored in the
12143f1fd01SLinus Walleij	  flash.
12243f1fd01SLinus Walleij
12343f1fd01SLinus Walleij	  If you need code which can detect and parse this table, and register
12443f1fd01SLinus Walleij	  MTD 'partitions' corresponding to each image in the table, enable
12543f1fd01SLinus Walleij	  this option.
12643f1fd01SLinus Walleij
12743f1fd01SLinus Walleij	  You will still need the parsing functions to be called by the driver
12843f1fd01SLinus Walleij	  for your particular device. It won't happen automatically. The
12943f1fd01SLinus Walleij	  SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for
13043f1fd01SLinus Walleij	  example.
13143f1fd01SLinus Walleij
13243f1fd01SLinus Walleijif MTD_REDBOOT_PARTS
13343f1fd01SLinus Walleij
13443f1fd01SLinus Walleijconfig MTD_REDBOOT_DIRECTORY_BLOCK
13543f1fd01SLinus Walleij	int "Location of RedBoot partition table"
13643f1fd01SLinus Walleij	default "-1"
13743f1fd01SLinus Walleij	help
13843f1fd01SLinus Walleij	  This option is the Linux counterpart to the
13943f1fd01SLinus Walleij	  CYGNUM_REDBOOT_FIS_DIRECTORY_BLOCK RedBoot compile time
14043f1fd01SLinus Walleij	  option.
14143f1fd01SLinus Walleij
14243f1fd01SLinus Walleij	  The option specifies which Flash sectors holds the RedBoot
14343f1fd01SLinus Walleij	  partition table.  A zero or positive value gives an absolute
14443f1fd01SLinus Walleij	  erase block number. A negative value specifies a number of
14543f1fd01SLinus Walleij	  sectors before the end of the device.
14643f1fd01SLinus Walleij
14743f1fd01SLinus Walleij	  For example "2" means block number 2, "-1" means the last
14843f1fd01SLinus Walleij	  block and "-2" means the penultimate block.
14943f1fd01SLinus Walleij
15043f1fd01SLinus Walleijconfig MTD_REDBOOT_PARTS_UNALLOCATED
15143f1fd01SLinus Walleij	bool "Include unallocated flash regions"
15243f1fd01SLinus Walleij	help
15343f1fd01SLinus Walleij	  If you need to register each unallocated flash region as a MTD
15443f1fd01SLinus Walleij	  'partition', enable this option.
15543f1fd01SLinus Walleij
15643f1fd01SLinus Walleijconfig MTD_REDBOOT_PARTS_READONLY
15743f1fd01SLinus Walleij	bool "Force read-only for RedBoot system images"
15843f1fd01SLinus Walleij	help
15943f1fd01SLinus Walleij	  If you need to force read-only for 'RedBoot', 'RedBoot Config' and
16043f1fd01SLinus Walleij	  'FIS directory' images, enable this option.
16143f1fd01SLinus Walleij
16243f1fd01SLinus Walleijendif # MTD_REDBOOT_PARTS
163