aboutsummaryrefslogtreecommitdiffstats
path: root/hwaccess.h
diff options
context:
space:
mode:
authorThomas Heijligen <thomas.heijligen@secunet.de>2021-10-12 20:31:45 +0200
committerNico Huber <nico.h@gmx.de>2021-10-15 14:37:20 +0000
commitf42d2f72cccdbcd454a79424fdb998842f7754d6 (patch)
tree3b917ce8e8c06d597e8ebad708120b214f832003 /hwaccess.h
parent1379e54f519234c07b7e0995de84ab782581c552 (diff)
downloadflashrom-f42d2f72cccdbcd454a79424fdb998842f7754d6.tar.gz
flashrom-f42d2f72cccdbcd454a79424fdb998842f7754d6.tar.bz2
flashrom-f42d2f72cccdbcd454a79424fdb998842f7754d6.zip
hwaccess: replace flashrom specific macros by compiler defines
Replace the remaining IS_* macros with the associated compiler defines Change-Id: Ia0f022d12390722816066d292e1878824adc613c Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de> Reviewed-on: https://review.coreboot.org/c/flashrom/+/58280 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'hwaccess.h')
-rw-r--r--hwaccess.h31
1 files changed, 2 insertions, 29 deletions
diff --git a/hwaccess.h b/hwaccess.h
index 5097ac99..56c2d1e5 100644
--- a/hwaccess.h
+++ b/hwaccess.h
@@ -20,8 +20,6 @@
#ifndef __HWACCESS_H__
#define __HWACCESS_H__ 1
-#include "platform.h"
-
#if NEED_PCI == 1
/*
* libpci headers use the variable name "index" which triggers shadowing
@@ -109,8 +107,7 @@ cpu_to_be(64)
#define le_to_cpu32 cpu_to_le32
#define le_to_cpu64 cpu_to_le64
-#if NEED_RAW_ACCESS == 1
-#if IS_X86
+#if NEED_RAW_ACCESS == 1 && (defined (__i386__) || defined (__x86_64__) || defined(__amd64__))
#include "hwaccess_x86_io.h"
@@ -140,31 +137,7 @@ int libpayload_wrmsr(int addr, msr_t msr);
#define wrmsr libpayload_wrmsr
#endif
-#elif IS_PPC
-
-/* PCI port I/O is not yet implemented on PowerPC. */
-
-#elif IS_MIPS
-
-/* PCI port I/O is not yet implemented on MIPS. */
-
-#elif IS_SPARC
-
-/* PCI port I/O is not yet implemented on SPARC. */
-
-#elif IS_ARM
-/* Non memory mapped I/O is not supported on ARM. */
-
-#elif IS_ARC
-
-/* Non memory mapped I/O is not supported on ARC. */
-
-#else
-
-#error Unknown architecture, please check if it supports PCI port IO.
-
-#endif /* IS_* */
-#endif /* NEED_RAW_ACCESS == 1 */
+#endif
#endif /* !__HWACCESS_H__ */