kernel: backport mtd implementation for "compatible" in "partitions" subnode
This backports upstream support for "compatible" DT property set for the "partitions" subnode of flash node. It allows specifying how partitions should be created/parsed. Right now only "fixed-partitions" is supported. It should eventually replace our downstream "linux,part-probe" solution. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
This commit is contained in:
@@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
--- a/drivers/mtd/mtdpart.c
|
||||
+++ b/drivers/mtd/mtdpart.c
|
||||
@@ -799,6 +799,17 @@ run_parsers_by_type(struct mtd_part *sla
|
||||
@@ -800,6 +800,17 @@ run_parsers_by_type(struct mtd_part *sla
|
||||
return nr_parts;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
#ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME
|
||||
#define SPLIT_FIRMWARE_NAME CONFIG_MTD_SPLIT_FIRMWARE_NAME
|
||||
#else
|
||||
@@ -1144,6 +1155,24 @@ int mtd_is_partition(const struct mtd_in
|
||||
@@ -1203,6 +1214,24 @@ int mtd_is_partition(const struct mtd_in
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mtd_is_partition);
|
||||
|
||||
@@ -83,7 +83,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
if (mtd->writesize_shift)
|
||||
--- a/include/linux/mtd/partitions.h
|
||||
+++ b/include/linux/mtd/partitions.h
|
||||
@@ -114,6 +114,8 @@ int mtd_is_partition(const struct mtd_in
|
||||
@@ -115,6 +115,8 @@ int mtd_is_partition(const struct mtd_in
|
||||
int mtd_add_partition(struct mtd_info *master, const char *name,
|
||||
long long offset, long long length);
|
||||
int mtd_del_partition(struct mtd_info *master, int partno);
|
||||
|
||||
Reference in New Issue
Block a user