3 #ifndef INTEL_COMMON_PMUTIL_H
4 #define INTEL_COMMON_PMUTIL_H
8 #define D31F0_PMBASE 0x40
9 #define D31F0_GEN_PMCON_1 0xa0
10 #define SMI_LOCK (1 << 4)
11 #define D31F0_GEN_PMCON_2 0xa2
12 #define D31F0_GEN_PMCON_3 0xa4
13 #define RTC_BATTERY_DEAD (1 << 2)
14 #define RTC_POWER_FAILED (1 << 1)
15 #define SLEEP_AFTER_POWER_FAIL (1 << 0)
16 #define D31F0_GEN_PMCON_LOCK 0xa6
17 #define ACPI_BASE_LOCK (1 << 1)
18 #define SLP_STR_POL_LOCK (1 << 2)
19 #define D31F0_ETR3 0xac
20 #define ETR3_CWORWRE (1 << 18)
21 #define ETR3_CF9GR (1 << 20)
22 #define ETR3_CF9LOCK (1 << 31)
23 #define D31F0_GPIO_ROUT 0xb8
24 #define GPI_DISABLE 0x00
25 #define GPI_IS_SMI 0x01
26 #define GPI_IS_SCI 0x02
27 #define GPI_IS_NMI 0x03
29 #define MAINBOARD_POWER_OFF 0
30 #define MAINBOARD_POWER_ON 1
31 #define MAINBOARD_POWER_KEEP 2
34 #define WAK_STS (1 << 15)
35 #define PCIEXPWAK_STS (1 << 14)
36 #define PRBTNOR_STS (1 << 11)
37 #define RTC_STS (1 << 10)
38 #define PWRBTN_STS (1 << 8)
39 #define GBL_STS (1 << 5)
40 #define BM_STS (1 << 4)
41 #define TMROF_STS (1 << 0)
43 #define PCIEXPWAK_DIS (1 << 14)
44 #define RTC_EN (1 << 10)
45 #define PWRBTN_EN (1 << 8)
46 #define GBL_EN (1 << 5)
47 #define TMROF_EN (1 << 0)
49 #define GBL_RLS (1 << 2)
50 #define BM_RLD (1 << 1)
51 #define SCI_EN (1 << 0)
57 #if CONFIG(SOUTHBRIDGE_INTEL_I82801GX)
64 #define USB4_STS (1 << 14)
65 #define PME_B0_STS (1 << 13)
66 #define PME_STS (1 << 11)
67 #define BATLOW_STS (1 << 10)
68 #define PCI_EXP_STS (1 << 9)
69 #define RI_STS (1 << 8)
70 #define SMB_WAK_STS (1 << 7)
71 #define TCOSCI_STS (1 << 6)
72 #define SWGPE_STS (1 << 2)
73 #define HOT_PLUG_STS (1 << 1)
74 #if CONFIG(SOUTHBRIDGE_INTEL_I82801GX)
79 #define PME_B0_EN (1 << 13)
80 #define PME_EN (1 << 11)
81 #define TCOSCI_EN (1 << 6)
83 #define INTEL_USB2_EN (1 << 18)
84 #define LEGACY_USB2_EN (1 << 17)
85 #define PERIODIC_EN (1 << 14)
86 #define TCO_EN (1 << 13)
87 #define MCSMI_EN (1 << 11)
88 #define BIOS_RLS (1 << 7)
89 #define SWSMI_TMR_EN (1 << 6)
90 #define APMC_EN (1 << 5)
91 #define SLP_SMI_EN (1 << 4)
92 #define LEGACY_USB_EN (1 << 3)
93 #define BIOS_EN (1 << 2)
95 #define GBL_SMI_EN (1 << 0)
97 #define ALT_GP_SMI_EN 0x38
98 #define ALT_GP_SMI_STS 0x3a
100 #define DEVACT_STS 0x44
103 #define TCO1_STS 0x64
104 #define DMISCI_STS (1 << 9)
105 #define BOOT_STS (1 << 18)
106 #define TCO2_STS 0x66
107 #define TCO1_CNT 0x68
108 #define TCO_LOCK (1 << 12)
109 #define TCO2_CNT 0x6a
void southbridge_finalize_all(void)
u32 reset_smi_status(void)
read and clear SMI_STS
u64 reset_gpe0_status(void)
read and clear GPE0_STS
void alt_gpi_mask(u16 clr, u16 set)
u16 reset_alt_gp_smi_status(void)
read and clear ALT_GP_SMI_STS
void gpe0_mask(u32 clr, u32 set)
void dump_alt_gp_smi_status(u16 alt_gp_smi_sts)
void smi_set_eos(void)
Set the EOS bit.
void dump_pm1_status(u16 pm1_sts)
void gpi_route_interrupt(u8 gpi, u8 mode)
void dump_all_status(void)
u16 reset_pm1_status(void)
read and clear PM1_STS
void southbridge_smm_xhci_sleep(u8 slp_type)
u32 reset_tco_status(void)
read and clear TCOx_STS
void southbridge_smi_monitor(void)
void dump_gpe0_status(u64 gpe0_sts)
void dump_tco_status(u32 tco_sts)
void southbridge_gate_memory_reset(void)
void dump_smi_status(u32 smi_sts)