diff options
author | Thomas Heijligen <thomas.heijligen@secunet.de> | 2021-09-26 13:42:39 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2021-09-29 11:31:45 +0000 |
commit | a16f6a549737a0ca1f6b18cb2b62cd39a54e50b6 (patch) | |
tree | f2619a38fa7f96efdfc4a2cf391b96108ec3f9d8 /internal.c | |
parent | 61181a72a4722a1e55ddd22112ce9f8d26794230 (diff) | |
download | flashrom-a16f6a549737a0ca1f6b18cb2b62cd39a54e50b6.tar.gz flashrom-a16f6a549737a0ca1f6b18cb2b62cd39a54e50b6.tar.bz2 flashrom-a16f6a549737a0ca1f6b18cb2b62cd39a54e50b6.zip |
internal.c: unify the macro for x86 only code
The #if defined(__i386__) || defined(__x86_64__) guard is commonly used
for x86 only code across flashrom.
Only platform.h and hwaccess.* use the IS_X86 macro.
Change-Id: I94a599431f58666189c8cd601286e9b30c8bf62b
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/57942
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'internal.c')
-rw-r--r-- | internal.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/internal.c b/internal.c index abd4637aa..b9d17b47a 100644 --- a/internal.c +++ b/internal.c @@ -88,7 +88,7 @@ struct pci_dev *pci_card_find(uint16_t vendor, uint16_t device, return NULL; } -#if IS_X86 +#if defined(__i386__) || defined(__x86_64__) void probe_superio(void) { probe_superio_winbond(); @@ -114,7 +114,7 @@ int register_superio(struct superio s) return 0; } -#endif /* IS_X86 */ +#endif static void internal_chip_writeb(const struct flashctx *flash, uint8_t val, chipaddr addr) @@ -177,7 +177,7 @@ static int internal_init(void) int not_a_laptop = 0; char *board_vendor = NULL; char *board_model = NULL; -#if IS_X86 +#if defined(__i386__) || defined(__x86_64__) const char *cb_vendor = NULL; const char *cb_model = NULL; #endif @@ -269,7 +269,7 @@ static int internal_init(void) goto internal_init_exit; } -#if IS_X86 +#if defined(__i386__) || defined(__x86_64__) if ((cb_parse_table(&cb_vendor, &cb_model) == 0) && (board_vendor != NULL) && (board_model != NULL)) { if (strcasecmp(board_vendor, cb_vendor) || strcasecmp(board_model, cb_model)) { msg_pwarn("Warning: The mainboard IDs set by -p internal:mainboard (%s:%s) do not\n" @@ -298,7 +298,7 @@ static int internal_init(void) * FIXME: Find a replacement for DMI on non-x86. * FIXME: Enable Super I/O probing once port I/O is possible. */ -#endif /* IS_X86 */ +#endif /* Check laptop whitelist. */ board_handle_before_laptop(); @@ -322,7 +322,7 @@ static int internal_init(void) goto internal_init_exit; } -#if IS_X86 +#if defined(__i386__) || defined(__x86_64__) /* Probe unconditionally for ITE Super I/O chips. This enables LPC->SPI translation on IT87* and * parallel writes on IT8705F. Also, this handles the manual chip select for Gigabyte's DualBIOS. */ init_superio_ite(); @@ -332,7 +332,7 @@ static int internal_init(void) ret = 1; goto internal_init_exit; } -#endif /* IS_X86 */ +#endif if (internal_buses_supported & BUS_NONSPI) register_par_master(&par_master_internal, internal_buses_supported, NULL); |