提交 4b724a13 编写于 作者: S Simon Glass 提交者: Bin Meng

dm: core: Add an ACPI name for the root node

This always has a fixed ACPI name so add it as a driver function.
Signed-off-by: NSimon Glass <sjg@chromium.org>
Reviewed-by: NWolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
上级 0990c894
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册