Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd: Move Redboot partition parser

This moves the Redboot partition parser down to the parsers
subdirectory.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>

authored by

Linus Walleij and committed by
Boris Brezillon
43f1fd01 f7d6cf6d

+51 -51
-50
drivers/mtd/Kconfig
··· 22 22 WARNING: some of the tests will ERASE entire MTD device which they 23 23 test. Do not use these tests unless you really know what you do. 24 24 25 - config MTD_REDBOOT_PARTS 26 - tristate "RedBoot partition table parsing" 27 - help 28 - RedBoot is a ROM monitor and bootloader which deals with multiple 29 - 'images' in flash devices by putting a table one of the erase 30 - blocks on the device, similar to a partition table, which gives 31 - the offsets, lengths and names of all the images stored in the 32 - flash. 33 - 34 - If you need code which can detect and parse this table, and register 35 - MTD 'partitions' corresponding to each image in the table, enable 36 - this option. 37 - 38 - You will still need the parsing functions to be called by the driver 39 - for your particular device. It won't happen automatically. The 40 - SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for 41 - example. 42 - 43 - if MTD_REDBOOT_PARTS 44 - 45 - config MTD_REDBOOT_DIRECTORY_BLOCK 46 - int "Location of RedBoot partition table" 47 - default "-1" 48 - help 49 - This option is the Linux counterpart to the 50 - CYGNUM_REDBOOT_FIS_DIRECTORY_BLOCK RedBoot compile time 51 - option. 52 - 53 - The option specifies which Flash sectors holds the RedBoot 54 - partition table. A zero or positive value gives an absolute 55 - erase block number. A negative value specifies a number of 56 - sectors before the end of the device. 57 - 58 - For example "2" means block number 2, "-1" means the last 59 - block and "-2" means the penultimate block. 60 - 61 - config MTD_REDBOOT_PARTS_UNALLOCATED 62 - bool "Include unallocated flash regions" 63 - help 64 - If you need to register each unallocated flash region as a MTD 65 - 'partition', enable this option. 66 - 67 - config MTD_REDBOOT_PARTS_READONLY 68 - bool "Force read-only for RedBoot system images" 69 - help 70 - If you need to force read-only for 'RedBoot', 'RedBoot Config' and 71 - 'FIS directory' images, enable this option. 72 - 73 - endif # MTD_REDBOOT_PARTS 74 - 75 25 config MTD_CMDLINE_PARTS 76 26 tristate "Command line partition table parsing" 77 27 depends on MTD
-1
drivers/mtd/Makefile
··· 8 8 mtd-y := mtdcore.o mtdsuper.o mtdconcat.o mtdpart.o mtdchar.o 9 9 10 10 obj-$(CONFIG_MTD_OF_PARTS) += ofpart.o 11 - obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o 12 11 obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o 13 12 obj-$(CONFIG_MTD_AFS_PARTS) += afs.o 14 13 obj-$(CONFIG_MTD_AR7_PARTS) += ar7part.o
+50
drivers/mtd/parsers/Kconfig
··· 14 14 This provides the read-only FTL logic necessary to read the partition 15 15 table from the NAND flash of Sharp SL Series (Zaurus) and the MTD 16 16 partition parser using this code. 17 + 18 + config MTD_REDBOOT_PARTS 19 + tristate "RedBoot partition table parsing" 20 + help 21 + RedBoot is a ROM monitor and bootloader which deals with multiple 22 + 'images' in flash devices by putting a table one of the erase 23 + blocks on the device, similar to a partition table, which gives 24 + the offsets, lengths and names of all the images stored in the 25 + flash. 26 + 27 + If you need code which can detect and parse this table, and register 28 + MTD 'partitions' corresponding to each image in the table, enable 29 + this option. 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 + if MTD_REDBOOT_PARTS 37 + 38 + config MTD_REDBOOT_DIRECTORY_BLOCK 39 + int "Location of RedBoot partition table" 40 + default "-1" 41 + help 42 + This option is the Linux counterpart to the 43 + CYGNUM_REDBOOT_FIS_DIRECTORY_BLOCK RedBoot compile time 44 + option. 45 + 46 + The option specifies which Flash sectors holds the RedBoot 47 + partition table. A zero or positive value gives an absolute 48 + erase block number. A negative value specifies a number of 49 + sectors before the end of the device. 50 + 51 + For example "2" means block number 2, "-1" means the last 52 + block and "-2" means the penultimate block. 53 + 54 + config MTD_REDBOOT_PARTS_UNALLOCATED 55 + bool "Include unallocated flash regions" 56 + help 57 + If you need to register each unallocated flash region as a MTD 58 + 'partition', enable this option. 59 + 60 + config MTD_REDBOOT_PARTS_READONLY 61 + bool "Force read-only for RedBoot system images" 62 + help 63 + If you need to force read-only for 'RedBoot', 'RedBoot Config' and 64 + 'FIS directory' images, enable this option. 65 + 66 + endif # MTD_REDBOOT_PARTS
+1
drivers/mtd/parsers/Makefile
··· 1 1 obj-$(CONFIG_MTD_PARSER_TRX) += parser_trx.o 2 2 obj-$(CONFIG_MTD_SHARPSL_PARTS) += sharpslpart.o 3 + obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
drivers/mtd/redboot.c drivers/mtd/parsers/redboot.c