aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/misc/Kconfig7
-rw-r--r--drivers/misc/qfw.c4
-rw-r--r--lib/acpi/Makefile2
-rw-r--r--lib/acpi/acpi_writer.c4
4 files changed, 12 insertions, 5 deletions
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index ed7ecedd3ac..e8e4400516f 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -540,6 +540,13 @@ config QFW
Hidden option to enable QEMU fw_cfg interface and uclass. This will
be selected by either CONFIG_CMD_QFW or CONFIG_GENERATE_ACPI_TABLE.
+config QFW_ACPI
+ bool
+ default y
+ depends on QFW && GENERATE_ACPI_TABLE && !SANDBOX
+ help
+ Hidden option to read ACPI tables from QEMU.
+
config QFW_PIO
bool
depends on QFW
diff --git a/drivers/misc/qfw.c b/drivers/misc/qfw.c
index e3b6b4cd741..307334faf48 100644
--- a/drivers/misc/qfw.c
+++ b/drivers/misc/qfw.c
@@ -21,7 +21,7 @@
#include <tables_csum.h>
#include <asm/acpi_table.h>
-#if defined(CONFIG_GENERATE_ACPI_TABLE) && !defined(CONFIG_SANDBOX)
+#ifdef QFW_ACPI
/*
* This function allocates memory for ACPI tables
*
@@ -259,7 +259,7 @@ ulong acpi_get_rsdp_addr(void)
file = qfw_find_file(dev, "etc/acpi/rsdp");
return file->addr;
}
-#endif
+#endif /* QFW_ACPI */
static void qfw_read_entry_io(struct qfw_dev *qdev, u16 entry, u32 size,
void *address)
diff --git a/lib/acpi/Makefile b/lib/acpi/Makefile
index c1c9675b5d2..cc2868488a0 100644
--- a/lib/acpi/Makefile
+++ b/lib/acpi/Makefile
@@ -12,7 +12,7 @@ obj-$(CONFIG_$(SPL_)ACPIGEN) += acpi_table.o
obj-y += acpi_writer.o
# With QEMU the ACPI tables come from there, not from U-Boot
-ifndef CONFIG_QEMU
+ifndef CONFIG_QFW_ACPI
obj-y += base.o
obj-y += csrt.o
obj-y += mcfg.o
diff --git a/lib/acpi/acpi_writer.c b/lib/acpi/acpi_writer.c
index a8dc207557b..bbb9b54786d 100644
--- a/lib/acpi/acpi_writer.c
+++ b/lib/acpi/acpi_writer.c
@@ -48,7 +48,7 @@ int acpi_write_one(struct acpi_ctx *ctx, const struct acpi_writer *entry)
return 0;
}
-#ifndef CONFIG_QEMU
+#ifndef CONFIG_QFW_ACPI
static int acpi_write_all(struct acpi_ctx *ctx)
{
const struct acpi_writer *writer =
@@ -115,7 +115,7 @@ ulong acpi_get_rsdp_addr(void)
return map_to_sysmem(gd->acpi_ctx->rsdp);
}
-#endif /* QEMU */
+#endif /* QFW_ACPI */
void acpi_setup_ctx(struct acpi_ctx *ctx, ulong start)
{