From patchwork Sun Jun 14 02:54:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 242234 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Sat, 13 Jun 2020 20:54:49 -0600 Subject: [PATCH v3 01/35] dm: core: Add an ACPI name for the root node In-Reply-To: <20200614025523.40183-1-sjg@chromium.org> References: <20200614025523.40183-1-sjg@chromium.org> Message-ID: <20200613205459.v3.1.I3fc26919ac73d55741c6ee8098cc0d6df70bb23c@changeid> This always has a fixed ACPI name so add it as a driver function. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner Reviewed-by: Bin Meng --- (no changes since v1) Changes in v1: - Capitalise ACPI_OPS_PTR drivers/core/root.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/core/root.c b/drivers/core/root.c index 7d257ea887..14ae8a953b 100644 --- a/drivers/core/root.c +++ b/drivers/core/root.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -373,10 +374,22 @@ int dm_init_and_scan(bool pre_reloc_only) return 0; } +#ifdef CONFIG_ACPIGEN +static int root_acpi_get_name(const struct udevice *dev, char *out_name) +{ + return acpi_copy_name(out_name, "\\_SB"); +} + +struct acpi_ops root_acpi_ops = { + .get_name = root_acpi_get_name, +}; +#endif + /* This is the root driver - all drivers are children of this */ U_BOOT_DRIVER(root_driver) = { .name = "root_driver", .id = UCLASS_ROOT, + ACPI_OPS_PTR(&root_acpi_ops) }; /* This is the root uclass */