@@ -21,6 +21,8 @@
#define ACPI_RSDP_REV_ACPI_1_0 0
#define ACPI_RSDP_REV_ACPI_2_0 2
+#if !defined(__ACPI__)
+
/*
* RSDP (Root System Description Pointer)
* Note: ACPI 1.0 didn't have length, xsdt_address, and ext_checksum
@@ -389,6 +391,8 @@ struct __packed acpi_spcr {
u32 reserved2;
};
+#endif /* !__ACPI__*/
+
#include <asm/acpi_table.h>
#endif /* __ACPI_TABLE_H__ */
@@ -22,6 +22,8 @@
/* Length of an ACPI name string including nul terminator */
#define ACPI_NAME_MAX (ACPI_NAME_LEN + 1)
+#if !defined(__ACPI__)
+
/**
* struct acpi_ops - ACPI operations supported by driver model
*/
@@ -70,4 +72,6 @@ int acpi_get_name(const struct udevice *dev, char *out_name);
*/
int acpi_copy_name(char *out_name, const char *name);
+#endif /* __ACPI__ */
+
#endif
@@ -413,8 +413,8 @@ ASL_TMP = $(patsubst %.c,%.asl.tmp,$@)
quiet_cmd_acpi_c_asl= ASL $<
cmd_acpi_c_asl= \
- $(CPP) -x assembler-with-cpp -D__ASSEMBLY__ -P $(UBOOTINCLUDE) \
- -o $(ASL_TMP) $< && \
+ $(CPP) -x assembler-with-cpp -D__ASSEMBLY__ -D__ACPI__ \
+ -P $(UBOOTINCLUDE) -o $(ASL_TMP) $< && \
iasl -p $@ -tc $(ASL_TMP) $(if $(KBUILD_VERBOSE:1=), >/dev/null) && \
mv $(patsubst %.c,%.hex,$@) $@