aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2021-03-01 18:12:48 +0100
committerRafał Miłecki <rafal@milecki.pl>2021-03-01 18:18:38 +0100
commit7a7b2fd809809fbd7045bd3dad4fc896a6fef06f (patch)
treecdb775d788642c833eafdd1ce28a7f4dca22c3c5 /target/linux/lantiq
parentc58005a9431b16107d8c6398b9095a5b3bcfcb25 (diff)
downloadupstream-7a7b2fd809809fbd7045bd3dad4fc896a6fef06f.tar.gz
upstream-7a7b2fd809809fbd7045bd3dad4fc896a6fef06f.tar.bz2
upstream-7a7b2fd809809fbd7045bd3dad4fc896a6fef06f.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>
Diffstat (limited to 'target/linux/lantiq')
-rw-r--r--target/linux/lantiq/patches-5.4/0101-find_active_root.patch20
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);