remove compile guards
The build system handles the decision when to build a file.
Extra compile guards for the source files are not necessary.
Change-Id: I76a76e05c7a7dd27637325ab1e9d8946fd5f9076
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/57797
Original-Reviewed-by: Felix Singer <felixsinger@posteo.net>
Original-Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/72260
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/amd_imc.c b/amd_imc.c
index da0c605..a692199 100644
--- a/amd_imc.c
+++ b/amd_imc.c
@@ -15,8 +15,6 @@
* GNU General Public License for more details.
*/
-#if defined(__i386__) || defined(__x86_64__)
-
#include "flash.h"
#include "programmer.h"
#include "hwaccess.h"
@@ -151,5 +149,3 @@
return ret;
}
-
-#endif
diff --git a/atahpt.c b/atahpt.c
index 660c8f7..5181e2d 100644
--- a/atahpt.c
+++ b/atahpt.c
@@ -14,8 +14,6 @@
* GNU General Public License for more details.
*/
-#if defined(__i386__) || defined(__x86_64__)
-
#include <stdlib.h>
#include <string.h>
#include "flash.h"
@@ -101,7 +99,3 @@
.unmap_flash_region = fallback_unmap,
.delay = internal_delay,
};
-
-#else
-#error PCI port I/O access is not supported on this architecture yet.
-#endif
diff --git a/atapromise.c b/atapromise.c
index 180551b..cd7bca4 100644
--- a/atapromise.c
+++ b/atapromise.c
@@ -14,8 +14,6 @@
* GNU General Public License for more details.
*/
-#if defined(__i386__) || defined(__x86_64__)
-
#include <string.h>
#include <stdlib.h>
#include "flash.h"
@@ -173,7 +171,3 @@
.unmap_flash_region = fallback_unmap,
.delay = internal_delay,
};
-
-#else
-#error PCI port I/O access is not supported on this architecture yet.
-#endif
diff --git a/ft2232_spi.c b/ft2232_spi.c
index 78dbb69..9bd92af 100644
--- a/ft2232_spi.c
+++ b/ft2232_spi.c
@@ -14,8 +14,6 @@
* GNU General Public License for more details.
*/
-#if CONFIG_FT2232_SPI == 1
-
#include <stdbool.h>
#include <stdio.h>
#include <strings.h>
@@ -717,4 +715,3 @@
.unmap_flash_region = fallback_unmap,
.delay = internal_delay,
};
-#endif
diff --git a/ichspi.c b/ichspi.c
index c76b708..6777425 100644
--- a/ichspi.c
+++ b/ichspi.c
@@ -19,8 +19,6 @@
* GNU General Public License for more details.
*/
-#if defined(__i386__) || defined(__x86_64__)
-
#include <string.h>
#include <stdbool.h>
#include <stdlib.h>
@@ -2129,5 +2127,3 @@
return 0;
}
-
-#endif
diff --git a/it87spi.c b/it87spi.c
index 0903911..a81b1c0 100644
--- a/it87spi.c
+++ b/it87spi.c
@@ -19,8 +19,6 @@
* Contains the ITE IT87* SPI specific routines
*/
-#if defined(__i386__) || defined(__x86_64__)
-
#include <string.h>
#include <stdlib.h>
#include <errno.h>
@@ -433,5 +431,3 @@
return 0;
}
-
-#endif
diff --git a/linux_spi.c b/linux_spi.c
index 390038f..b1911fe 100644
--- a/linux_spi.c
+++ b/linux_spi.c
@@ -13,8 +13,6 @@
* GNU General Public License for more details.
*/
-#if CONFIG_LINUX_SPI == 1
-
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -266,5 +264,3 @@
.unmap_flash_region = fallback_unmap,
.delay = internal_delay,
};
-
-#endif // CONFIG_LINUX_SPI == 1
diff --git a/mcp6x_spi.c b/mcp6x_spi.c
index 96d09f4..15122af 100644
--- a/mcp6x_spi.c
+++ b/mcp6x_spi.c
@@ -19,8 +19,6 @@
* created by Michael Karcher.
*/
-#if defined(__i386__) || defined(__x86_64__)
-
#include <stdlib.h>
#include <ctype.h>
#include "flash.h"
@@ -159,5 +157,3 @@
return 0;
}
-
-#endif
diff --git a/mstarddc_spi.c b/mstarddc_spi.c
index cf00898..46bcd32 100644
--- a/mstarddc_spi.c
+++ b/mstarddc_spi.c
@@ -13,8 +13,6 @@
* GNU General Public License for more details.
*/
-#if CONFIG_MSTARDDC_SPI == 1
-
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -237,5 +235,3 @@
.unmap_flash_region = fallback_unmap,
.delay = internal_delay,
};
-
-#endif
diff --git a/nic3com.c b/nic3com.c
index 27e3c57..c03692e 100644
--- a/nic3com.c
+++ b/nic3com.c
@@ -14,8 +14,6 @@
* GNU General Public License for more details.
*/
-#if defined(__i386__) || defined(__x86_64__)
-
#include <stdlib.h>
#include "flash.h"
#include "programmer.h"
@@ -146,7 +144,3 @@
.unmap_flash_region = fallback_unmap,
.delay = internal_delay,
};
-
-#else
-#error PCI port I/O access is not supported on this architecture yet.
-#endif
diff --git a/nicnatsemi.c b/nicnatsemi.c
index 9bb2f4f..b4c3431 100644
--- a/nicnatsemi.c
+++ b/nicnatsemi.c
@@ -14,8 +14,6 @@
* GNU General Public License for more details.
*/
-#if defined(__i386__) || defined(__x86_64__)
-
#include <stdlib.h>
#include "flash.h"
#include "programmer.h"
@@ -113,7 +111,3 @@
.unmap_flash_region = fallback_unmap,
.delay = internal_delay,
};
-
-#else
-#error PCI port I/O access is not supported on this architecture yet.
-#endif
diff --git a/nicrealtek.c b/nicrealtek.c
index 4f39bc3..3957e9f 100644
--- a/nicrealtek.c
+++ b/nicrealtek.c
@@ -14,8 +14,6 @@
* GNU General Public License for more details.
*/
-#if defined(__i386__) || defined(__x86_64__)
-
#include <stdlib.h>
#include "flash.h"
#include "programmer.h"
@@ -135,7 +133,3 @@
.unmap_flash_region = fallback_unmap,
.delay = internal_delay,
};
-
-#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
index 5d224cd..465d565 100644
--- a/rayer_spi.c
+++ b/rayer_spi.c
@@ -22,7 +22,6 @@
* 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>
#include <strings.h>
@@ -290,7 +289,3 @@
.unmap_flash_region = fallback_unmap,
.delay = internal_delay,
};
-
-#else
-#error PCI port I/O access is not supported on this architecture yet.
-#endif
diff --git a/satamv.c b/satamv.c
index 6d7b030..2583e29 100644
--- a/satamv.c
+++ b/satamv.c
@@ -15,7 +15,6 @@
*/
/* Datasheets are not public (yet?) */
-#if defined(__i386__) || defined(__x86_64__)
#include <stdlib.h>
#include "flash.h"
@@ -195,7 +194,3 @@
.unmap_flash_region = fallback_unmap,
.delay = internal_delay,
};
-
-#else
-#error PCI port I/O access is not supported on this architecture yet.
-#endif
diff --git a/sb600spi.c b/sb600spi.c
index 3a1445a..c51f0ce 100644
--- a/sb600spi.c
+++ b/sb600spi.c
@@ -18,8 +18,6 @@
* GNU General Public License for more details.
*/
-#if defined(__i386__) || defined(__x86_64__)
-
#include <stdbool.h>
#include <string.h>
#include <stdlib.h>
@@ -706,5 +704,3 @@
register_spi_master(&spi_master_yangtze, NULL);
return 0;
}
-
-#endif
diff --git a/usbblaster_spi.c b/usbblaster_spi.c
index 8b442db..36105c2 100644
--- a/usbblaster_spi.c
+++ b/usbblaster_spi.c
@@ -30,8 +30,6 @@
* See also the USB-Blaster Download Cable User Guide: http://www.altera.com/literature/ug/ug_usb_blstr.pdf
*/
-#if CONFIG_USBBLASTER_SPI == 1
-
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -223,5 +221,3 @@
.unmap_flash_region = fallback_unmap,
.delay = internal_delay,
};
-
-#endif
diff --git a/wbsio_spi.c b/wbsio_spi.c
index d7c1b0b..dd4bb46 100644
--- a/wbsio_spi.c
+++ b/wbsio_spi.c
@@ -14,8 +14,6 @@
* GNU General Public License for more details.
*/
-#if defined(__i386__) || defined(__x86_64__)
-
#include "flash.h"
#include "chipdrivers.h"
#include "programmer.h"
@@ -202,5 +200,3 @@
mmio_readn((void *)(flash->virtual_memory + start), buf, len);
return 0;
}
-
-#endif