Attention is currently required from: Patrick Rudolph. Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/61530 )
Change subject: soc/intel/common/dsp: Add function to enable `PME` for Audio Controller ......................................................................
soc/intel/common/dsp: Add function to enable `PME` for Audio Controller
This function implements an API that sets PME for audio controller.
BUG=none TEST=none
Signed-off-by: Subrata Banik subratabanik@google.com Change-Id: I76125b60cb128fd927b4c1205db6cc8964371b47 --- M src/soc/intel/common/block/dsp/dsp.c A src/soc/intel/common/block/include/intelblocks/dsp.h 2 files changed, 26 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/30/61530/1
diff --git a/src/soc/intel/common/block/dsp/dsp.c b/src/soc/intel/common/block/dsp/dsp.c index dd272a3..10fc949 100644 --- a/src/soc/intel/common/block/dsp/dsp.c +++ b/src/soc/intel/common/block/dsp/dsp.c @@ -3,6 +3,18 @@ #include <device/device.h> #include <device/pci.h> #include <device/pci_ids.h> +#include <intelblocks/dsp.h> +#include <soc/pci_devs.h> + +void dsp_pme_enable(void) +{ + if (!is_dev_enabled(PCH_DEV_HDA)) + return; + + uint32_t data = pci_read_config32(PCH_DEV_HDA, PCS); + data |= PME_ENABLE; + pci_write_config32(PCH_DEV_HDA, PCS, data); +}
static struct device_operations dsp_dev_ops = { .read_resources = pci_dev_read_resources, diff --git a/src/soc/intel/common/block/include/intelblocks/dsp.h b/src/soc/intel/common/block/include/intelblocks/dsp.h new file mode 100644 index 0000000..2a3156a --- /dev/null +++ b/src/soc/intel/common/block/include/intelblocks/dsp.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef SOC_INTEL_COMMON_BLOCK_DSP_H +#define SOC_INTEL_COMMON_BLOCK_DSP_H + +#include <types.h> + +#define PCS 0x54 +#define PME_ENABLE BIT(8) + +/* Function sets PME for Audio controller */ +void dsp_pme_enable(void); + +#endif /* SOC_INTEL_COMMON_BLOCK_DSP_H */