2010-10-26 08:31:54 +00:00
|
|
|
From: Peter Lemenkov <lemenkov@gmail.com>
|
|
|
|
Date: Sat, 18 Sep 2010 09:40:01 +0400
|
2014-09-11 18:48:16 +00:00
|
|
|
Subject: [PATCH] Kill some x86-related ifdefs in code - this is now controlled
|
|
|
|
via autotools
|
2010-10-26 08:31:54 +00:00
|
|
|
|
|
|
|
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
|
|
|
|
2013-07-30 13:07:08 +00:00
|
|
|
diff --git a/amd_imc.c b/amd_imc.c
|
|
|
|
index b05390c..9aabe3f 100644
|
|
|
|
--- a/amd_imc.c
|
|
|
|
+++ b/amd_imc.c
|
|
|
|
@@ -19,8 +19,6 @@
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
-#if defined(__i386__) || defined(__x86_64__)
|
|
|
|
-
|
|
|
|
#include "flash.h"
|
|
|
|
#include "programmer.h"
|
|
|
|
#include "hwaccess.h"
|
|
|
|
@@ -155,5 +153,3 @@ int amd_imc_shutdown(struct pci_dev *dev)
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
-
|
|
|
|
-#endif
|
2011-08-12 18:44:38 +00:00
|
|
|
diff --git a/atahpt.c b/atahpt.c
|
2014-09-11 18:48:16 +00:00
|
|
|
index 5966be8..03627f4 100644
|
2011-08-12 18:44:38 +00:00
|
|
|
--- a/atahpt.c
|
|
|
|
+++ b/atahpt.c
|
|
|
|
@@ -18,8 +18,6 @@
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
-#if defined(__i386__) || defined(__x86_64__)
|
|
|
|
-
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include "flash.h"
|
2014-09-11 18:48:16 +00:00
|
|
|
@@ -97,7 +95,3 @@ static uint8_t atahpt_chip_readb(const struct flashctx *flash,
|
2011-08-12 18:44:38 +00:00
|
|
|
OUTL((uint32_t)addr, io_base_addr + BIOS_ROM_ADDR);
|
|
|
|
return INB(io_base_addr + BIOS_ROM_DATA);
|
|
|
|
}
|
|
|
|
-
|
|
|
|
-#else
|
|
|
|
-#error PCI port I/O access is not supported on this architecture yet.
|
|
|
|
-#endif
|
2014-09-11 18:48:16 +00:00
|
|
|
diff --git a/dmi.c b/dmi.c
|
|
|
|
index 093b9a2..a37edea 100644
|
|
|
|
--- a/dmi.c
|
|
|
|
+++ b/dmi.c
|
|
|
|
@@ -30,8 +30,6 @@
|
|
|
|
#include "flash.h"
|
|
|
|
#include "programmer.h"
|
|
|
|
|
|
|
|
-#if defined(__i386__) || defined(__x86_64__)
|
|
|
|
-
|
|
|
|
/* Enable SMBIOS decoding. Currently legacy DMI decoding is enough. */
|
|
|
|
#define SM_SUPPORT 0
|
|
|
|
|
|
|
|
@@ -482,5 +480,3 @@ int dmi_match(const char *pattern)
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
-
|
|
|
|
-#endif // defined(__i386__) || defined(__x86_64__)
|
2011-10-21 13:38:55 +00:00
|
|
|
diff --git a/ich_descriptors.c b/ich_descriptors.c
|
2014-09-11 18:48:16 +00:00
|
|
|
index 1966f66..0e7675a 100644
|
2011-10-21 13:38:55 +00:00
|
|
|
--- a/ich_descriptors.c
|
|
|
|
+++ b/ich_descriptors.c
|
|
|
|
@@ -19,8 +19,6 @@
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
-#if defined(__i386__) || defined(__x86_64__)
|
|
|
|
-
|
|
|
|
#include "ich_descriptors.h"
|
2012-02-02 11:18:14 +00:00
|
|
|
|
|
|
|
#ifdef ICH_DESCRIPTORS_FROM_DUMP
|
2014-09-11 18:48:16 +00:00
|
|
|
@@ -923,4 +921,3 @@ int read_ich_descriptors_via_fdo(void *spibar, struct ich_descriptors *desc)
|
2011-10-21 13:38:55 +00:00
|
|
|
return ICH_RET_OK;
|
|
|
|
}
|
2012-02-02 11:18:14 +00:00
|
|
|
#endif /* ICH_DESCRIPTORS_FROM_DUMP */
|
2011-10-21 13:38:55 +00:00
|
|
|
-#endif /* defined(__i386__) || defined(__x86_64__) */
|
|
|
|
diff --git a/ich_descriptors.h b/ich_descriptors.h
|
2014-09-11 18:48:16 +00:00
|
|
|
index c41f9d9..056e6e4 100644
|
2011-10-21 13:38:55 +00:00
|
|
|
--- a/ich_descriptors.h
|
|
|
|
+++ b/ich_descriptors.h
|
|
|
|
@@ -19,7 +19,6 @@
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
-#if defined(__i386__) || defined(__x86_64__)
|
|
|
|
#ifndef __ICH_DESCRIPTORS_H__
|
|
|
|
#define __ICH_DESCRIPTORS_H__ 1
|
|
|
|
|
2014-09-11 18:48:16 +00:00
|
|
|
@@ -599,4 +598,3 @@ int getFCBA_component_density(enum ich_chipset cs, const struct ich_descriptors
|
2011-10-21 13:38:55 +00:00
|
|
|
|
2012-02-02 11:18:14 +00:00
|
|
|
#endif /* ICH_DESCRIPTORS_FROM_DUMP */
|
2011-10-21 13:38:55 +00:00
|
|
|
#endif /* __ICH_DESCRIPTORS_H__ */
|
|
|
|
-#endif /* defined(__i386__) || defined(__x86_64__) */
|
2010-10-26 08:31:54 +00:00
|
|
|
diff --git a/ichspi.c b/ichspi.c
|
2014-09-11 18:48:16 +00:00
|
|
|
index 0cd9c68..b7cc882 100644
|
2010-10-26 08:31:54 +00:00
|
|
|
--- a/ichspi.c
|
|
|
|
+++ b/ichspi.c
|
2011-08-12 18:44:38 +00:00
|
|
|
@@ -23,8 +23,6 @@
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
2010-10-26 08:31:54 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
-#if defined(__i386__) || defined(__x86_64__)
|
|
|
|
-
|
|
|
|
#include <string.h>
|
2011-10-21 13:38:55 +00:00
|
|
|
#include <stdlib.h>
|
2010-10-26 08:31:54 +00:00
|
|
|
#include "flash.h"
|
2014-09-11 18:48:16 +00:00
|
|
|
@@ -1877,5 +1875,3 @@ int via_init_spi(struct pci_dev *dev, uint32_t mmio_base)
|
2010-10-26 08:31:54 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
-
|
|
|
|
-#endif
|
2011-03-09 11:11:12 +00:00
|
|
|
diff --git a/it85spi.c b/it85spi.c
|
2014-09-11 18:48:16 +00:00
|
|
|
index 1cc8730..55783ac 100644
|
2011-03-09 11:11:12 +00:00
|
|
|
--- a/it85spi.c
|
|
|
|
+++ b/it85spi.c
|
|
|
|
@@ -24,8 +24,6 @@
|
|
|
|
* Contains the ITE IT85* SPI specific routines
|
|
|
|
*/
|
|
|
|
|
|
|
|
-#if defined(__i386__) || defined(__x86_64__)
|
|
|
|
-
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2014-09-11 18:48:16 +00:00
|
|
|
@@ -373,5 +371,3 @@ static int it85xx_spi_send_command(struct flashctx *flash,
|
2011-05-14 14:03:39 +00:00
|
|
|
|
|
|
|
return 0;
|
2011-03-09 11:11:12 +00:00
|
|
|
}
|
|
|
|
-
|
|
|
|
-#endif
|
2010-10-26 08:31:54 +00:00
|
|
|
diff --git a/it87spi.c b/it87spi.c
|
2014-09-11 18:48:16 +00:00
|
|
|
index 0a1e894..1218b41 100644
|
2010-10-26 08:31:54 +00:00
|
|
|
--- a/it87spi.c
|
|
|
|
+++ b/it87spi.c
|
|
|
|
@@ -23,8 +23,6 @@
|
|
|
|
* Contains the ITE IT87* SPI specific routines
|
|
|
|
*/
|
|
|
|
|
|
|
|
-#if defined(__i386__) || defined(__x86_64__)
|
|
|
|
-
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdlib.h>
|
2014-09-11 18:48:16 +00:00
|
|
|
#include <errno.h>
|
|
|
|
@@ -434,5 +432,3 @@ static int it8716f_spi_chip_write_256(struct flashctx *flash, const uint8_t *buf
|
2010-10-26 08:31:54 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
-
|
|
|
|
-#endif
|
|
|
|
diff --git a/mcp6x_spi.c b/mcp6x_spi.c
|
2014-09-11 18:48:16 +00:00
|
|
|
index 38e9a8b..eb6bcd3 100644
|
2010-10-26 08:31:54 +00:00
|
|
|
--- a/mcp6x_spi.c
|
|
|
|
+++ b/mcp6x_spi.c
|
|
|
|
@@ -23,8 +23,6 @@
|
|
|
|
* created by Michael Karcher.
|
|
|
|
*/
|
|
|
|
|
|
|
|
-#if defined(__i386__) || defined(__x86_64__)
|
|
|
|
-
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
#include "flash.h"
|
2014-09-11 18:48:16 +00:00
|
|
|
@@ -164,5 +162,3 @@ int mcp6x_spi_init(int want_spi)
|
2010-10-26 08:31:54 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
-
|
|
|
|
-#endif
|
|
|
|
diff --git a/nic3com.c b/nic3com.c
|
2014-09-11 18:48:16 +00:00
|
|
|
index 4d4702a..1e10325 100644
|
2010-10-26 08:31:54 +00:00
|
|
|
--- a/nic3com.c
|
|
|
|
+++ b/nic3com.c
|
|
|
|
@@ -18,8 +18,6 @@
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
-#if defined(__i386__) || defined(__x86_64__)
|
|
|
|
-
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include "flash.h"
|
|
|
|
#include "programmer.h"
|
2014-09-11 18:48:16 +00:00
|
|
|
@@ -142,7 +140,3 @@ static uint8_t nic3com_chip_readb(const struct flashctx *flash,
|
2010-10-26 08:31:54 +00:00
|
|
|
OUTL((uint32_t)addr, io_base_addr + BIOS_ROM_ADDR);
|
|
|
|
return INB(io_base_addr + BIOS_ROM_DATA);
|
|
|
|
}
|
|
|
|
-
|
|
|
|
-#else
|
|
|
|
-#error PCI port I/O access is not supported on this architecture yet.
|
|
|
|
-#endif
|
|
|
|
diff --git a/nicnatsemi.c b/nicnatsemi.c
|
2014-09-11 18:48:16 +00:00
|
|
|
index ce22c94..3d11f28 100644
|
2010-10-26 08:31:54 +00:00
|
|
|
--- a/nicnatsemi.c
|
|
|
|
+++ b/nicnatsemi.c
|
|
|
|
@@ -18,8 +18,6 @@
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
-#if defined(__i386__) || defined(__x86_64__)
|
|
|
|
-
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include "flash.h"
|
|
|
|
#include "programmer.h"
|
2014-09-11 18:48:16 +00:00
|
|
|
@@ -109,7 +107,3 @@ static uint8_t nicnatsemi_chip_readb(const struct flashctx *flash,
|
2010-10-26 08:31:54 +00:00
|
|
|
*/
|
|
|
|
return INB(io_base_addr + BOOT_ROM_DATA);
|
|
|
|
}
|
|
|
|
-
|
|
|
|
-#else
|
|
|
|
-#error PCI port I/O access is not supported on this architecture yet.
|
|
|
|
-#endif
|
|
|
|
diff --git a/nicrealtek.c b/nicrealtek.c
|
2014-09-11 18:48:16 +00:00
|
|
|
index 07910a8..1f52c42 100644
|
2010-10-26 08:31:54 +00:00
|
|
|
--- a/nicrealtek.c
|
|
|
|
+++ b/nicrealtek.c
|
|
|
|
@@ -18,8 +18,6 @@
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
-#if defined(__i386__) || defined(__x86_64__)
|
|
|
|
-
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include "flash.h"
|
|
|
|
#include "programmer.h"
|
2014-09-11 18:48:16 +00:00
|
|
|
@@ -132,7 +130,3 @@ static uint8_t nicrealtek_chip_readb(const struct flashctx *flash, const chipadd
|
2010-10-26 08:31:54 +00:00
|
|
|
|
|
|
|
return val;
|
|
|
|
}
|
|
|
|
-
|
|
|
|
-#else
|
|
|
|
-#error PCI port I/O access is not supported on this architecture yet.
|
|
|
|
-#endif
|
|
|
|
diff --git a/rayer_spi.c b/rayer_spi.c
|
2014-09-11 18:48:16 +00:00
|
|
|
index 4f1eee4..f8448eb 100644
|
2010-10-26 08:31:54 +00:00
|
|
|
--- a/rayer_spi.c
|
|
|
|
+++ b/rayer_spi.c
|
2014-09-11 18:48:16 +00:00
|
|
|
@@ -26,7 +26,6 @@
|
2010-10-26 08:31:54 +00:00
|
|
|
* most OS parport drivers will perform many unnecessary accesses although
|
|
|
|
* this driver just treats the parallel port as a GPIO set.
|
|
|
|
*/
|
|
|
|
-#if defined(__i386__) || defined(__x86_64__)
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
2012-09-08 14:14:28 +00:00
|
|
|
#include <strings.h>
|
2014-09-11 18:48:16 +00:00
|
|
|
@@ -276,7 +275,3 @@ static int dlc5_shutdown(void *data) {
|
|
|
|
OUTB(lpt_outbyte, lpt_iobase);
|
2010-10-26 08:31:54 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
-
|
|
|
|
-#else
|
|
|
|
-#error PCI port I/O access is not supported on this architecture yet.
|
2011-08-12 18:44:38 +00:00
|
|
|
-#endif
|
|
|
|
diff --git a/satamv.c b/satamv.c
|
2014-09-11 18:48:16 +00:00
|
|
|
index e76d126..ce83c2e 100644
|
2011-08-12 18:44:38 +00:00
|
|
|
--- a/satamv.c
|
|
|
|
+++ b/satamv.c
|
|
|
|
@@ -19,7 +19,6 @@
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Datasheets are not public (yet?) */
|
|
|
|
-#if defined(__i386__) || defined(__x86_64__)
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include "flash.h"
|
2014-09-11 18:48:16 +00:00
|
|
|
@@ -191,7 +190,3 @@ static uint8_t satamv_chip_readb(const struct flashctx *flash,
|
2011-08-12 18:44:38 +00:00
|
|
|
{
|
|
|
|
return satamv_indirect_chip_readb(addr);
|
|
|
|
}
|
|
|
|
-
|
|
|
|
-#else
|
|
|
|
-#error PCI port I/O access is not supported on this architecture yet.
|
2010-10-26 08:31:54 +00:00
|
|
|
-#endif
|
|
|
|
diff --git a/sb600spi.c b/sb600spi.c
|
2014-09-11 18:48:16 +00:00
|
|
|
index 69fad65..f909aec 100644
|
2010-10-26 08:31:54 +00:00
|
|
|
--- a/sb600spi.c
|
|
|
|
+++ b/sb600spi.c
|
2014-09-11 18:48:16 +00:00
|
|
|
@@ -22,8 +22,6 @@
|
2010-10-26 08:31:54 +00:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
-#if defined(__i386__) || defined(__x86_64__)
|
|
|
|
-
|
2013-07-30 13:07:08 +00:00
|
|
|
#include <string.h>
|
|
|
|
#include <stdlib.h>
|
2010-10-26 08:31:54 +00:00
|
|
|
#include "flash.h"
|
2014-09-11 18:48:16 +00:00
|
|
|
@@ -695,5 +693,3 @@ int sb600_probe_spi(struct pci_dev *dev)
|
|
|
|
register_spi_master(&spi_master_yangtze);
|
2010-10-26 08:31:54 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
-
|
|
|
|
-#endif
|
|
|
|
diff --git a/wbsio_spi.c b/wbsio_spi.c
|
2014-09-11 18:48:16 +00:00
|
|
|
index 0eeeb9b..050e2e7 100644
|
2010-10-26 08:31:54 +00:00
|
|
|
--- a/wbsio_spi.c
|
|
|
|
+++ b/wbsio_spi.c
|
|
|
|
@@ -18,8 +18,6 @@
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
-#if defined(__i386__) || defined(__x86_64__)
|
|
|
|
-
|
|
|
|
#include "flash.h"
|
|
|
|
#include "chipdrivers.h"
|
|
|
|
#include "programmer.h"
|
2012-09-08 14:14:28 +00:00
|
|
|
@@ -207,5 +205,3 @@ static int wbsio_spi_read(struct flashctx *flash, uint8_t *buf,
|
2012-03-31 17:16:30 +00:00
|
|
|
mmio_readn((void *)(flash->virtual_memory + start), buf, len);
|
|
|
|
return 0;
|
2010-10-26 08:31:54 +00:00
|
|
|
}
|
|
|
|
-
|
|
|
|
-#endif
|