diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2022-12-08 20:42:02 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-12-13 15:23:37 +0000 |
commit | acf96dfcdc0ea73c416a4d598bdaeaf55e88bc4c (patch) | |
tree | e7cdb367c0d347ae06900bfceeacc6787cdb23b6 /src/include | |
parent | 3cd89a003ba65b7b9a58300714a135d6532fd30c (diff) |
include/gpio: skip everything but soc/gpio.h include in ASM & ACPI cases
When gpio.h gets directly or indirectly included in the DSDT ar an
assembly file, everything but the preprocessor defines for the GPIOs
shouldn't be included to keep IASL or the assembler happy.
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I046ed87d3947ba5b1fcd0bdd4cffcda57bc13404
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70509
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gpio.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/gpio.h b/src/include/gpio.h index db8776a417..daf602977d 100644 --- a/src/include/gpio.h +++ b/src/include/gpio.h @@ -4,6 +4,9 @@ #define __SRC_INCLUDE_GPIO_H__ #include <soc/gpio.h> /* IWYU pragma: export */ + +#ifndef __ASSEMBLER__ /* __ASSEMBLER__ also covers __ACPI__ case */ + #include <types.h> /* <soc/gpio.h> must typedef a gpio_t that fits in 32 bits. */ @@ -96,4 +99,6 @@ static inline uint32_t gpio_binary_first_base3_value(const gpio_t gpio[], return _gpio_base3_value(gpio, num_gpio, 1); } +#endif /* !__ASSEMBLER__ */ + #endif /* __SRC_INCLUDE_GPIO_H__ */ |