soc/intel/apollolake: add SMI status bit definitons and use them
Provide the bit definitions for the SMI status register. Also, utilize them which means deleting some of the handlers that can't exist because there are no status bits. BUG=chrome-os-partner:54262 Change-Id: I389c7cb3cad01ba0eca52a337ffee352a2010bfa Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/15154 Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins)
This commit is contained in:
parent
266a1f794d
commit
7929dd02e6
|
@ -84,6 +84,28 @@
|
||||||
#define GBL_SMI_EN (1 << SMI_GBL) /* Global SMI Enable */
|
#define GBL_SMI_EN (1 << SMI_GBL) /* Global SMI Enable */
|
||||||
|
|
||||||
#define SMI_STS 0x44
|
#define SMI_STS 0x44
|
||||||
|
/* Bits for SMI status */
|
||||||
|
#define PMC_OCP_SMI_STS 27
|
||||||
|
#define SPI_SMI_STS 26
|
||||||
|
#define SPI_SSMI_STS 25
|
||||||
|
#define SCC2_SMI_STS 21
|
||||||
|
#define PCIE_SMI_STS 20
|
||||||
|
#define SCS_SMI_STS 19
|
||||||
|
#define HSMBUS_SMI_STS 18
|
||||||
|
#define XHCI_SMI_STS 17
|
||||||
|
#define SMBUS_SMI_STS 16
|
||||||
|
#define SERIRQ_SMI_STS 15
|
||||||
|
#define PERIODIC_SMI_STS 14
|
||||||
|
#define TCO_SMI_STS 13
|
||||||
|
#define MC_SMI_STS 12
|
||||||
|
#define GPIO_UNLOCK_SMI_STS 11
|
||||||
|
#define GPIO_SMI_STS 10
|
||||||
|
#define SWSMI_TMR_SMI_STS 6
|
||||||
|
#define APM_SMI_STS 5
|
||||||
|
#define SLP_SMI_STS 4
|
||||||
|
#define LEGACY_USB_SMI_STS 3
|
||||||
|
#define BIOS_SMI_STS 2
|
||||||
|
|
||||||
#define GPE_CNTL 0x50
|
#define GPE_CNTL 0x50
|
||||||
#define DEVACT_STS 0x4c
|
#define DEVACT_STS 0x4c
|
||||||
#define TCO_STS 0x64
|
#define TCO_STS 0x64
|
||||||
|
|
|
@ -55,26 +55,26 @@ static void print_num_status_bits(int num_bits, uint32_t status,
|
||||||
static uint32_t print_smi_status(uint32_t smi_sts)
|
static uint32_t print_smi_status(uint32_t smi_sts)
|
||||||
{
|
{
|
||||||
static const char * const smi_sts_bits[] = {
|
static const char * const smi_sts_bits[] = {
|
||||||
[2] = "BIOS",
|
[BIOS_SMI_STS] = "BIOS",
|
||||||
[3] = "LEGACY USB",
|
[LEGACY_USB_SMI_STS] = "LEGACY USB",
|
||||||
[4] = "SLP_SMI",
|
[SLP_SMI_STS] = "SLP_SMI",
|
||||||
[5] = "APM",
|
[APM_SMI_STS] = "APM",
|
||||||
[6] = "SWSMI_TMR",
|
[SWSMI_TMR_SMI_STS] = "SWSMI_TMR",
|
||||||
[10]= "GPIO_SMI",
|
[GPIO_SMI_STS]= "GPIO_SMI",
|
||||||
[11]= "GPIO_UNLOCK_SSMI",
|
[GPIO_UNLOCK_SMI_STS]= "GPIO_UNLOCK_SSMI",
|
||||||
[12] = "MCSMI",
|
[MC_SMI_STS] = "MCSMI",
|
||||||
[13] = "TCO",
|
[TCO_SMI_STS] = "TCO",
|
||||||
[14] = "PERIODIC",
|
[PERIODIC_SMI_STS] = "PERIODIC",
|
||||||
[15] = "SERIRQ",
|
[SERIRQ_SMI_STS] = "SERIRQ",
|
||||||
[16] = "SMBUS_SMI",
|
[SMBUS_SMI_STS] = "SMBUS_SMI",
|
||||||
[17] = "XHCI",
|
[XHCI_SMI_STS] = "XHCI",
|
||||||
[18] = "HOST_SMBUS",
|
[HSMBUS_SMI_STS] = "HOST_SMBUS",
|
||||||
[19] = "SCS",
|
[SCS_SMI_STS] = "SCS",
|
||||||
[20] = "PCI_EXP_SMI",
|
[PCIE_SMI_STS] = "PCI_EXP_SMI",
|
||||||
[21] = "SCC2",
|
[SCC2_SMI_STS] = "SCC2",
|
||||||
[25] = "SPI_SSMI",
|
[SPI_SSMI_STS] = "SPI_SSMI",
|
||||||
[26] = "SPI",
|
[SPI_SMI_STS] = "SPI",
|
||||||
[27] = "OCP_CSE",
|
[PMC_OCP_SMI_STS] = "OCP_CSE",
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!smi_sts)
|
if (!smi_sts)
|
||||||
|
|
|
@ -44,36 +44,8 @@ const struct smm_save_state_ops *get_smm_save_state_ops(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
const smi_handler_t southbridge_smi[32] = {
|
const smi_handler_t southbridge_smi[32] = {
|
||||||
NULL, /* [0] reserved */
|
[SLP_SMI_STS] = southbridge_smi_sleep,
|
||||||
NULL, /* [1] reserved */
|
[APM_SMI_STS] = southbridge_smi_apmc,
|
||||||
NULL, /* [2] BIOS_STS */
|
[TCO_SMI_STS] = southbridge_smi_tco,
|
||||||
NULL, /* [3] LEGACY_USB_STS */
|
[PERIODIC_SMI_STS] = southbridge_smi_periodic,
|
||||||
southbridge_smi_sleep, /* [4] SLP_SMI_STS */
|
|
||||||
southbridge_smi_apmc, /* [5] APM_STS */
|
|
||||||
NULL, /* [6] SWSMI_TMR_STS */
|
|
||||||
NULL, /* [7] reserved */
|
|
||||||
southbridge_smi_pm1, /* [8] PM1_STS */
|
|
||||||
southbridge_smi_gpe0, /* [9] GPE0_STS */
|
|
||||||
NULL, /* [10] reserved */
|
|
||||||
NULL, /* [11] reserved */
|
|
||||||
NULL, /* [12] reserved */
|
|
||||||
southbridge_smi_tco, /* [13] TCO_STS */
|
|
||||||
southbridge_smi_periodic, /* [14] PERIODIC_STS */
|
|
||||||
NULL, /* [15] SERIRQ_SMI_STS */
|
|
||||||
NULL, /* [16] SMBUS_SMI_STS */
|
|
||||||
NULL, /* [17] LEGACY_USB2_STS */
|
|
||||||
NULL, /* [18] INTEL_USB2_STS */
|
|
||||||
NULL, /* [19] reserved */
|
|
||||||
NULL, /* [20] PCI_EXP_SMI_STS */
|
|
||||||
NULL, /* [21] reserved */
|
|
||||||
NULL, /* [22] reserved */
|
|
||||||
NULL, /* [23] reserved */
|
|
||||||
NULL, /* [24] reserved */
|
|
||||||
NULL, /* [25] reserved */
|
|
||||||
NULL, /* [26] SPI_STS */
|
|
||||||
NULL, /* [27] reserved */
|
|
||||||
NULL, /* [28] PUNIT */
|
|
||||||
NULL, /* [29] GUNIT */
|
|
||||||
NULL, /* [30] reserved */
|
|
||||||
NULL /* [31] reserved */
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue