mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
Introducing CONFIG_MTD_VIRT_CONCAT to separate the legacy flow from the new
approach, where only the concatenated partition is registered as an MTD
device, while the individual partitions that form it are not registered
independently, as they are typically not required by the user.
CONFIG_MTD_VIRT_CONCAT is a boolean configuration option that depends on
CONFIG_MTD_PARTITIONED_MASTER. When enabled, it allows flash nodes to be
exposed as individual MTD devices along with the other partitions.
The solution focuses on fixed-partitions description only as it depends on
device boundaries. It supports multiple sets of concatenated devices, each
comprising two or more partitions.
flash@0 {
reg = <0>;
partitions {
compatible = "fixed-partitions";
part0@0 {
part-concat-next = <&flash0_part1>;
label = "part0_0";
reg = <0x0 0x800000>;
};
flash0_part1: part1@800000 {
label = "part0_1";
reg = <800000 0x800000>;
};
part2@1000000 {
part-concat-next = <&flash1_part0>;
label = "part0_2";
reg = <0x800000 0x800000>;
};
};
};
flash@1 {
reg = <1>;
partitions {
compatible = "fixed-partitions";
flash1_part0: part1@0 {
label = "part1_0";
reg = <0x0 0x800000>;
};
part1@800000 {
label = "part1_1";
reg = <0x800000 0x800000>;
};
};
};
The partitions that gets created are
flash@0
part0_0-part0_1-concat
flash@1
part1_1
part0_2-part1_0-concat
Suggested-by: Bernhard Frauendienst <kernel@nospam.obeliks.de>
Suggested-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
35 lines
1015 B
Makefile
35 lines
1015 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for the memory technology device drivers.
|
|
#
|
|
|
|
# Core functionality.
|
|
obj-$(CONFIG_MTD) += mtd.o
|
|
mtd-y := mtdcore.o mtdsuper.o mtdconcat.o mtdpart.o mtdchar.o
|
|
mtd-$(CONFIG_MTD_VIRT_CONCAT) += mtd_virt_concat.o
|
|
|
|
obj-y += parsers/
|
|
|
|
# 'Users' - code which presents functionality to userspace.
|
|
obj-$(CONFIG_MTD_BLKDEVS) += mtd_blkdevs.o
|
|
obj-$(CONFIG_MTD_BLOCK) += mtdblock.o
|
|
obj-$(CONFIG_MTD_BLOCK_RO) += mtdblock_ro.o
|
|
obj-$(CONFIG_FTL) += ftl.o
|
|
obj-$(CONFIG_NFTL) += nftl.o
|
|
obj-$(CONFIG_INFTL) += inftl.o
|
|
obj-$(CONFIG_RFD_FTL) += rfd_ftl.o
|
|
obj-$(CONFIG_SSFDC) += ssfdc.o
|
|
obj-$(CONFIG_SM_FTL) += sm_ftl.o
|
|
obj-$(CONFIG_MTD_OOPS) += mtdoops.o
|
|
obj-$(CONFIG_MTD_PSTORE) += mtdpstore.o
|
|
obj-$(CONFIG_MTD_SWAP) += mtdswap.o
|
|
|
|
nftl-objs := nftlcore.o nftlmount.o
|
|
inftl-objs := inftlcore.o inftlmount.o
|
|
|
|
obj-y += chips/ lpddr/ maps/ devices/ nand/ tests/
|
|
|
|
obj-$(CONFIG_MTD_SPI_NOR) += spi-nor/
|
|
obj-$(CONFIG_MTD_UBI) += ubi/
|
|
obj-$(CONFIG_MTD_HYPERBUS) += hyperbus/
|