summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorMatt DeVillier <matt.devillier@gmail.com>2022-12-06 20:46:36 -0600
committerFelix Held <felix-coreboot@felixheld.de>2022-12-21 13:57:48 +0000
commitca342e108227859112746bb262bb742e800b6973 (patch)
tree1c09bf6bcaa5d2359abd8114b6b469ef356d557a /src/lib
parent343644006f89d201b42e9f340f9907b2eea56b5b (diff)
downloadcoreboot-ca342e108227859112746bb262bb742e800b6973.tar.gz
coreboot-ca342e108227859112746bb262bb742e800b6973.tar.bz2
coreboot-ca342e108227859112746bb262bb742e800b6973.zip
lib/nhlt, soc/intel/skl: Update NHLT to program feedback config
Adapted from WIP (and abandoned) patch CB:25334, this patch: 1. Ensures SSP endpoint InstanceId is 0 2. Adds capability_size parameter at the end of the nhlt 3. Adsd more config_type enum values to accommodate feedback stream 4. Programs virtual_slot values for max98373, max98927, and rt5514 nhlt files 5. Adds NHLT feedback_config parameters Default feedback configs are added here to the max98373, max98927, and rt5514 codecs; in a follow-on patch, these will be overridden at the board level. TEST=tested with subsequent patch Change-Id: I59285e332de09bb448b0d67ad56c72a208588d47 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/70393 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: CoolStar <coolstarorganization@gmail.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/nhlt.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/lib/nhlt.c b/src/lib/nhlt.c
index a061b828646b..b6fe9a652dcf 100644
--- a/src/lib/nhlt.c
+++ b/src/lib/nhlt.c
@@ -181,14 +181,6 @@ int nhlt_endpoint_add_formats(struct nhlt_endpoint *endp,
return 0;
}
-void nhlt_next_instance(struct nhlt *nhlt, int link_type)
-{
- if (link_type < NHLT_LINK_HDA || link_type >= NHLT_MAX_LINK_TYPES)
- return;
-
- nhlt->current_instance_id[link_type]++;
-}
-
static size_t calc_specific_config_size(struct nhlt_specific_config *cfg)
{
return sizeof(cfg->size) + cfg->size;
@@ -255,7 +247,7 @@ static size_t calc_size(struct nhlt *nhlt)
size_t nhlt_current_size(struct nhlt *nhlt)
{
- return calc_size(nhlt) + sizeof(acpi_header_t);
+ return calc_size(nhlt) + sizeof(acpi_header_t) + sizeof(uint32_t);
}
static void nhlt_free_resources(struct nhlt *nhlt)
@@ -360,12 +352,13 @@ static void serialize_endpoint(struct nhlt_endpoint *endp, struct cursor *cur)
static void nhlt_serialize_endpoints(struct nhlt *nhlt, struct cursor *cur)
{
- int i;
+ int i, capabilities_size = 0;
ser8(cur, nhlt->num_endpoints);
for (i = 0; i < nhlt->num_endpoints; i++)
serialize_endpoint(&nhlt->endpoints[i], cur);
+ ser32(cur, capabilities_size);
}
uintptr_t nhlt_serialize(struct nhlt *nhlt, uintptr_t acpi_addr)
@@ -468,12 +461,5 @@ int nhlt_add_endpoints(struct nhlt *nhlt,
int nhlt_add_ssp_endpoints(struct nhlt *nhlt, int virtual_bus_id,
const struct nhlt_endp_descriptor *epds, size_t num_epds)
{
- int ret;
-
- ret = _nhlt_add_endpoints(nhlt, virtual_bus_id, epds, num_epds);
-
- if (!ret)
- nhlt_next_instance(nhlt, NHLT_LINK_SSP);
-
- return ret;
+ return _nhlt_add_endpoints(nhlt, virtual_bus_id, epds, num_epds);
}