path: root/spi.c
diff options
authorCarl-Daniel Hailfinger <>2010-05-26 01:45:41 +0000
committerCarl-Daniel Hailfinger <>2010-05-26 01:45:41 +0000
commitcceafa2ad073fe58b10b6f2317cbd36a63d7ccb5 (patch)
treef07a19288da12246cf3da5d886be39915cfc59a5 /spi.c
parent8d341b5ae774bdf8249c68944a77b72b7c4be640 (diff)
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. Corresponding to flashrom svn r1013. Signed-off-by: Carl-Daniel Hailfinger <> Acked-by: Misha Manulis <> Acked-by: Vladimir 'phcoder/φ-coder' Serbinenko <> Acked-by: Uwe Hermann <> Acked-by: Segher Boessenkool <>
Diffstat (limited to 'spi.c')
1 files changed, 2 insertions, 0 deletions
diff --git a/spi.c b/spi.c
index 9bb4687..24696fb 100644
--- a/spi.c
+++ b/spi.c
@@ -42,6 +42,7 @@ const struct spi_programmer spi_programmer[] = {
+#if defined(__i386__) || defined(__x86_64__)
.command = ich_spi_send_command,
.multicommand = ich_spi_send_multicommand,
@@ -84,6 +85,7 @@ const struct spi_programmer spi_programmer[] = {
.write_256 = wbsio_spi_write_1,
#if FT2232_SPI_SUPPORT == 1
OpenPOWER on IntegriCloud