mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-09-30 10:11:45 +02:00
x86: Move FADT table to a writer function
Move this table over to use a writer function, for x86 only. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
32af3261f7
commit
138d7ece70
@ -523,13 +523,27 @@ int acpi_write_gnvs(struct acpi_ctx *ctx, const struct acpi_writer *entry)
|
|||||||
}
|
}
|
||||||
ACPI_WRITER(4gnvs, "GNVS", acpi_write_gnvs, 0);
|
ACPI_WRITER(4gnvs, "GNVS", acpi_write_gnvs, 0);
|
||||||
|
|
||||||
|
static int acpi_write_fadt(struct acpi_ctx *ctx,
|
||||||
|
const struct acpi_writer *entry)
|
||||||
|
{
|
||||||
|
struct acpi_fadt *fadt;
|
||||||
|
|
||||||
|
fadt = ctx->current;
|
||||||
|
acpi_create_fadt(fadt, ctx->facs, ctx->dsdt);
|
||||||
|
acpi_add_table(ctx, fadt);
|
||||||
|
|
||||||
|
acpi_inc(ctx, sizeof(struct acpi_fadt));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
ACPI_WRITER(5fact, "FADT", acpi_write_fadt, 0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* QEMU's version of write_acpi_tables is defined in drivers/misc/qfw.c
|
* QEMU's version of write_acpi_tables is defined in drivers/misc/qfw.c
|
||||||
*/
|
*/
|
||||||
int write_acpi_tables_x86(struct acpi_ctx *ctx,
|
int write_acpi_tables_x86(struct acpi_ctx *ctx,
|
||||||
const struct acpi_writer *entry)
|
const struct acpi_writer *entry)
|
||||||
{
|
{
|
||||||
struct acpi_fadt *fadt;
|
|
||||||
struct acpi_table_header *ssdt;
|
struct acpi_table_header *ssdt;
|
||||||
struct acpi_mcfg *mcfg;
|
struct acpi_mcfg *mcfg;
|
||||||
struct acpi_tcpa *tcpa;
|
struct acpi_tcpa *tcpa;
|
||||||
@ -538,12 +552,6 @@ int write_acpi_tables_x86(struct acpi_ctx *ctx,
|
|||||||
struct acpi_spcr *spcr;
|
struct acpi_spcr *spcr;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
debug("ACPI: * FADT\n");
|
|
||||||
fadt = ctx->current;
|
|
||||||
acpi_inc_align(ctx, sizeof(struct acpi_fadt));
|
|
||||||
acpi_create_fadt(fadt, ctx->facs, ctx->dsdt);
|
|
||||||
acpi_add_table(ctx, fadt);
|
|
||||||
|
|
||||||
debug("ACPI: * SSDT\n");
|
debug("ACPI: * SSDT\n");
|
||||||
ssdt = (struct acpi_table_header *)ctx->current;
|
ssdt = (struct acpi_table_header *)ctx->current;
|
||||||
if (!acpi_create_ssdt(ctx, ssdt, OEM_TABLE_ID))
|
if (!acpi_create_ssdt(ctx, ssdt, OEM_TABLE_ID))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user