soc/intel/cmn/blk/pmc: API to inform PMC about PCI enumeration done

This patch sends an IPC to PMC to inform about PCI enumeration.

BUG=b:211954778
TEST=Able to build and boot google/redrix to OS.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I77d428f9501feaccab8bb431090d10ce8d3af9b2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63953
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
This commit is contained in:
Subrata Banik 2022-04-29 14:19:32 +05:30 committed by Felix Held
parent f8042458f7
commit a3146205c3
2 changed files with 19 additions and 0 deletions

View File

@ -28,6 +28,9 @@ enum pch_pmc_xtal {
*/ */
enum pch_pmc_xtal pmc_get_xtal_freq(void); enum pch_pmc_xtal pmc_get_xtal_freq(void);
/* pmc_send_pci_enum_done() - send PMC IPC to inform PCI enumeration is done. */
void pmc_send_pci_enum_done(void);
/* Forward declare the power state struct here */ /* Forward declare the power state struct here */
struct chipset_power_state; struct chipset_power_state;

View File

@ -10,6 +10,7 @@
#include <cpu/x86/smm.h> #include <cpu/x86/smm.h>
#include <console/console.h> #include <console/console.h>
#include <halt.h> #include <halt.h>
#include <intelblocks/pmc_ipc.h>
#include <intelblocks/pmclib.h> #include <intelblocks/pmclib.h>
#include <intelblocks/gpio.h> #include <intelblocks/gpio.h>
#include <intelblocks/tco.h> #include <intelblocks/tco.h>
@ -21,6 +22,9 @@
#include <string.h> #include <string.h>
#include <timer.h> #include <timer.h>
#define PMC_IPC_BIOS_RST_COMPLETE 0xd0
#define PMC_IPC_BIOS_RST_SUBID_PCI_ENUM_DONE 0
static struct chipset_power_state power_state; static struct chipset_power_state power_state;
/* List of Minimum Assertion durations in microseconds */ /* List of Minimum Assertion durations in microseconds */
@ -785,3 +789,15 @@ enum pch_pmc_xtal pmc_get_xtal_freq(void)
return XTAL_UNKNOWN_FREQ; return XTAL_UNKNOWN_FREQ;
} }
} }
void pmc_send_pci_enum_done(void)
{
struct pmc_ipc_buffer req = { 0 };
struct pmc_ipc_buffer rsp;
uint32_t cmd;
cmd = pmc_make_ipc_cmd(PMC_IPC_BIOS_RST_COMPLETE,
PMC_IPC_BIOS_RST_SUBID_PCI_ENUM_DONE, 0);
if (pmc_send_ipc_cmd(cmd, &req, &rsp) != CB_SUCCESS)
printk(BIOS_ERR, "PMC: Failed sending PCI Enumeration Done Command\n");
}