summaryrefslogtreecommitdiffstats
path: root/it87spi.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-05-26 01:45:41 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-05-26 01:45:41 +0000
commitd9b96cae59f6c934bc3e385922e28d35d830adde (patch)
treef07a19288da12246cf3da5d886be39915cfc59a5 /it87spi.c
parent90de5baae4fe664ca81dcd4cd1f6f1b58d6e0f0a (diff)
downloadflashrom-d9b96cae59f6c934bc3e385922e28d35d830adde.zip
flashrom-d9b96cae59f6c934bc3e385922e28d35d830adde.tar.gz
Handle the following architectures in generic flashrom code
- x86/x86_64 (little endian) - PowerPC (big endian) - MIPS (big+little endian) No changes to programmer specific code. This means any drivers with MMIO access will _not_ suddenly start working on big endian systems, but with this patch everything is in place to fix them. Compilation should work on all architectures listed above for all drivers except nic3com and nicrealtek which require PCI Port IO which is x86-only for now. To compile without nic3com and nicrealtek, run make distclean make CONFIG_NIC3COM=no CONFIG_NICREALTEK=no Thanks to Misha Manulis for testing early versions of this patch on PowerPC (big endian) with the satasii programmer. Thanks to Segher Boessenkool for design review and for helping out with compiler tricks and pointing out that we need eieio on PowerPC. Thanks to Vladimir Serbinenko for compile testing on MIPS (little endian) and PowerPC (big endian) and for runtime testing on MIPS (little endian). Thanks to David Daney for compile testing on MIPS (big endian). Thanks to Uwe Hermann for compile and runtime testing on x86_64. DO NOT RUN FLASHROM ON NON-X86 AFTER APPLYING THIS PATCH! This patch only provides the infrastructure, but does not convert any drivers, so flashrom will compile, but it won't do the right thing on non-x86 platforms. Binary file (standard input) matches Corresponding to flashrom svn r1013. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Misha Manulis <misha@manulis.com>
Diffstat (limited to 'it87spi.c')
-rw-r--r--it87spi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/it87spi.c b/it87spi.c
index 0ee7d12..4f413ba 100644
--- a/it87spi.c
+++ b/it87spi.c
@@ -23,6 +23,8 @@
* Contains the ITE IT87* SPI specific routines
*/
+#if defined(__i386__) || defined(__x86_64__)
+
#include <string.h>
#include <stdlib.h>
#include "flash.h"
@@ -351,3 +353,5 @@ int it8716f_spi_chip_write_256(struct flashchip *flash, uint8_t *buf)
return 0;
}
+
+#endif
OpenPOWER on IntegriCloud