staging: erofs: fix warning Comparison to bool
[linux/fpc-iii.git] / arch / mips / loongson64 / common / setup.c
blobbc2da4c140c4b391673eef166d1a7a073c20efc5
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>
12 #include <loongson.h>
14 #ifdef CONFIG_VT
15 #include <linux/console.h>
16 #include <linux/screen_info.h>
17 #endif
19 static void wbflush_loongson(void)
21 asm(".set\tpush\n\t"
22 ".set\tnoreorder\n\t"
23 ".set mips3\n\t"
24 "sync\n\t"
25 "nop\n\t"
26 ".set\tpop\n\t"
27 ".set mips0\n\t");
30 void (*__wbflush)(void) = wbflush_loongson;
31 EXPORT_SYMBOL(__wbflush);
33 void __init plat_mem_setup(void)
35 #ifdef CONFIG_VT
36 #if defined(CONFIG_VGA_CONSOLE)
37 conswitchp = &vga_con;
39 screen_info = (struct screen_info) {
40 .orig_x = 0,
41 .orig_y = 25,
42 .orig_video_cols = 80,
43 .orig_video_lines = 25,
44 .orig_video_isVGA = VIDEO_TYPE_VGAC,
45 .orig_video_points = 16,
47 #elif defined(CONFIG_DUMMY_CONSOLE)
48 conswitchp = &dummy_con;
49 #endif
50 #endif