summaryrefslogtreecommitdiff
path: root/src/soc/intel/skylake/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/skylake/include')
-rw-r--r--src/soc/intel/skylake/include/soc/gpio.h21
-rw-r--r--src/soc/intel/skylake/include/soc/pm.h4
-rw-r--r--src/soc/intel/skylake/include/soc/smm.h5
3 files changed, 17 insertions, 13 deletions
diff --git a/src/soc/intel/skylake/include/soc/gpio.h b/src/soc/intel/skylake/include/soc/gpio.h
index 2116c7efc2..488a2b5653 100644
--- a/src/soc/intel/skylake/include/soc/gpio.h
+++ b/src/soc/intel/skylake/include/soc/gpio.h
@@ -28,19 +28,22 @@
#include <stddef.h>
#include <soc/gpio_fsp.h>
-/* SOC has 8 GPIO communities GPP A~G, GPD */
-#define GPIO_COMMUNITY_MAX 8
-
typedef uint32_t gpio_t;
-/* Clear GPIO SMI Status */
-void gpio_clear_all_smi(void);
+/* Structure to represent GPI status for GPE and SMI. Use helper
+ * functions for interrogating particular GPIs. */
+struct gpi_status {
+ uint32_t grp[GPIO_NUM_GROUPS];
+};
-/* Get GPIO SMI Status */
-void gpio_get_smi_status(u32 status[GPIO_COMMUNITY_MAX]);
+/*
+ * Clear GPI SMI status and fill in the structure representing enabled
+ * and set status.
+ */
+void gpi_clear_get_smi_status(struct gpi_status *sts);
-/* Enable GPIO SMI */
-void gpio_enable_all_smi(void);
+/* Return 1 if gpio is set in the gpi_status struct. Otherwise 0. */
+int gpi_status_get(const struct gpi_status *sts, gpio_t gpi);
/*
* Set the GPIO groups for the GPE blocks. The gpe0_route is interpreted
diff --git a/src/soc/intel/skylake/include/soc/pm.h b/src/soc/intel/skylake/include/soc/pm.h
index c0a165e8d9..3daa3203ed 100644
--- a/src/soc/intel/skylake/include/soc/pm.h
+++ b/src/soc/intel/skylake/include/soc/pm.h
@@ -174,10 +174,6 @@ uint32_t clear_smi_status(void);
void enable_smi(uint32_t mask);
void disable_smi(uint32_t mask);
-/* ALT_GP_SMI */
-uint32_t clear_alt_smi_status(void);
-void reset_alt_smi_status(void);
-
/* TCO */
uint32_t clear_tco_status(void);
void enable_tco_sci(void);
diff --git a/src/soc/intel/skylake/include/soc/smm.h b/src/soc/intel/skylake/include/soc/smm.h
index fbae6efdbf..212a4448b0 100644
--- a/src/soc/intel/skylake/include/soc/smm.h
+++ b/src/soc/intel/skylake/include/soc/smm.h
@@ -25,6 +25,7 @@
#include <cpu/x86/msr.h>
#include <soc/intel/common/romstage.h>
#include <soc/intel/common/memmap.h>
+#include <soc/gpio.h>
struct ied_header {
char signature[10];
@@ -51,6 +52,10 @@ struct smm_relocation_params {
int smm_save_state_in_msrs;
};
+/* Mainboard handler for GPI SMIs*/
+void mainboard_smi_gpi_handler(const struct gpi_status *sts);
+
+
#if IS_ENABLED(CONFIG_HAVE_SMI_HANDLER)
int smm_initialize(void);
void smm_relocate(void);