523d4bdbfa
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
79 lines
2.2 KiB
Diff
79 lines
2.2 KiB
Diff
From 5dbbcb034eb2c903ac29b5d5e43919c8e75b45be Mon Sep 17 00:00:00 2001
|
|
From: Peter Lemenkov <lemenkov@gmail.com>
|
|
Date: Sun, 17 Oct 2010 12:53:18 +0400
|
|
Subject: [PATCH 12/13] Move arch-checking #ifdef block into header
|
|
|
|
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
|
---
|
|
hwaccess.c | 7 -------
|
|
hwaccess.h | 21 ++++++++-------------
|
|
2 files changed, 8 insertions(+), 20 deletions(-)
|
|
|
|
diff --git a/hwaccess.c b/hwaccess.c
|
|
index e700b67..5fcc83e 100644
|
|
--- a/hwaccess.c
|
|
+++ b/hwaccess.c
|
|
@@ -31,13 +31,6 @@
|
|
#endif
|
|
#include "flash.h"
|
|
|
|
-#if !( defined(__i386__) || \
|
|
- defined(__x86_64__) || defined(__amd64) || \
|
|
- defined (__mips) || defined (__mips__) || defined (_mips) || defined (mips) || \
|
|
- defined(__powerpc__) || defined(__powerpc64__) || defined(__ppc__) || defined(__ppc64__))
|
|
-#error Unknown architecture
|
|
-#endif
|
|
-
|
|
#if defined(__i386__) || defined(__x86_64__)
|
|
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
|
int io_fd;
|
|
diff --git a/hwaccess.h b/hwaccess.h
|
|
index 9fb078f..b166429 100644
|
|
--- a/hwaccess.h
|
|
+++ b/hwaccess.h
|
|
@@ -26,6 +26,13 @@
|
|
|
|
#include "config.h"
|
|
|
|
+#if !( defined(__i386__) || \
|
|
+ defined(__x86_64__) || defined(__amd64) || \
|
|
+ defined (__mips) || defined (__mips__) || defined (_mips) || defined (mips) || \
|
|
+ defined(__powerpc__) || defined(__powerpc64__) || defined(__ppc__) || defined(__ppc64__))
|
|
+#error Unknown architecture
|
|
+#endif
|
|
+
|
|
#if defined (HAVE_SYS_IO_H)
|
|
#include <sys/io.h>
|
|
#endif /* defined (HAVE_SYS_IO_H) */
|
|
@@ -181,7 +188,7 @@ cpu_to_be(64)
|
|
#define off64_t off_t
|
|
#define lseek64 lseek
|
|
#endif
|
|
-#if defined (__sun) && (defined(__i386) || defined(__amd64))
|
|
+#if defined (__sun)
|
|
/* Note different order for outb */
|
|
#define OUTB(x,y) outb(y, x)
|
|
#define OUTW(x,y) outw(y, x)
|
|
@@ -299,18 +306,6 @@ int libpayload_wrmsr(int addr, msr_t msr);
|
|
#define wrmsr libpayload_wrmsr
|
|
#endif
|
|
|
|
-#elif defined(__powerpc__) || defined(__powerpc64__) || defined(__ppc__) || defined(__ppc64__)
|
|
-
|
|
-/* PCI port I/O is not yet implemented on PowerPC. */
|
|
-
|
|
-#elif defined (__mips) || defined (__mips__) || defined (_mips) || defined (mips)
|
|
-
|
|
-/* PCI port I/O is not yet implemented on MIPS. */
|
|
-
|
|
-#else
|
|
-
|
|
-#error Unknown architecture, please check if it supports PCI port IO.
|
|
-
|
|
#endif
|
|
#endif
|
|
|
|
--
|
|
1.7.3.4
|
|
|