[PATCH v6 12/29] dm: core: Add basic ACPI support
Bin Meng
bmeng.cn at gmail.com
Thu Apr 16 07:46:00 CEST 2020
On Fri, Apr 10, 2020 at 12:28 AM Simon Glass <sjg at chromium.org> wrote:
>
> ACPI (Advanced Configuration and Power Interface) is a standard for
> specifying information about a platform. It is a little like device
> tree but the bindings are part of the specification and it supports an
> interpreted bytecode language.
>
> Driver model does not use ACPI for U-Boot's configuration, but it is
> convenient to have it support generation of ACPI tables for passing to
> Linux, etc.
>
> As a starting point, add an optional set of ACPI operations to each
> device. Initially only a single operation is available, to obtain the
> ACPI name for the device. More operations are added later.
>
> Enable ACPI for sandbox to ensure build coverage and so that we can add
> tests.
>
> Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
> Reviewed-by: Wolfgang Wallner <wolfgang.wallner at br-automation.com>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> Changes in v6:
> - Use ACPI_NAME_LEN in acpi_copy_name since we add the nul anyway
>
> Changes in v5:
> - Capitalise ACPI_OPS_PTR since it includes a comma
>
> Changes in v4: None
> Changes in v3:
> - Drop 'Intel' from 'Intel ACPI'
> - Reword commit message to drop the bit about ACPI being complicated
> - Compute ACPI_NAME_MAX from ACPI_NAME_LEN
> - Rename acpi_return_name() to acpi_copy_name()
> - Use strncpy() instead of strcpy() in acpi_copy_name()
>
> Changes in v2:
> - Move LOGC_ACPI definition to this patch
>
> configs/tools-only_defconfig | 1 +
> drivers/core/Kconfig | 9 +++++
> drivers/core/Makefile | 1 +
> drivers/core/acpi.c | 33 ++++++++++++++++
> include/dm/acpi.h | 73 ++++++++++++++++++++++++++++++++++++
> include/dm/device.h | 5 +++
> include/log.h | 2 +
> 7 files changed, 124 insertions(+)
> create mode 100644 drivers/core/acpi.c
> create mode 100644 include/dm/acpi.h
>
applied to u-boot-x86, thanks!
More information about the U-Boot
mailing list