| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * include/asm-mips/dec/prom.h |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * DECstation PROM interface. |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * 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. |
|---|
| 12 | 8 | * |
|---|
| 13 | 9 | * Based on arch/mips/dec/prom/prom.h by the Anonymous. |
|---|
| 14 | 10 | */ |
|---|
| .. | .. |
|---|
| 47 | 43 | */ |
|---|
| 48 | 44 | #define REX_PROM_MAGIC 0x30464354 |
|---|
| 49 | 45 | |
|---|
| 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 | +} |
|---|
| 60 | 51 | |
|---|
| 61 | 52 | /* |
|---|
| 62 | 53 | * 3MIN/MAXINE PROM entry points for DS5000/1xx's, DS5000/xx's and |
|---|