summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2016-11-29 23:14:25 -0600
committerAaron Durbin <adurbin@chromium.org>2016-12-01 08:17:42 +0100
commitb4afe3c19747758412c734132e5e342a9b3572b1 (patch)
tree014c675dd3ca4bc7bb1407f4969d593ba78bc8ce /src/lib
parentd008413a3c46d4346f3cc398bbfd60b875ff3084 (diff)
lib/nhlt: add support for setting the oem_revision
In the ACPI header there's an OEM revision field that was previously just being implicitly set to 0. Allow for a board to provide a non-zero value for this field. Change-Id: Icd40c1c162c2645b3990a6f3361c592706251f82 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/17650 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/nhlt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/nhlt.c b/src/lib/nhlt.c
index 7bf8ce8960..da94415f40 100644
--- a/src/lib/nhlt.c
+++ b/src/lib/nhlt.c
@@ -390,11 +390,12 @@ static void nhlt_serialize_endpoints(struct nhlt *nhlt, struct cursor *cur)
uintptr_t nhlt_serialize(struct nhlt *nhlt, uintptr_t acpi_addr)
{
- return nhlt_serialize_oem_overrides(nhlt, acpi_addr, NULL, NULL);
+ return nhlt_serialize_oem_overrides(nhlt, acpi_addr, NULL, NULL, 0);
}
uintptr_t nhlt_serialize_oem_overrides(struct nhlt *nhlt,
- uintptr_t acpi_addr, const char *oem_id, const char *oem_table_id)
+ uintptr_t acpi_addr, const char *oem_id, const char *oem_table_id,
+ uint32_t oem_revision)
{
struct cursor cur;
acpi_header_t *header;
@@ -424,6 +425,7 @@ uintptr_t nhlt_serialize_oem_overrides(struct nhlt *nhlt,
memcpy(header->oem_id, oem_id, oem_id_len);
memcpy(header->oem_table_id, oem_table_id, oem_table_id_len);
+ write_le32(&header->oem_revision, oem_revision);
memcpy(header->asl_compiler_id, ASLC, 4);
cur.buf = (void *)(acpi_addr + sizeof(acpi_header_t));