3 #ifndef _BROADWELL_PM_H_
4 #define _BROADWELL_PM_H_
11 #define WAK_STS (1 << 15)
12 #define PCIEXPWAK_STS (1 << 14)
13 #define PRBTNOR_STS (1 << 11)
14 #define RTC_STS (1 << 10)
15 #define PWRBTN_STS (1 << 8)
16 #define GBL_STS (1 << 5)
17 #define BM_STS (1 << 4)
18 #define TMROF_STS (1 << 0)
20 #define PCIEXPWAK_DIS (1 << 14)
21 #define RTC_EN (1 << 10)
22 #define PWRBTN_EN (1 << 8)
23 #define GBL_EN (1 << 5)
24 #define TMROF_EN (1 << 0)
26 #define GBL_RLS (1 << 2)
27 #define BM_RLD (1 << 1)
28 #define SCI_EN (1 << 0)
31 #define XHCI_SMI_EN (1 << 31)
32 #define ME_SMI_EN (1 << 30)
33 #define GPIO_UNLOCK_SMI_EN (1 << 27)
34 #define INTEL_USB2_EN (1 << 18)
35 #define LEGACY_USB2_EN (1 << 17)
36 #define PERIODIC_EN (1 << 14)
37 #define TCO_EN (1 << 13)
38 #define MCSMI_EN (1 << 11)
39 #define BIOS_RLS (1 << 7)
40 #define SWSMI_TMR_EN (1 << 6)
41 #define APMC_EN (1 << 5)
42 #define SLP_SMI_EN (1 << 4)
43 #define LEGACY_USB_EN (1 << 3)
44 #define BIOS_EN (1 << 2)
46 #define GBL_SMI_EN (1 << 0)
49 #define UPWRC_WS (1 << 8)
50 #define UPWRC_WE (1 << 1)
51 #define UPWRC_SMI (1 << 0)
53 #define SWGPE_CTRL (1 << 1)
54 #define DEVACT_STS 0x44
57 #define TCO_TMR_HLT (1 << 11)
59 #define DMISCI_STS (1 << 9)
61 #define TCO2_STS_SECOND_TO (1 << 1)
63 #define GPE0_REG_MAX 4
64 #define GPE0_REG_SIZE 32
65 #define GPE0_STS(x) (0x80 + ((x) * 4))
70 #define WADT_STS (1 << 18)
71 #define GP27_STS (1 << 16)
72 #define PME_B0_STS (1 << 13)
73 #define ME_SCI_STS (1 << 12)
74 #define PME_STS (1 << 11)
75 #define BATLOW_STS (1 << 10)
76 #define PCI_EXP_STS (1 << 9)
77 #define SMB_WAK_STS (1 << 7)
78 #define TCOSCI_STS (1 << 6)
79 #define SWGPE_STS (1 << 2)
80 #define HOT_PLUG_STS (1 << 1)
81 #define GPE0_EN(x) (0x90 + ((x) * 4))
82 #define WADT_en (1 << 18)
83 #define GP27_EN (1 << 16)
84 #define PME_B0_EN (1 << 13)
85 #define ME_SCI_EN (1 << 12)
86 #define PME_EN (1 << 11)
87 #define BATLOW_EN (1 << 10)
88 #define PCI_EXP_EN (1 << 9)
89 #define TCOSCI_EN (1 << 6)
90 #define SWGPE_EN (1 << 2)
91 #define HOT_PLUG_EN (1 << 1)
93 #define MAINBOARD_POWER_OFF 0
94 #define MAINBOARD_POWER_ON 1
95 #define MAINBOARD_POWER_KEEP 2
uint16_t get_pmbase(void)
void enable_pm1(uint16_t events)
uint16_t clear_pm1_status(void)
void enable_pm1_control(uint32_t mask)
void disable_smi(uint32_t mask)
void enable_smi(uint32_t mask)
void enable_gpe(uint32_t mask)
uint32_t clear_gpe_status(void)
void disable_pm1_control(uint32_t mask)
void disable_all_gpe(void)
uint32_t clear_tco_status(void)
uint32_t clear_smi_status(void)
void disable_gpe(uint32_t mask)
void enable_alt_smi(uint32_t mask)
void clear_gpe_enable(void)
uint32_t clear_alt_smi_status(void)
void enable_tco_sci(void)
void enable_all_gpe(uint32_t set1, uint32_t set2, uint32_t set3, uint32_t set4)
uint32_t prev_sleep_state