From 7336f97debc883d293e4d5f942c556d1f8931842 Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Mon, 8 Jun 2020 06:05:03 +0300 Subject: treewide: Replace CONFIG(ARCH_xx) tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Once we support building stages for different architectures, such CONFIG(ARCH_xx) tests do not evaluate correctly anymore. Change-Id: I599995b3ed5c4dfd578c87067fe8bfc8c75b9d43 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/42183 Reviewed-by: Raul Rangel Reviewed-by: Furquan Shaikh Reviewed-by: Angel Pons Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/device/device.c | 4 ++-- src/device/oprom/include/io.h | 2 +- src/device/oprom/yabel/compat/functions.c | 2 +- src/device/oprom/yabel/device.h | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/device') diff --git a/src/device/device.c b/src/device/device.c index c54a345eeb..ffdfeac22c 100644 --- a/src/device/device.c +++ b/src/device/device.c @@ -12,7 +12,7 @@ #include #include #include -#if CONFIG(ARCH_X86) +#if ENV_X86 #include #endif #include @@ -566,7 +566,7 @@ void dev_initialize(void) printk(BIOS_INFO, "Initializing devices...\n"); -#if CONFIG(ARCH_X86) +#if ENV_X86 /* Ensure EBDA is prepared before Option ROMs. */ setup_default_ebda(); #endif diff --git a/src/device/oprom/include/io.h b/src/device/oprom/include/io.h index bcdde48c11..3bf23166ac 100644 --- a/src/device/oprom/include/io.h +++ b/src/device/oprom/include/io.h @@ -3,7 +3,7 @@ #ifndef __OPROM_IO_H__ #define __OPROM_IO_H__ -#if CONFIG(ARCH_X86) +#if ENV_X86 #include #else void outb(u8 val, u16 port); diff --git a/src/device/oprom/yabel/compat/functions.c b/src/device/oprom/yabel/compat/functions.c index c9e2e4c60a..5856597369 100644 --- a/src/device/oprom/yabel/compat/functions.c +++ b/src/device/oprom/yabel/compat/functions.c @@ -72,7 +72,7 @@ unsigned long tb_freq = 0; u64 get_time(void) { u64 act = 0; -#if CONFIG(ARCH_X86) +#if ENV_X86 u32 eax, edx; __asm__ __volatile__( diff --git a/src/device/oprom/yabel/device.h b/src/device/oprom/yabel/device.h index 4f28a59dfa..0fe9e00abe 100644 --- a/src/device/oprom/yabel/device.h +++ b/src/device/oprom/yabel/device.h @@ -151,7 +151,7 @@ u8 biosemu_dev_translate_address(int type, unsigned long * addr); static inline void out32le(void *addr, u32 val) { -#if CONFIG(ARCH_X86) || CONFIG(ARCH_ARM) +#if ENV_X86 || ENV_ARM || ENV_ARM64 *((u32*) addr) = cpu_to_le32(val); #else asm volatile ("stwbrx %0, 0, %1"::"r" (val), "r"(addr)); @@ -162,7 +162,7 @@ static inline u32 in32le(void *addr) { u32 val; -#if CONFIG(ARCH_X86) || CONFIG(ARCH_ARM) +#if ENV_X86 || ENV_ARM || ENV_ARM64 val = cpu_to_le32(*((u32 *) addr)); #else asm volatile ("lwbrx %0, 0, %1":"=r" (val):"r"(addr)); @@ -173,7 +173,7 @@ in32le(void *addr) static inline void out16le(void *addr, u16 val) { -#if CONFIG(ARCH_X86) || CONFIG(ARCH_ARM) +#if ENV_X86 || ENV_ARM || ENV_ARM64 *((u16*) addr) = cpu_to_le16(val); #else asm volatile ("sthbrx %0, 0, %1"::"r" (val), "r"(addr)); @@ -184,7 +184,7 @@ static inline u16 in16le(void *addr) { u16 val; -#if CONFIG(ARCH_X86) || CONFIG(ARCH_ARM) +#if ENV_X86 || ENV_ARM || ENV_ARM64 val = cpu_to_le16(*((u16*) addr)); #else asm volatile ("lhbrx %0, 0, %1":"=r" (val):"r"(addr)); -- cgit v1.2.3