Commit b7b6e08f authored by Grant Likely's avatar Grant Likely Committed by David Woodhouse

mtd: Fix MTD_OF_PARTS for all arch and minor tidy of MTD_PARTITIONS

MTD_OF_PARTS should be possible on all architectures, not just
powerpc and microblaze, and it probably should not be a user
selectable option.  Neither does it need to be in a separate module.

Also, rework MTD Kconfig to group options dependant on MTD_PARTITIONS
into a if/endif block.  Do the same for MTD_REDBOOT_PARTS.
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 3345cc4f
...@@ -53,9 +53,10 @@ config MTD_PARTITIONS ...@@ -53,9 +53,10 @@ config MTD_PARTITIONS
devices. Partitioning on NFTL 'devices' is a different - that's the devices. Partitioning on NFTL 'devices' is a different - that's the
'normal' form of partitioning used on a block device. 'normal' form of partitioning used on a block device.
if MTD_PARTITIONS
config MTD_REDBOOT_PARTS config MTD_REDBOOT_PARTS
tristate "RedBoot partition table parsing" tristate "RedBoot partition table parsing"
depends on MTD_PARTITIONS
---help--- ---help---
RedBoot is a ROM monitor and bootloader which deals with multiple RedBoot is a ROM monitor and bootloader which deals with multiple
'images' in flash devices by putting a table one of the erase 'images' in flash devices by putting a table one of the erase
...@@ -72,9 +73,10 @@ config MTD_REDBOOT_PARTS ...@@ -72,9 +73,10 @@ config MTD_REDBOOT_PARTS
SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for SA1100 map driver (CONFIG_MTD_SA1100) has an option for this, for
example. example.
if MTD_REDBOOT_PARTS
config MTD_REDBOOT_DIRECTORY_BLOCK config MTD_REDBOOT_DIRECTORY_BLOCK
int "Location of RedBoot partition table" int "Location of RedBoot partition table"
depends on MTD_REDBOOT_PARTS
default "-1" default "-1"
---help--- ---help---
This option is the Linux counterpart to the This option is the Linux counterpart to the
...@@ -91,18 +93,18 @@ config MTD_REDBOOT_DIRECTORY_BLOCK ...@@ -91,18 +93,18 @@ config MTD_REDBOOT_DIRECTORY_BLOCK
config MTD_REDBOOT_PARTS_UNALLOCATED config MTD_REDBOOT_PARTS_UNALLOCATED
bool "Include unallocated flash regions" bool "Include unallocated flash regions"
depends on MTD_REDBOOT_PARTS
help help
If you need to register each unallocated flash region as a MTD If you need to register each unallocated flash region as a MTD
'partition', enable this option. 'partition', enable this option.
config MTD_REDBOOT_PARTS_READONLY config MTD_REDBOOT_PARTS_READONLY
bool "Force read-only for RedBoot system images" bool "Force read-only for RedBoot system images"
depends on MTD_REDBOOT_PARTS
help help
If you need to force read-only for 'RedBoot', 'RedBoot Config' and If you need to force read-only for 'RedBoot', 'RedBoot Config' and
'FIS directory' images, enable this option. 'FIS directory' images, enable this option.
endif # MTD_REDBOOT_PARTS
config MTD_CMDLINE_PARTS config MTD_CMDLINE_PARTS
bool "Command line partition table parsing" bool "Command line partition table parsing"
depends on MTD_PARTITIONS = "y" && MTD = "y" depends on MTD_PARTITIONS = "y" && MTD = "y"
...@@ -142,7 +144,7 @@ config MTD_CMDLINE_PARTS ...@@ -142,7 +144,7 @@ config MTD_CMDLINE_PARTS
config MTD_AFS_PARTS config MTD_AFS_PARTS
tristate "ARM Firmware Suite partition parsing" tristate "ARM Firmware Suite partition parsing"
depends on ARM && MTD_PARTITIONS depends on ARM
---help--- ---help---
The ARM Firmware Suite allows the user to divide flash devices into The ARM Firmware Suite allows the user to divide flash devices into
multiple 'images'. Each such image has a header containing its name multiple 'images'. Each such image has a header containing its name
...@@ -158,8 +160,8 @@ config MTD_AFS_PARTS ...@@ -158,8 +160,8 @@ config MTD_AFS_PARTS
example. example.
config MTD_OF_PARTS config MTD_OF_PARTS
tristate "Flash partition map based on OF description" def_bool y
depends on (MICROBLAZE || PPC_OF) && MTD_PARTITIONS depends on OF
help help
This provides a partition parsing function which derives This provides a partition parsing function which derives
the partition map from the children of the flash node, the partition map from the children of the flash node,
...@@ -167,10 +169,11 @@ config MTD_OF_PARTS ...@@ -167,10 +169,11 @@ config MTD_OF_PARTS
config MTD_AR7_PARTS config MTD_AR7_PARTS
tristate "TI AR7 partitioning support" tristate "TI AR7 partitioning support"
depends on MTD_PARTITIONS
---help--- ---help---
TI AR7 partitioning support TI AR7 partitioning support
endif # MTD_PARTITIONS
comment "User Modules And Translation Layers" comment "User Modules And Translation Layers"
config MTD_CHAR config MTD_CHAR
......
...@@ -6,13 +6,13 @@ ...@@ -6,13 +6,13 @@
obj-$(CONFIG_MTD) += mtd.o obj-$(CONFIG_MTD) += mtd.o
mtd-y := mtdcore.o mtdsuper.o mtd-y := mtdcore.o mtdsuper.o
mtd-$(CONFIG_MTD_PARTITIONS) += mtdpart.o mtd-$(CONFIG_MTD_PARTITIONS) += mtdpart.o
mtd-$(CONFIG_MTD_OF_PARTS) += ofpart.o
obj-$(CONFIG_MTD_CONCAT) += mtdconcat.o obj-$(CONFIG_MTD_CONCAT) += mtdconcat.o
obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o
obj-$(CONFIG_MTD_AFS_PARTS) += afs.o obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
obj-$(CONFIG_MTD_AR7_PARTS) += ar7part.o obj-$(CONFIG_MTD_AR7_PARTS) += ar7part.o
obj-$(CONFIG_MTD_OF_PARTS) += ofpart.o
# 'Users' - code which presents functionality to userspace. # 'Users' - code which presents functionality to userspace.
obj-$(CONFIG_MTD_CHAR) += mtdchar.o obj-$(CONFIG_MTD_CHAR) += mtdchar.o
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment