diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2021-03-01 18:12:48 +0100 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2021-03-17 21:23:38 +0100 |
commit | 543007917aaa191f1908974caa95d97b1f55a72c (patch) | |
tree | 6dd1b2793651eb75d1fab0a8f30d6c63c824909c /target/linux/lantiq | |
parent | 67df3a829b33dfaa8068209d31246296985e9888 (diff) | |
download | upstream-543007917aaa191f1908974caa95d97b1f55a72c.tar.gz upstream-543007917aaa191f1908974caa95d97b1f55a72c.tar.bz2 upstream-543007917aaa191f1908974caa95d97b1f55a72c.zip |
kernel: add the latest mtd patch extending ofpart parser
This adds the latest version of ofpart commit. It hopefully
1. Doesn't break compilation
2. Doesn't break partitioning
(this time).
It's required to implement fixed partitioning with some quirks. It's
required by bcm53xx, bcm4908, kirkwood, lantiq and mvebu.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 7a7b2fd809809fbd7045bd3dad4fc896a6fef06f)
Diffstat (limited to 'target/linux/lantiq')
-rw-r--r-- | target/linux/lantiq/patches-5.4/0101-find_active_root.patch | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/target/linux/lantiq/patches-5.4/0101-find_active_root.patch b/target/linux/lantiq/patches-5.4/0101-find_active_root.patch index b6b4ab7409..d541cc247c 100644 --- a/target/linux/lantiq/patches-5.4/0101-find_active_root.patch +++ b/target/linux/lantiq/patches-5.4/0101-find_active_root.patch @@ -1,6 +1,6 @@ ---- a/drivers/mtd/parsers/ofpart.c -+++ b/drivers/mtd/parsers/ofpart.c -@@ -21,6 +21,38 @@ static bool node_has_compatible(struct d +--- a/drivers/mtd/parsers/ofpart_core.c ++++ b/drivers/mtd/parsers/ofpart_core.c +@@ -33,6 +33,38 @@ static bool node_has_compatible(struct d return of_get_property(pp, "compatible", NULL); } @@ -39,17 +39,16 @@ static int parse_fixed_partitions(struct mtd_info *master, const struct mtd_partition **pparts, struct mtd_part_parser_data *data) -@@ -32,7 +64,8 @@ static int parse_fixed_partitions(struct +@@ -46,6 +78,8 @@ static int parse_fixed_partitions(struct struct device_node *pp; int nr_parts, i, ret = 0; bool dedicated = true; -- + uint8_t *proot_id = NULL; + struct device_node **part_nodes; /* Pull of_node from the master device node */ mtd_node = mtd_get_of_node(master); -@@ -68,7 +101,9 @@ static int parse_fixed_partitions(struct +@@ -86,7 +120,9 @@ static int parse_fixed_partitions(struct return 0; parts = kcalloc(nr_parts, sizeof(*parts), GFP_KERNEL); @@ -60,7 +59,7 @@ return -ENOMEM; i = 0; -@@ -117,12 +152,22 @@ static int parse_fixed_partitions(struct +@@ -135,6 +171,11 @@ static int parse_fixed_partitions(struct if (of_get_property(pp, "lock", &len)) parts[i].mask_flags |= MTD_POWERUP_LOCK; @@ -72,8 +71,9 @@ i++; } - if (!nr_parts) - goto ofpart_none; +@@ -144,6 +185,11 @@ static int parse_fixed_partitions(struct + if (quirks && quirks->post_parse) + quirks->post_parse(master, parts, nr_parts); + if (proot_id) + brnboot_set_active_root_part(parts, part_nodes, nr_parts, proot_id); @@ -83,7 +83,7 @@ *pparts = parts; return nr_parts; -@@ -133,6 +178,7 @@ ofpart_fail: +@@ -154,6 +200,7 @@ ofpart_fail: ofpart_none: of_node_put(pp); kfree(parts); |