18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
28c2ecf20Sopenharmony_ciconfig MTD_AR7_PARTS
38c2ecf20Sopenharmony_ci	tristate "TI AR7 partitioning parser"
48c2ecf20Sopenharmony_ci	help
58c2ecf20Sopenharmony_ci	  TI AR7 partitioning parser support
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ciconfig MTD_BCM47XX_PARTS
88c2ecf20Sopenharmony_ci	tristate "BCM47XX partitioning parser"
98c2ecf20Sopenharmony_ci	depends on BCM47XX || ARCH_BCM_5301X
108c2ecf20Sopenharmony_ci	help
118c2ecf20Sopenharmony_ci	  This provides partitions parser for devices based on BCM47xx
128c2ecf20Sopenharmony_ci	  boards.
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciconfig MTD_BCM63XX_PARTS
158c2ecf20Sopenharmony_ci	bool "BCM63XX CFE partitioning parser"
168c2ecf20Sopenharmony_ci	depends on BCM63XX || BMIPS_GENERIC || COMPILE_TEST
178c2ecf20Sopenharmony_ci	select CRC32
188c2ecf20Sopenharmony_ci	select MTD_PARSER_IMAGETAG
198c2ecf20Sopenharmony_ci	help
208c2ecf20Sopenharmony_ci	  This provides partition parsing for BCM63xx devices with CFE
218c2ecf20Sopenharmony_ci	  bootloaders.
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ciconfig MTD_CMDLINE_PARTS
248c2ecf20Sopenharmony_ci	tristate "Command line partition table parsing"
258c2ecf20Sopenharmony_ci	depends on MTD
268c2ecf20Sopenharmony_ci	help
278c2ecf20Sopenharmony_ci	  Allow generic configuration of the MTD partition tables via the kernel
288c2ecf20Sopenharmony_ci	  command line. Multiple flash resources are supported for hardware where
298c2ecf20Sopenharmony_ci	  different kinds of flash memory are available.
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci	  You will still need the parsing functions to be called by the driver
328c2ecf20Sopenharmony_ci	  for your particular device. It won't happen automatically. The
338c2ecf20Sopenharmony_ci	  SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for
348c2ecf20Sopenharmony_ci	  example.
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci	  The format for the command line is as follows:
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci	  mtdparts=<mtddef>[;<mtddef]
398c2ecf20Sopenharmony_ci	  <mtddef>  := <mtd-id>:<partdef>[,<partdef>]
408c2ecf20Sopenharmony_ci	  <partdef> := <size>[@offset][<name>][ro]
418c2ecf20Sopenharmony_ci	  <mtd-id>  := unique id used in mapping driver/device
428c2ecf20Sopenharmony_ci	  <size>    := standard linux memsize OR "-" to denote all
438c2ecf20Sopenharmony_ci	  remaining space
448c2ecf20Sopenharmony_ci	  <name>    := (NAME)
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ci	  Due to the way Linux handles the command line, no spaces are
478c2ecf20Sopenharmony_ci	  allowed in the partition definition, including mtd id's and partition
488c2ecf20Sopenharmony_ci	  names.
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ci	  Examples:
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ci	  1 flash resource (mtd-id "sa1100"), with 1 single writable partition:
538c2ecf20Sopenharmony_ci	  mtdparts=sa1100:-
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ci	  Same flash, but 2 named partitions, the first one being read-only:
568c2ecf20Sopenharmony_ci	  mtdparts=sa1100:256k(ARMboot)ro,-(root)
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci	  If unsure, say 'N'.
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ciconfig MTD_OF_PARTS
618c2ecf20Sopenharmony_ci	tristate "OpenFirmware (device tree) partitioning parser"
628c2ecf20Sopenharmony_ci	default y
638c2ecf20Sopenharmony_ci	depends on OF
648c2ecf20Sopenharmony_ci	help
658c2ecf20Sopenharmony_ci	  This provides a open firmware device tree partition parser
668c2ecf20Sopenharmony_ci	  which derives the partition map from the children of the
678c2ecf20Sopenharmony_ci	  flash memory node, as described in
688c2ecf20Sopenharmony_ci	  Documentation/devicetree/bindings/mtd/partition.txt.
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_ciconfig MTD_PARSER_IMAGETAG
718c2ecf20Sopenharmony_ci	tristate "Parser for BCM963XX Image Tag format partitions"
728c2ecf20Sopenharmony_ci	depends on BCM63XX || BMIPS_GENERIC || COMPILE_TEST
738c2ecf20Sopenharmony_ci	select CRC32
748c2ecf20Sopenharmony_ci	help
758c2ecf20Sopenharmony_ci	  Image Tag is the firmware header used by broadcom on their xDSL line
768c2ecf20Sopenharmony_ci	  of devices. It is used to describe the offsets and lengths of kernel
778c2ecf20Sopenharmony_ci	  and rootfs partitions.
788c2ecf20Sopenharmony_ci	  This driver adds support for parsing a partition with an Image Tag
798c2ecf20Sopenharmony_ci	  header and creates up to two partitions, kernel and rootfs.
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ciconfig MTD_AFS_PARTS
828c2ecf20Sopenharmony_ci	tristate "ARM Firmware Suite partition parsing"
838c2ecf20Sopenharmony_ci	depends on (ARM || ARM64)
848c2ecf20Sopenharmony_ci	help
858c2ecf20Sopenharmony_ci	  The ARM Firmware Suite allows the user to divide flash devices into
868c2ecf20Sopenharmony_ci	  multiple 'images'. Each such image has a header containing its name
878c2ecf20Sopenharmony_ci	  and offset/size etc.
888c2ecf20Sopenharmony_ci
898c2ecf20Sopenharmony_ci	  If you need code which can detect and parse these tables, and
908c2ecf20Sopenharmony_ci	  register MTD 'partitions' corresponding to each image detected,
918c2ecf20Sopenharmony_ci	  enable this option.
928c2ecf20Sopenharmony_ci
938c2ecf20Sopenharmony_ci	  You will still need the parsing functions to be called by the driver
948c2ecf20Sopenharmony_ci	  for your particular device. It won't happen automatically. The
958c2ecf20Sopenharmony_ci	  'physmap' map driver (CONFIG_MTD_PHYSMAP) does this, for example.
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ciconfig MTD_PARSER_TRX
988c2ecf20Sopenharmony_ci	tristate "Parser for TRX format partitions"
998c2ecf20Sopenharmony_ci	depends on MTD && (BCM47XX || ARCH_BCM_5301X || COMPILE_TEST)
1008c2ecf20Sopenharmony_ci	help
1018c2ecf20Sopenharmony_ci	  TRX is a firmware format used by Broadcom on their devices. It
1028c2ecf20Sopenharmony_ci	  may contain up to 3/4 partitions (depending on the version).
1038c2ecf20Sopenharmony_ci	  This driver will parse TRX header and report at least two partitions:
1048c2ecf20Sopenharmony_ci	  kernel and rootfs.
1058c2ecf20Sopenharmony_ci
1068c2ecf20Sopenharmony_ciconfig MTD_SHARPSL_PARTS
1078c2ecf20Sopenharmony_ci	tristate "Sharp SL Series NAND flash partition parser"
1088c2ecf20Sopenharmony_ci	depends on MTD_NAND_SHARPSL || MTD_NAND_TMIO || COMPILE_TEST
1098c2ecf20Sopenharmony_ci	help
1108c2ecf20Sopenharmony_ci	  This provides the read-only FTL logic necessary to read the partition
1118c2ecf20Sopenharmony_ci	  table from the NAND flash of Sharp SL Series (Zaurus) and the MTD
1128c2ecf20Sopenharmony_ci	  partition parser using this code.
1138c2ecf20Sopenharmony_ci
1148c2ecf20Sopenharmony_ciconfig MTD_REDBOOT_PARTS
1158c2ecf20Sopenharmony_ci	tristate "RedBoot partition table parsing"
1168c2ecf20Sopenharmony_ci	help
1178c2ecf20Sopenharmony_ci	  RedBoot is a ROM monitor and bootloader which deals with multiple
1188c2ecf20Sopenharmony_ci	  'images' in flash devices by putting a table one of the erase
1198c2ecf20Sopenharmony_ci	  blocks on the device, similar to a partition table, which gives
1208c2ecf20Sopenharmony_ci	  the offsets, lengths and names of all the images stored in the
1218c2ecf20Sopenharmony_ci	  flash.
1228c2ecf20Sopenharmony_ci
1238c2ecf20Sopenharmony_ci	  If you need code which can detect and parse this table, and register
1248c2ecf20Sopenharmony_ci	  MTD 'partitions' corresponding to each image in the table, enable
1258c2ecf20Sopenharmony_ci	  this option.
1268c2ecf20Sopenharmony_ci
1278c2ecf20Sopenharmony_ci	  You will still need the parsing functions to be called by the driver
1288c2ecf20Sopenharmony_ci	  for your particular device. It won't happen automatically. The
1298c2ecf20Sopenharmony_ci	  SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for
1308c2ecf20Sopenharmony_ci	  example.
1318c2ecf20Sopenharmony_ci
1328c2ecf20Sopenharmony_ciif MTD_REDBOOT_PARTS
1338c2ecf20Sopenharmony_ci
1348c2ecf20Sopenharmony_ciconfig MTD_REDBOOT_DIRECTORY_BLOCK
1358c2ecf20Sopenharmony_ci	int "Location of RedBoot partition table"
1368c2ecf20Sopenharmony_ci	default "-1"
1378c2ecf20Sopenharmony_ci	help
1388c2ecf20Sopenharmony_ci	  This option is the Linux counterpart to the
1398c2ecf20Sopenharmony_ci	  CYGNUM_REDBOOT_FIS_DIRECTORY_BLOCK RedBoot compile time
1408c2ecf20Sopenharmony_ci	  option.
1418c2ecf20Sopenharmony_ci
1428c2ecf20Sopenharmony_ci	  The option specifies which Flash sectors holds the RedBoot
1438c2ecf20Sopenharmony_ci	  partition table.  A zero or positive value gives an absolute
1448c2ecf20Sopenharmony_ci	  erase block number. A negative value specifies a number of
1458c2ecf20Sopenharmony_ci	  sectors before the end of the device.
1468c2ecf20Sopenharmony_ci
1478c2ecf20Sopenharmony_ci	  For example "2" means block number 2, "-1" means the last
1488c2ecf20Sopenharmony_ci	  block and "-2" means the penultimate block.
1498c2ecf20Sopenharmony_ci
1508c2ecf20Sopenharmony_ciconfig MTD_REDBOOT_PARTS_UNALLOCATED
1518c2ecf20Sopenharmony_ci	bool "Include unallocated flash regions"
1528c2ecf20Sopenharmony_ci	help
1538c2ecf20Sopenharmony_ci	  If you need to register each unallocated flash region as a MTD
1548c2ecf20Sopenharmony_ci	  'partition', enable this option.
1558c2ecf20Sopenharmony_ci
1568c2ecf20Sopenharmony_ciconfig MTD_REDBOOT_PARTS_READONLY
1578c2ecf20Sopenharmony_ci	bool "Force read-only for RedBoot system images"
1588c2ecf20Sopenharmony_ci	help
1598c2ecf20Sopenharmony_ci	  If you need to force read-only for 'RedBoot', 'RedBoot Config' and
1608c2ecf20Sopenharmony_ci	  'FIS directory' images, enable this option.
1618c2ecf20Sopenharmony_ci
1628c2ecf20Sopenharmony_ciendif # MTD_REDBOOT_PARTS
163