diff options
author | Dan Ehrenberg <dehrenberg@chromium.org> | 2015-04-02 18:15:10 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-04-05 20:44:01 -0400 |
commit | 727dc612c46b8f3858537ea23805b3e897cf127e (patch) | |
tree | 5bcda420d5f0071fc8d8c8c02dc68166256323e7 /drivers/mtd/Kconfig | |
parent | 9cd5196ed25979a3760f97225aae3e17caf21512 (diff) |
mtd: part: Create the master device node when partitioned
For many use cases, it helps to have a device node for the entire
MTD device as well as device nodes for the individual partitions.
For example, this allows querying the entire device's properties.
A common idiom is to create an additional partition which spans
over the whole device.
This patch makes a config option, CONFIG_MTD_PARTITIONED_MASTER,
which makes the master partition present even when the device is
partitioned. This isn't turned on by default since it presents
a backwards-incompatible device numbering.
The patch also makes the parent of a partition device be the master,
if the config flag is set, now that the master is a full device.
Signed-off-by: Dan Ehrenberg <dehrenberg@chromium.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/Kconfig')
-rw-r--r-- | drivers/mtd/Kconfig | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig index 71fea895ce38..a03ad2951c7b 100644 --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig | |||
@@ -309,6 +309,19 @@ config MTD_SWAP | |||
309 | The driver provides wear leveling by storing erase counter into the | 309 | The driver provides wear leveling by storing erase counter into the |
310 | OOB. | 310 | OOB. |
311 | 311 | ||
312 | config MTD_PARTITIONED_MASTER | ||
313 | bool "Retain master device when partitioned" | ||
314 | default n | ||
315 | depends on MTD | ||
316 | help | ||
317 | For historical reasons, by default, either a master is present or | ||
318 | several partitions are present, but not both. The concern was that | ||
319 | data listed in multiple partitions was dangerous; however, SCSI does | ||
320 | this and it is frequently useful for applications. This config option | ||
321 | leaves the master in even if the device is partitioned. It also makes | ||
322 | the parent of the partition device be the master device, rather than | ||
323 | what lies behind the master. | ||
324 | |||
312 | source "drivers/mtd/chips/Kconfig" | 325 | source "drivers/mtd/chips/Kconfig" |
313 | 326 | ||
314 | source "drivers/mtd/maps/Kconfig" | 327 | source "drivers/mtd/maps/Kconfig" |