Merge tag 'sched-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / arch / mips / loongson64 / setup.c
blob6fe3ffffcaa6aec783fb2dd8801790038d1f3d1e
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * Copyright (C) 2007 Lemote Inc. & Institute of Computing Technology
4 * Author: Fuxin Zhang, zhangfx@lemote.com
5 */
6 #include <linux/export.h>
7 #include <linux/init.h>
9 #include <asm/wbflush.h>
10 #include <asm/bootinfo.h>
11 #include <linux/libfdt.h>
12 #include <linux/of_fdt.h>
14 #include <asm/prom.h>
16 #include <loongson.h>
18 void *loongson_fdt_blob;
20 static void wbflush_loongson(void)
22 asm(".set\tpush\n\t"
23 ".set\tnoreorder\n\t"
24 ".set mips3\n\t"
25 "sync\n\t"
26 "nop\n\t"
27 ".set\tpop\n\t"
28 ".set mips0\n\t");
31 void (*__wbflush)(void) = wbflush_loongson;
32 EXPORT_SYMBOL(__wbflush);
34 void __init plat_mem_setup(void)
36 if (loongson_fdt_blob)
37 __dt_setup_arch(loongson_fdt_blob);
40 void __init device_tree_init(void)
42 if (!initial_boot_params)
43 return;
45 unflatten_and_copy_device_tree();