summaryrefslogtreecommitdiff
path: root/drivers/core
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-07-07 21:32:08 -0600
committerBin Meng <bmeng.cn@gmail.com>2020-07-17 14:32:24 +0800
commitb4e843341816395ef8a9d48793322617f9a50f9f (patch)
tree5d100bfaadb5c083b1206974a0789a648fac83d4 /drivers/core
parentf18589576cb87e76c20046b335124a8af6feb6ac (diff)
downloadu-boot-b4e843341816395ef8a9d48793322617f9a50f9f.tar.gz
dm: acpi: Add support for the NHLT table
The Intel Non-High-Definition-Audio Link Table (NHLT) table describes the audio codecs and connections in a system. Various devices can contribute information to produce the table. Add core support for this, based on a structure which is built up through calls to the driver. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Diffstat (limited to 'drivers/core')
-rw-r--r--drivers/core/acpi.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/core/acpi.c b/drivers/core/acpi.c
index ae69258562..cdbc2c5cf5 100644
--- a/drivers/core/acpi.c
+++ b/drivers/core/acpi.c
@@ -31,6 +31,7 @@ enum method_t {
METHOD_WRITE_TABLES,
METHOD_FILL_SSDT,
METHOD_INJECT_DSDT,
+ METHOD_SETUP_NHLT,
};
/* Prototype for all methods */
@@ -248,6 +249,8 @@ acpi_method acpi_get_method(struct udevice *dev, enum method_t method)
return aops->fill_ssdt;
case METHOD_INJECT_DSDT:
return aops->inject_dsdt;
+ case METHOD_SETUP_NHLT:
+ return aops->setup_nhlt;
}
}
@@ -334,3 +337,15 @@ int acpi_write_dev_tables(struct acpi_ctx *ctx)
return ret;
}
+
+int acpi_setup_nhlt(struct acpi_ctx *ctx, struct nhlt *nhlt)
+{
+ int ret;
+
+ log_debug("Setup NHLT\n");
+ ctx->nhlt = nhlt;
+ ret = acpi_recurse_method(ctx, dm_root(), METHOD_SETUP_NHLT, TYPE_NONE);
+ log_debug("Setup finished, err=%d\n", ret);
+
+ return ret;
+}