diff options
author | Patrick Rudolph <patrick.rudolph@9elements.com> | 2018-04-18 10:13:32 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-04-20 13:04:14 +0000 |
commit | a626d2748db9a299f68d004f67c700d266ffd719 (patch) | |
tree | 9a9fe7e474399c2b5d2a589e89dd0ba0496fdeb1 /src | |
parent | e56189cfd1d90a2ca13650a9d21ff82cb79ccda8 (diff) | |
download | coreboot-a626d2748db9a299f68d004f67c700d266ffd719.tar.xz |
rules: Define SIMPLE_DEVICE on x86 only
Make sure to define __SIMPLE_DEVICE__ on x86 only, as other platforms
currently doesn't have support for it.
Fixes static.c devicetree compilation on non x86.
Change-Id: I75fb038681a8edf119415705af5da9f999fd8225
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/25721
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/include/rules.h | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/src/include/rules.h b/src/include/rules.h index 0f212318a6..8cb6d86683 100644 --- a/src/include/rules.h +++ b/src/include/rules.h @@ -123,20 +123,6 @@ #define ENV_STRING "UNKNOWN" #endif -/* For pre-DRAM stages and post-CAR always build with simple device model, ie. - * PCI, PNP and CPU functions operate without use of devicetree. The reason - * post-CAR utilizes __SIMPLE_DEVICE__ is for simplicity. Currently there's - * no known requirement that devicetree would be needed during that stage. - * - * For ramstage individual source file may define __SIMPLE_DEVICE__ - * before including any header files to force that particular source - * be built with simple device model. - */ - -#if defined(__PRE_RAM__) || ENV_SMM || ENV_POSTCAR -#define __SIMPLE_DEVICE__ -#endif - /* Define helpers about the current architecture, based on toolchain.inc. */ #if defined(__ARCH_arm__) @@ -250,4 +236,21 @@ #endif +/** + * For pre-DRAM stages and post-CAR always build with simple device model, ie. + * PCI, PNP and CPU functions operate without use of devicetree. The reason + * post-CAR utilizes __SIMPLE_DEVICE__ is for simplicity. Currently there's + * no known requirement that devicetree would be needed during that stage. + * + * For ramstage individual source file may define __SIMPLE_DEVICE__ + * before including any header files to force that particular source + * be built with simple device model. + * + * For now only x86 is supported. + */ + +#if ENV_X86 && (defined(__PRE_RAM__) || ENV_SMM || ENV_POSTCAR) +#define __SIMPLE_DEVICE__ +#endif + #endif /* _RULES_H */ |