diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-11-09 10:55:05 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-11-09 10:55:05 +0100 |
commit | a024d889a02a0c7e1e2406ae0be358906150d713 (patch) | |
tree | e4c35d2991a012d21ef1943f0aa68b660807bed9 /drivers | |
parent | a1fc81a7fdf5088a99b073d656a68dd23f549215 (diff) | |
parent | 416024c9aefb9c484033433d9b051d422f34ce64 (diff) | |
download | barebox-a024d889a02a0c7e1e2406ae0be358906150d713.tar.gz barebox-a024d889a02a0c7e1e2406ae0be358906150d713.tar.xz |
Merge branch 'for-next/state'
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/of/base.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c index 0d8289d5fa..b082f0c656 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -2274,6 +2274,18 @@ char *of_get_reproducible_name(struct device_node *node) return basprintf("[0x%llx]", addr); } + /* + * Special workaround for the of partition binding. In the old binding + * the partitions are directly under the hardware devicenode whereas in + * the new binding the partitions are in an extra subnode with + * "fixed-partitions" compatible. We skip this extra subnode from the + * reproducible name to get the same name for both bindings. + */ + if (node->parent && + of_device_is_compatible(node->parent, "fixed-partitions")) { + node = node->parent; + } + na = of_n_addr_cells(node); offset = of_read_number(reg, na); |