aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-12-01 09:03:01 -0700
committerSimon Glass <sjg@chromium.org>2022-01-25 11:44:36 -0700
commit78031ad43168d13de5c9ecf72877e8d5d35f749a (patch)
treeeec6e0cbe10e9519c6faddeef213284f92125d1e /arch
parent85b8161b141070e5c7515edb38424ea48f023d04 (diff)
downloadu-boot-78031ad43168d13de5c9ecf72877e8d5d35f749a.zip
u-boot-78031ad43168d13de5c9ecf72877e8d5d35f749a.tar.gz
u-boot-78031ad43168d13de5c9ecf72877e8d5d35f749a.tar.bz2
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/cpu/tangier/acpi.c9
-rw-r--r--arch/x86/include/asm/acpi_table.h1
2 files changed, 6 insertions, 4 deletions
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 @@ static u32 acpi_fill_csrt_dma(struct acpi_csrt_group *grp)
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;
- return current;
+ size = acpi_fill_csrt_dma(ctx->current);
+ acpi_inc(ctx, size);
+
+ return 0;
}
int acpi_create_gnvs(struct acpi_global_nvs *gnvs)
diff --git a/arch/x86/include/asm/acpi_table.h b/arch/x86/include/asm/acpi_table.h
index fb60f85..0d07f7c 100644
--- a/arch/x86/include/asm/acpi_table.h
+++ b/arch/x86/include/asm/acpi_table.h
@@ -35,7 +35,6 @@ u32 acpi_fill_madt(u32 current);
int acpi_create_mcfg_mmconfig(struct acpi_mcfg_mmconfig *mmconfig, u32 base,
u16 seg_nr, u8 start, u8 end);
u32 acpi_fill_mcfg(u32 current);
-u32 acpi_fill_csrt(u32 current);
/**
* acpi_write_hpet() - Write out a HPET table