17 #define MSR_GLIU_P2D_RO0 0x10000029
19 #define MSR_LX_GLD_MSR_CONFIG 0x48002001
20 #define MSR_LX_MSR_PADSEL 0x48002011
22 #define MSR_GLCP_SYS_RSTPLL 0x4C000014
23 #define MSR_GLCP_DOTPLL 0x4C000015
25 #define MSR_LBAR_SMB 0x5140000B
26 #define MSR_LBAR_GPIO 0x5140000C
27 #define MSR_LBAR_MFGPT 0x5140000D
28 #define MSR_LBAR_ACPI 0x5140000E
29 #define MSR_LBAR_PMS 0x5140000F
31 #define MSR_DIVIL_SOFT_RESET 0x51400017
33 #define MSR_PIC_YSEL_LOW 0x51400020
34 #define MSR_PIC_YSEL_HIGH 0x51400021
35 #define MSR_PIC_ZSEL_LOW 0x51400022
36 #define MSR_PIC_ZSEL_HIGH 0x51400023
37 #define MSR_PIC_IRQM_LPC 0x51400025
39 #define MSR_MFGPT_IRQ 0x51400028
40 #define MSR_MFGPT_NR 0x51400029
41 #define MSR_MFGPT_SETUP 0x5140002B
43 #define MSR_RTC_DOMA_OFFSET 0x51400055
44 #define MSR_RTC_MONA_OFFSET 0x51400056
45 #define MSR_RTC_CEN_OFFSET 0x51400057
47 #define MSR_LX_SPARE_MSR 0x80000011
49 #define MSR_GX_GLD_MSR_CONFIG 0xC0002001
50 #define MSR_GX_MSR_PADSEL 0xC0002011
52 static inline int cs5535_pic_unreqz_select_high(
unsigned int group,
58 lo &= ~(0xF << (group * 4));
59 lo |= (irq & 0xF) << (group * 4);
65 #define CS5536_PIC_INT_SEL1 0x4d0
66 #define CS5536_PIC_INT_SEL2 0x4d1
69 #define LBAR_GPIO_SIZE 0xFF
70 #define LBAR_MFGPT_SIZE 0x40
71 #define LBAR_ACPI_SIZE 0x40
72 #define LBAR_PMS_SIZE 0x80
79 #define CS5536_PM_SCLK 0x10
80 #define CS5536_PM_IN_SLPCTL 0x20
81 #define CS5536_PM_WKXD 0x34
82 #define CS5536_PM_WKD 0x30
83 #define CS5536_PM_SSC 0x54
90 #define CS5536_PM1_STS 0x00
91 #define CS5536_PM1_EN 0x02
92 #define CS5536_PM1_CNT 0x08
93 #define CS5536_PM_GPE0_STS 0x18
94 #define CS5536_PM_GPE0_EN 0x1c
97 #define CS5536_WAK_FLAG (1 << 15)
98 #define CS5536_RTC_FLAG (1 << 10)
99 #define CS5536_PWRBTN_FLAG (1 << 8)
102 #define CS5536_PM_PWRBTN (1 << 8)
103 #define CS5536_PM_RTC (1 << 10)
106 #define CS5536_GPIOM7_PME_FLAG (1 << 31)
107 #define CS5536_GPIOM6_PME_FLAG (1 << 30)
110 #define CS5536_GPIOM7_PME_EN (1 << 31)
111 #define CS5536_GPIOM6_PME_EN (1 << 30)
114 #define VSA_VRC_INDEX 0xAC1C
115 #define VSA_VRC_DATA 0xAC1E
116 #define VSA_VR_UNLOCK 0xFC53
117 #define VSA_VR_SIGNATURE 0x0003
118 #define VSA_VR_MEM_SIZE 0x0200
119 #define AMD_VSA_SIG 0x4132
120 #define GSW_VSA_SIG 0x534d
124 static inline int cs5535_has_vsa2(
void)
126 static int has_vsa2 = -1;
128 if (has_vsa2 == -1) {
146 #define GPIO_OUTPUT_VAL 0x00
147 #define GPIO_OUTPUT_ENABLE 0x04
148 #define GPIO_OUTPUT_OPEN_DRAIN 0x08
149 #define GPIO_OUTPUT_INVERT 0x0C
150 #define GPIO_OUTPUT_AUX1 0x10
151 #define GPIO_OUTPUT_AUX2 0x14
152 #define GPIO_PULL_UP 0x18
153 #define GPIO_PULL_DOWN 0x1C
154 #define GPIO_INPUT_ENABLE 0x20
155 #define GPIO_INPUT_INVERT 0x24
156 #define GPIO_INPUT_FILTER 0x28
157 #define GPIO_INPUT_EVENT_COUNT 0x2C
158 #define GPIO_READ_BACK 0x30
159 #define GPIO_INPUT_AUX1 0x34
160 #define GPIO_EVENTS_ENABLE 0x38
161 #define GPIO_LOCK_ENABLE 0x3C
162 #define GPIO_POSITIVE_EDGE_EN 0x40
163 #define GPIO_NEGATIVE_EDGE_EN 0x44
164 #define GPIO_POSITIVE_EDGE_STS 0x48
165 #define GPIO_NEGATIVE_EDGE_STS 0x4C
167 #define GPIO_FLTR7_AMOUNT 0xD8
169 #define GPIO_MAP_X 0xE0
170 #define GPIO_MAP_Y 0xE4
171 #define GPIO_MAP_Z 0xE8
172 #define GPIO_MAP_W 0xEC
174 #define GPIO_FE7_SEL 0xF7
184 #define MFGPT_MAX_TIMERS 8
185 #define MFGPT_TIMER_ANY (-1)
187 #define MFGPT_DOMAIN_WORKING 1
188 #define MFGPT_DOMAIN_STANDBY 2
189 #define MFGPT_DOMAIN_ANY (MFGPT_DOMAIN_WORKING | MFGPT_DOMAIN_STANDBY)
194 #define MFGPT_EVENT_IRQ 0
195 #define MFGPT_EVENT_NMI 1
196 #define MFGPT_EVENT_RESET 3
198 #define MFGPT_REG_CMP1 0
199 #define MFGPT_REG_CMP2 2
200 #define MFGPT_REG_COUNTER 4
201 #define MFGPT_REG_SETUP 6
203 #define MFGPT_SETUP_CNTEN (1 << 15)
204 #define MFGPT_SETUP_CMP2 (1 << 14)
205 #define MFGPT_SETUP_CMP1 (1 << 13)
206 #define MFGPT_SETUP_SETUP (1 << 12)
207 #define MFGPT_SETUP_STOPEN (1 << 11)
208 #define MFGPT_SETUP_EXTEN (1 << 10)
209 #define MFGPT_SETUP_REVEN (1 << 5)
210 #define MFGPT_SETUP_CLKSEL (1 << 4)