summaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/mach-loongson64
diff options
context:
space:
mode:
authorQing Zhang <zhangqing@loongson.cn>2021-03-15 15:49:59 +0800
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2021-03-25 10:44:01 +0100
commit8e2fe0ecfb96d7b1baa9720e36305515c3079e8c (patch)
treee16622c38a8a4ea9724cb3fdd9030599f7c51ece /arch/mips/include/asm/mach-loongson64
parentb1a792601f264df7172a728f1a83a05b6b399dfb (diff)
MIPS: Loongson64: Distinguish firmware dependencies DTB/LEFI
Add DTB boot support, only support Loongson-2K1000 processor for now, determine whether to use the built-in DTB or the DTB from the firmware by checking the range of CKSEG0 and XKPHYS. loongson_fw_interface will be used in the future. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Qing Zhang <zhangqing@loongson.cn> Tested-by: Ming Wang <wangming01@loongson.cn> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/include/asm/mach-loongson64')
-rw-r--r--arch/mips/include/asm/mach-loongson64/loongson.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/mips/include/asm/mach-loongson64/loongson.h b/arch/mips/include/asm/mach-loongson64/loongson.h
index 6189deb188cf..f7c3ab6d724e 100644
--- a/arch/mips/include/asm/mach-loongson64/loongson.h
+++ b/arch/mips/include/asm/mach-loongson64/loongson.h
@@ -12,8 +12,14 @@
#include <linux/irq.h>
#include <boot_param.h>
+enum loongson_fw_interface {
+ LOONGSON_LEFI,
+ LOONGSON_DTB,
+};
+
/* machine-specific boot configuration */
struct loongson_system_configuration {
+ enum loongson_fw_interface fw_interface;
u32 nr_cpus;
u32 nr_nodes;
int cores_per_node;
@@ -41,7 +47,8 @@ extern u32 memsize, highmemsize;
extern const struct plat_smp_ops loongson3_smp_ops;
/* loongson-specific command line, env and memory initialization */
-extern void __init prom_init_env(void);
+extern void __init prom_dtb_init_env(void);
+extern void __init prom_lefi_init_env(void);
extern void __init szmem(unsigned int node);
extern void *loongson_fdt_blob;