Move this over to use a writer function, moving the code from the x86
implementation.
Signed-off-by: Simon Glass <sjg@chromium.org>
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");
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)