soc/amd/block/acp: add SSDT generation callback into SoC code
Some SoCs require adding SoC-specific methods to the ACP's SSDT entry. In order to not add SoC-specific code to the common ACP code, add the 'acp_soc_write_ssdt_entry' callback into the SoC-specific code and guard it via the 'SOC_AMD_COMMON_BLOCK_ACP_SOC_SPECIFIC_SSDT_ENTRY' Kconfig symbol to neither need weak functions or stubs in every SoC code. Change-Id: I0ca5272d28938c8b90b645884a0d8b306a77d473 Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/86465 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
This commit is contained in:
parent
50ba957b17
commit
a23c2dd246
3 changed files with 11 additions and 0 deletions
|
|
@ -11,3 +11,9 @@ config SOC_AMD_COMMON_BLOCK_ACP_GEN2
|
|||
help
|
||||
Select this option to perform Audio Co-Processor(ACP) configuration.
|
||||
Used by the ACP in AMD mendocino (family 17h) and possibly newer CPUs.
|
||||
|
||||
config SOC_AMD_COMMON_BLOCK_ACP_SOC_SPECIFIC_SSDT_ENTRY
|
||||
bool
|
||||
help
|
||||
Select this option to call into the SoC code when generating the SSDT
|
||||
entry for the Audio Co-Processor (ACP).
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ static void acp_fill_ssdt(const struct device *dev)
|
|||
{
|
||||
acpi_device_write_pci_dev(dev);
|
||||
acp_fill_wov_method(dev);
|
||||
if (CONFIG(SOC_AMD_COMMON_BLOCK_ACP_SOC_SPECIFIC_SSDT_ENTRY))
|
||||
acp_soc_write_ssdt_entry(dev);
|
||||
}
|
||||
|
||||
struct device_operations amd_acp_ops = {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#ifndef AMD_COMMON_ACP_H
|
||||
#define AMD_COMMON_ACP_H
|
||||
|
||||
#include <device/device.h>
|
||||
#include <types.h>
|
||||
|
||||
struct acp_config {
|
||||
|
|
@ -44,4 +45,6 @@ struct acp_config {
|
|||
bool dmic_present;
|
||||
};
|
||||
|
||||
void acp_soc_write_ssdt_entry(const struct device *dev);
|
||||
|
||||
#endif /* AMD_COMMON_ACP_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue