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>
This commit is contained in:
Patrick Rudolph 2018-04-18 10:13:32 +02:00 committed by Patrick Georgi
parent e56189cfd1
commit a626d2748d
1 changed files with 17 additions and 14 deletions

View File

@ -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 */