1 --- a/arch/mips/ralink/of.c
2 +++ b/arch/mips/ralink/of.c
3 @@ -81,13 +81,23 @@ extern struct boot_param_header __image_
5 void __init plat_mem_setup(void)
9 set_io_port_base(KSEG1);
12 * Load the builtin devicetree. This causes the chosen node to be
13 - * parsed resulting in our memory appearing
14 + * parsed resulting in our memory appearing. fw_passed_dtb is used
15 + * by CONFIG_MIPS_APPENDED_RAW_DTB as well.
17 - __dt_setup_arch(&__image_dtb);
19 + dtb = (void *)fw_passed_dtb;
20 + else if (__dtb_start != __dtb_end)
21 + dtb = (void *)__dtb_start;
25 + __dt_setup_arch(dtb);
27 of_scan_flat_dt(early_init_dt_find_chosen, NULL);