soc/intel/common: use nvs.h include for nhlt code
[coreboot.git] / src / soc / intel / common / nhlt.c
blob03a4b4f03c7e3ca2a1b75388fc1370a35f149ffc
1 /*
2 * This file is part of the coreboot project.
4 * Copyright 2015 Google, Inc.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
16 #include <cbmem.h>
17 #include <nhlt.h>
18 #include <soc/nvs.h>
20 uintptr_t nhlt_soc_serialize(struct nhlt *nhlt, uintptr_t acpi_addr)
22 return nhlt_soc_serialize_oem_overrides(nhlt, acpi_addr, NULL, NULL);
25 uintptr_t nhlt_soc_serialize_oem_overrides(struct nhlt *nhlt,
26 uintptr_t acpi_addr, const char *oem_id, const char *oem_table_id)
28 global_nvs_t *gnvs;
30 gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS);
32 if (gnvs == NULL)
33 return acpi_addr;
35 /* Update NHLT GNVS Data */
36 gnvs->nhla = (uintptr_t)acpi_addr;
37 gnvs->nhll = nhlt_current_size(nhlt);
39 return nhlt_serialize_oem_overrides(nhlt, acpi_addr,
40 oem_id, oem_table_id);