diff options
author | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2020-03-25 11:55:03 +0800 |
---|---|---|
committer | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2020-03-25 16:07:12 +0100 |
commit | fcecdcd388ea6725ceb66bb3c71f947f98f50966 (patch) | |
tree | 5545b61a36607dfa0748fb030897ced78e8c3038 /arch/mips/loongson64/setup.c | |
parent | 87fcfa7b7fe6bf819033fe827a27f710e38639b5 (diff) |
MIPS: Loongson64: Load built-in dtbs
Load proper dtb according to firmware passed parameters and
CPU PRID.
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Co-developed-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/loongson64/setup.c')
-rw-r--r-- | arch/mips/loongson64/setup.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/mips/loongson64/setup.c b/arch/mips/loongson64/setup.c index 4fd27f4f90ed..6fe3ffffcaa6 100644 --- a/arch/mips/loongson64/setup.c +++ b/arch/mips/loongson64/setup.c @@ -8,9 +8,15 @@ #include <asm/wbflush.h> #include <asm/bootinfo.h> +#include <linux/libfdt.h> +#include <linux/of_fdt.h> + +#include <asm/prom.h> #include <loongson.h> +void *loongson_fdt_blob; + static void wbflush_loongson(void) { asm(".set\tpush\n\t" @@ -27,4 +33,14 @@ EXPORT_SYMBOL(__wbflush); void __init plat_mem_setup(void) { + if (loongson_fdt_blob) + __dt_setup_arch(loongson_fdt_blob); +} + +void __init device_tree_init(void) +{ + if (!initial_boot_params) + return; + + unflatten_and_copy_device_tree(); } |