aboutsummaryrefslogtreecommitdiff
path: root/drivers/of/unittest.c
diff options
context:
space:
mode:
authorGravatar Lizhi Hou <lizhi.hou@amd.com> 2023-08-15 10:19:59 -0700
committerGravatar Rob Herring <robh@kernel.org> 2023-08-22 14:56:10 -0500
commit47284862bfc7fd5672e731e827f43f26bdbd155c (patch)
treef9310a19eb66e1c1dc383ca69e74dc4caa0cac23 /drivers/of/unittest.c
parentPCI: Add quirks to generate device tree node for Xilinx Alveo U50 (diff)
downloadlinux-47284862bfc7fd5672e731e827f43f26bdbd155c.tar.gz
linux-47284862bfc7fd5672e731e827f43f26bdbd155c.tar.bz2
linux-47284862bfc7fd5672e731e827f43f26bdbd155c.zip
of: overlay: Extend of_overlay_fdt_apply() to specify the target node
Currently, in an overlay fdt fragment, it needs to specify the exact location in base DT. In another word, when the fdt fragment is generated, the base DT location for the fragment is already known. There is new use case that the base DT location is unknown when fdt fragment is generated. For example, the add-on device provide a fdt overlay with its firmware to describe its downstream devices. Because it is add-on device which can be plugged to different systems, its firmware will not be able to know the overlay location in base DT. Instead, the device driver will load the overlay fdt and apply it to base DT at runtime. In this case, of_overlay_fdt_apply() needs to be extended to specify the target node for device driver to apply overlay fdt. int overlay_fdt_apply(..., struct device_node *base); Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Link: https://lore.kernel.org/r/1692120000-46900-5-git-send-email-lizhi.hou@amd.com Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of/unittest.c')
-rw-r--r--drivers/of/unittest.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 319d2254df9b..b87dca37b5ec 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -3480,7 +3480,8 @@ static int __init overlay_data_apply(const char *overlay_name, int *ovcs_id)
if (!size)
pr_err("no overlay data for %s\n", overlay_name);
- ret = of_overlay_fdt_apply(info->dtbo_begin, size, &info->ovcs_id);
+ ret = of_overlay_fdt_apply(info->dtbo_begin, size, &info->ovcs_id,
+ NULL);
if (ovcs_id)
*ovcs_id = info->ovcs_id;
if (ret < 0)