u-boot/lib/acpi/facs.c
Tom Rini 467382ca03 lib: Remove <common.h> inclusion from these files
After some header file cleanups to add missing include files, remove
common.h from all files in the lib directory. This primarily means just
dropping the line but in a few cases we need to add in other header
files now.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-12-21 08:54:37 -05:00

35 lines
831 B
C

// SPDX-License-Identifier: GPL-2.0+
/*
* Write an ACPI Firmware ACPI Control Structure (FACS) table
*
* Copyright 2021 Google LLC
*/
#define LOG_CATEGORY LOGC_ACPI
#include <acpi/acpi_table.h>
#include <dm/acpi.h>
#include <linux/string.h>
int acpi_write_facs(struct acpi_ctx *ctx, const struct acpi_writer *entry)
{
struct acpi_facs *facs = ctx->current;
memset((void *)facs, '\0', sizeof(struct acpi_facs));
memcpy(facs->signature, "FACS", 4);
facs->length = sizeof(struct acpi_facs);
facs->hardware_signature = 0;
facs->firmware_waking_vector = 0;
facs->global_lock = 0;
facs->flags = 0;
facs->x_firmware_waking_vector_l = 0;
facs->x_firmware_waking_vector_h = 0;
facs->version = 1;
ctx->facs = facs;
acpi_inc(ctx, sizeof(struct acpi_facs));
return 0;
}
ACPI_WRITER(1facs, "FACS", acpi_write_facs, 0);