diff options
Diffstat (limited to 'arch/arm/boards/raspberry-pi/rpi-common.c')
-rw-r--r-- | arch/arm/boards/raspberry-pi/rpi-common.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c index 3ed4510296..319a3d85ea 100644 --- a/arch/arm/boards/raspberry-pi/rpi-common.c +++ b/arch/arm/boards/raspberry-pi/rpi-common.c @@ -256,6 +256,21 @@ static enum reset_src_type rpi_decode_pm_rsts(struct device_node *chosen, return RESET_UKWN; } +static int rpi_vc_fdt_fixup(struct device_node *root, void *data) +{ + const struct device_node *vc_chosen = data; + struct device_node *chosen; + + chosen = of_create_node(root, "/chosen"); + if (!chosen) + return -ENOMEM; + + of_copy_property(vc_chosen, "overlay_prefix", chosen); + of_copy_property(vc_chosen, "os_prefix", chosen); + + return 0; +} + static u32 rpi_boot_mode, rpi_boot_part; /* Extract useful information from the VideoCore FDT we got. * Some parameters are defined here: @@ -289,6 +304,8 @@ static void rpi_vc_fdt_parse(void *fdt) goto out; } + of_register_fixup(rpi_vc_fdt_fixup, of_dup(chosen)); + bootloader = of_find_node_by_name(chosen, "bootloader"); str = of_read_vc_string(chosen, "bootargs"); |