From 5c31511f35ad63f034fd10dd458a435eee162b8d Mon Sep 17 00:00:00 2001 From: Harsha Priya Date: Thu, 3 May 2018 18:07:40 -0700 Subject: lib/nhlt: add support for passing subsystem_id to endpoint's structure This patch adds subsystem_id to nhlt structure whose value is passed on to the endpoint's structure. Its default value is retained to be NHLT_SSID. Change-Id: Iad53f27e958f50e02e928cd8fa60d8397ca0eb06 Signed-off-by: Harsha Priya Reviewed-on: https://review.coreboot.org/26046 Reviewed-by: Aaron Durbin Reviewed-by: Furquan Shaikh Tested-by: build bot (Jenkins) --- src/include/nhlt.h | 1 + src/lib/nhlt.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/include/nhlt.h b/src/include/nhlt.h index 5b72320f02..a361ed8fda 100644 --- a/src/include/nhlt.h +++ b/src/include/nhlt.h @@ -298,6 +298,7 @@ struct nhlt_endpoint { #define MAX_ENDPOINTS 8 struct nhlt { + uint32_t subsystem_id; uint8_t num_endpoints; struct nhlt_endpoint endpoints[MAX_ENDPOINTS]; uint8_t current_instance_id[NHLT_MAX_LINK_TYPES]; diff --git a/src/lib/nhlt.c b/src/lib/nhlt.c index da94415f40..f6135c7d8a 100644 --- a/src/lib/nhlt.c +++ b/src/lib/nhlt.c @@ -43,6 +43,7 @@ struct nhlt *nhlt_init(void) return NULL; memset(nhlt, 0, sizeof(*nhlt)); + nhlt->subsystem_id = NHLT_SSID; return nhlt; } @@ -66,7 +67,7 @@ struct nhlt_endpoint *nhlt_add_endpoint(struct nhlt *nhlt, int link_type, endp->vendor_id = vid; endp->device_id = did; endp->revision_id = NHLT_RID; - endp->subsystem_id = NHLT_SSID; + endp->subsystem_id = nhlt->subsystem_id; endp->device_type = device_type; endp->direction = dir; endp->virtual_bus_id = DEFAULT_VIRTUAL_BUS_ID; -- cgit v1.2.3