forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-09-20 a36159eec6ca17402b0e146b86efaf76568dc353
kernel/arch/mips/include/asm/dec/prom.h
....@@ -1,14 +1,10 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * include/asm-mips/dec/prom.h
34 *
45 * DECstation PROM interface.
56 *
67 * Copyright (C) 2002 Maciej W. Rozycki
7
- *
8
- * This program is free software; you can redistribute it and/or
9
- * modify it under the terms of the GNU General Public License
10
- * as published by the Free Software Foundation; either version
11
- * 2 of the License, or (at your option) any later version.
128 *
139 * Based on arch/mips/dec/prom/prom.h by the Anonymous.
1410 */
....@@ -47,16 +43,11 @@
4743 */
4844 #define REX_PROM_MAGIC 0x30464354
4945
50
-#ifdef CONFIG_64BIT
51
-
52
-#define prom_is_rex(magic) 1 /* KN04 and KN05 are REX PROMs. */
53
-
54
-#else /* !CONFIG_64BIT */
55
-
56
-#define prom_is_rex(magic) ((magic) == REX_PROM_MAGIC)
57
-
58
-#endif /* !CONFIG_64BIT */
59
-
46
+/* KN04 and KN05 are REX PROMs, so only do the check for R3k systems. */
47
+static inline bool prom_is_rex(u32 magic)
48
+{
49
+ return !IS_ENABLED(CONFIG_CPU_R3000) || magic == REX_PROM_MAGIC;
50
+}
6051
6152 /*
6253 * 3MIN/MAXINE PROM entry points for DS5000/1xx's, DS5000/xx's and
....@@ -79,7 +70,7 @@
7970 */
8071 typedef struct {
8172 int pagesize;
82
- unsigned char bitmap[0];
73
+ unsigned char bitmap[];
8374 } memmap;
8475
8576