aboutsummaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-08-17 04:33:00 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-08-20 01:12:28 +0000
commita4e8fb2afd6ff92e84bd03c55668708e0c5d17df (patch)
treeb2cf6a0211d6e18b675e63956a85b0c6572c462d /src/arch
parent5c82c444fba6fd3cf506c777546a5481755808ff (diff)
arch/non-x86: Remove use of __PRE_RAM__
Change-Id: Id8918f40572497b068509b5d5a490de0435ad50b Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34921 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/arm/include/armv7/arch/cpu.h6
-rw-r--r--src/arch/arm64/include/armv8/arch/cpu.h3
-rw-r--r--src/arch/mips/include/arch/cpu.h7
-rw-r--r--src/arch/ppc64/include/arch/cpu.h8
-rw-r--r--src/arch/riscv/include/arch/cpu.h6
5 files changed, 7 insertions, 23 deletions
diff --git a/src/arch/arm/include/armv7/arch/cpu.h b/src/arch/arm/include/armv7/arch/cpu.h
index 22b3fb443d..55ac5ea8b3 100644
--- a/src/arch/arm/include/armv7/arch/cpu.h
+++ b/src/arch/arm/include/armv7/arch/cpu.h
@@ -17,12 +17,10 @@
#define __ARCH_CPU_H__
#include <stdint.h>
+#include <device/device.h>
#define asmlinkage
-#if !defined(__PRE_RAM__)
-#include <device/device.h>
-
struct cpu_driver {
struct device_operations *ops;
const struct cpu_device_id *id_table;
@@ -34,8 +32,6 @@ struct cpuinfo_arm {
uint8_t arm_model;
};
-#endif
-
/* Primitives for CPU and MP cores. */
/* read Main Id register (MIDR) */
diff --git a/src/arch/arm64/include/armv8/arch/cpu.h b/src/arch/arm64/include/armv8/arch/cpu.h
index 6e096cc8e6..9dc9208b48 100644
--- a/src/arch/arm64/include/armv8/arch/cpu.h
+++ b/src/arch/arm64/include/armv8/arch/cpu.h
@@ -20,9 +20,6 @@
static inline unsigned int smp_processor_id(void) { return 0; }
-
-#if !defined(__PRE_RAM__)
struct cpu_driver { };
-#endif
#endif /* __ARCH_CPU_H__ */
diff --git a/src/arch/mips/include/arch/cpu.h b/src/arch/mips/include/arch/cpu.h
index 8e35908e4c..28f026112b 100644
--- a/src/arch/mips/include/arch/cpu.h
+++ b/src/arch/mips/include/arch/cpu.h
@@ -16,12 +16,10 @@
#ifndef __MIPS_ARCH_CPU_H
#define __MIPS_ARCH_CPU_H
-#define asmlinkage
-
-#ifndef __PRE_RAM__
-
#include <device/device.h>
+#define asmlinkage
+
struct cpu_driver {
struct device_operations *ops;
const struct cpu_device_id *id_table;
@@ -34,7 +32,6 @@ struct cpu_info {
unsigned long index;
};
-#endif /* !__PRE_RAM__ */
/***************************************************************************
* The following section was copied from arch/mips/include/asm/mipsregs.h in
diff --git a/src/arch/ppc64/include/arch/cpu.h b/src/arch/ppc64/include/arch/cpu.h
index 1e13528037..23bc9a17f5 100644
--- a/src/arch/ppc64/include/arch/cpu.h
+++ b/src/arch/ppc64/include/arch/cpu.h
@@ -16,11 +16,10 @@
#ifndef __ARCH_CPU_H__
#define __ARCH_CPU_H__
-#define asmlinkage
-
-#if !defined(__PRE_RAM__)
#include <device/device.h>
+#define asmlinkage
+
struct cpu_driver {
struct device_operations *ops;
const struct cpu_device_id *id_table;
@@ -42,7 +41,6 @@ struct cpuinfo_ppc64 {
uint8_t ppc64_model;
};
-#endif
-
struct cpu_info *cpu_info(void);
+
#endif /* __ARCH_CPU_H__ */
diff --git a/src/arch/riscv/include/arch/cpu.h b/src/arch/riscv/include/arch/cpu.h
index 547cb76a04..c62199e3f0 100644
--- a/src/arch/riscv/include/arch/cpu.h
+++ b/src/arch/riscv/include/arch/cpu.h
@@ -17,12 +17,10 @@
#define __ARCH_CPU_H__
#include <arch/encoding.h>
+#include <device/device.h>
#define asmlinkage
-#if !defined(__PRE_RAM__)
-#include <device/device.h>
-
struct cpu_driver {
struct device_operations *ops;
const struct cpu_device_id *id_table;
@@ -44,8 +42,6 @@ struct cpuinfo_riscv {
uint8_t riscv_model;
};
-#endif
-
static inline int supports_extension(char ext)
{
return read_csr(misa) & (1 << (ext - 'A'));