]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: Move device-specific ACPI tables to a writer function
authorSimon Glass <sjg@chromium.org>
Wed, 1 Dec 2021 16:03:02 +0000 (09:03 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 25 Jan 2022 18:44:36 +0000 (11:44 -0700)
Move this over to use a writer function, moving the code from the x86
implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/x86/lib/acpi_table.c
lib/acpi/acpi_writer.c

index b7557f7f3fd199b638b31e47dc103283985c9d6d..8275c36ad3159a34082f1e055d6090364c6a158b 100644 (file)
@@ -519,8 +519,6 @@ ACPI_WRITER(5mcfg, "MCFG", acpi_write_mcfg, 0);
 int write_acpi_tables_x86(struct acpi_ctx *ctx,
                          const struct acpi_writer *entry)
 {
-       acpi_write_dev_tables(ctx);
-
        acpi_rsdp_addr = (unsigned long)ctx->rsdp;
        debug("ACPI: done\n");
 
index d2505e6eaa4120134715f2840e14988a3c787cbf..59f951cba45ccd7144550ecb56d6995d9f2d2ea9 100644 (file)
@@ -90,6 +90,18 @@ ulong write_acpi_tables(ulong start_addr)
 
        return addr;
 }
+
+int write_dev_tables(struct acpi_ctx *ctx, const struct acpi_writer *entry)
+{
+       int ret;
+
+       ret = acpi_write_dev_tables(ctx);
+       if (ret)
+               return log_msg_ret("write", ret);
+
+       return 0;
+}
+ACPI_WRITER(8dev, NULL, write_dev_tables, 0);
 #endif /* QEMU */
 
 void acpi_setup_ctx(struct acpi_ctx *ctx, ulong start)