[PATCH v4 01/35] dm: core: Add an ACPI name for the root node
Simon Glass
sjg at chromium.org
Tue Jul 7 21:11:38 CEST 2020
This always has a fixed ACPI name so add it as a driver function.
Signed-off-by: Simon Glass <sjg at chromium.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner at br-automation.com>
Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
---
(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 0de5d7c70d..0726be6b79 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -12,6 +12,7 @@
#include <log.h>
#include <malloc.h>
#include <linux/libfdt.h>
+#include <dm/acpi.h>
#include <dm/device.h>
#include <dm/device-internal.h>
#include <dm/lists.h>
@@ -377,10 +378,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 */
--
2.27.0.383.g050319c2ae-goog
More information about the U-Boot
mailing list