diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2018-01-11 11:59:39 +0100 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2018-01-11 12:07:49 +0100 |
commit | bde5e7a632ef06b16ea77af037c1442e10949666 (patch) | |
tree | 51dce463c6c4514b9da7ea389cab4133072c3129 /target/linux/generic/pending-4.9/411-mtd-partial_eraseblock_write.patch | |
parent | ef27f153302b9f8296f5a8c71d08ae7392e721de (diff) | |
download | mtk-20170518-bde5e7a632ef06b16ea77af037c1442e10949666.zip mtk-20170518-bde5e7a632ef06b16ea77af037c1442e10949666.tar.gz mtk-20170518-bde5e7a632ef06b16ea77af037c1442e10949666.tar.bz2 |
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>
Diffstat (limited to 'target/linux/generic/pending-4.9/411-mtd-partial_eraseblock_write.patch')
-rw-r--r-- | target/linux/generic/pending-4.9/411-mtd-partial_eraseblock_write.patch | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/target/linux/generic/pending-4.9/411-mtd-partial_eraseblock_write.patch b/target/linux/generic/pending-4.9/411-mtd-partial_eraseblock_write.patch index 6c03a29..9a58521 100644 --- a/target/linux/generic/pending-4.9/411-mtd-partial_eraseblock_write.patch +++ b/target/linux/generic/pending-4.9/411-mtd-partial_eraseblock_write.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c -@@ -36,6 +36,8 @@ +@@ -37,6 +37,8 @@ #include "mtdcore.h" #include "mtdsplit/mtdsplit.h" @@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> /* Our partition linked list */ static LIST_HEAD(mtd_partitions); static DEFINE_MUTEX(mtd_partitions_mutex); -@@ -241,13 +243,61 @@ static int part_erase(struct mtd_info *m +@@ -242,13 +244,61 @@ static int part_erase(struct mtd_info *m struct mtd_part *part = mtd_to_part(mtd); int ret; @@ -81,7 +81,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> return ret; } -@@ -255,6 +305,25 @@ void mtd_erase_callback(struct erase_inf +@@ -256,6 +306,25 @@ void mtd_erase_callback(struct erase_inf { if (instr->mtd->_erase == part_erase) { struct mtd_part *part = mtd_to_part(instr->mtd); @@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> if (instr->fail_addr != MTD_FAIL_ADDR_UNKNOWN) instr->fail_addr -= part->offset; -@@ -590,19 +659,22 @@ static struct mtd_part *allocate_partiti +@@ -591,19 +660,22 @@ static struct mtd_part *allocate_partiti remainder = do_div(tmp, wr_alignment); if ((slave->mtd.flags & MTD_WRITEABLE) && remainder) { /* Doesn't start on a boundary of major erase size */ |