x86: acpi: Update acpi_fill_csrt() to use acpi_ctx
Update this function to the newer style, so we can avoid passing and
returning an address through this function.
Also move this function out of the x86 code so it can be used by other
archs.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
diff --git a/arch/x86/cpu/tangier/acpi.c b/arch/x86/cpu/tangier/acpi.c
index 1187356..12f9289 100644
--- a/arch/x86/cpu/tangier/acpi.c
+++ b/arch/x86/cpu/tangier/acpi.c
@@ -109,11 +109,14 @@
return grp->length;
}
-u32 acpi_fill_csrt(u32 current)
+int acpi_fill_csrt(struct acpi_ctx *ctx)
{
- current += acpi_fill_csrt_dma((struct acpi_csrt_group *)current);
+ int size;
+
+ size = acpi_fill_csrt_dma(ctx->current);
+ acpi_inc(ctx, size);
- return current;
+ return 0;
}
int acpi_create_gnvs(struct acpi_global_nvs *gnvs)