diff options
Diffstat (limited to 'include/asm-mips/mach-au1x00/au1xxx_psc.h')
-rw-r--r-- | include/asm-mips/mach-au1x00/au1xxx_psc.h | 131 |
1 files changed, 49 insertions, 82 deletions
diff --git a/include/asm-mips/mach-au1x00/au1xxx_psc.h b/include/asm-mips/mach-au1x00/au1xxx_psc.h index 1bd4e27caf6..dae4eca2417 100644 --- a/include/asm-mips/mach-au1x00/au1xxx_psc.h +++ b/include/asm-mips/mach-au1x00/au1xxx_psc.h | |||
@@ -33,7 +33,6 @@ | |||
33 | #ifndef _AU1000_PSC_H_ | 33 | #ifndef _AU1000_PSC_H_ |
34 | #define _AU1000_PSC_H_ | 34 | #define _AU1000_PSC_H_ |
35 | 35 | ||
36 | |||
37 | /* The PSC base addresses. */ | 36 | /* The PSC base addresses. */ |
38 | #ifdef CONFIG_SOC_AU1550 | 37 | #ifdef CONFIG_SOC_AU1550 |
39 | #define PSC0_BASE_ADDR 0xb1a00000 | 38 | #define PSC0_BASE_ADDR 0xb1a00000 |
@@ -47,8 +46,8 @@ | |||
47 | #define PSC1_BASE_ADDR 0xb1b00000 | 46 | #define PSC1_BASE_ADDR 0xb1b00000 |
48 | #endif | 47 | #endif |
49 | 48 | ||
50 | /* The PSC select and control registers are common to | 49 | /* |
51 | * all protocols. | 50 | * The PSC select and control registers are common to all protocols. |
52 | */ | 51 | */ |
53 | #define PSC_SEL_OFFSET 0x00000000 | 52 | #define PSC_SEL_OFFSET 0x00000000 |
54 | #define PSC_CTRL_OFFSET 0x00000004 | 53 | #define PSC_CTRL_OFFSET 0x00000004 |
@@ -59,18 +58,17 @@ | |||
59 | #define PSC_SEL_CLK_SERCLK (2 << 4) | 58 | #define PSC_SEL_CLK_SERCLK (2 << 4) |
60 | 59 | ||
61 | #define PSC_SEL_PS_MASK 0x00000007 | 60 | #define PSC_SEL_PS_MASK 0x00000007 |
62 | #define PSC_SEL_PS_DISABLED (0) | 61 | #define PSC_SEL_PS_DISABLED 0 |
63 | #define PSC_SEL_PS_SPIMODE (2) | 62 | #define PSC_SEL_PS_SPIMODE 2 |
64 | #define PSC_SEL_PS_I2SMODE (3) | 63 | #define PSC_SEL_PS_I2SMODE 3 |
65 | #define PSC_SEL_PS_AC97MODE (4) | 64 | #define PSC_SEL_PS_AC97MODE 4 |
66 | #define PSC_SEL_PS_SMBUSMODE (5) | 65 | #define PSC_SEL_PS_SMBUSMODE 5 |
67 | 66 | ||
68 | #define PSC_CTRL_DISABLE (0) | 67 | #define PSC_CTRL_DISABLE 0 |
69 | #define PSC_CTRL_SUSPEND (2) | 68 | #define PSC_CTRL_SUSPEND 2 |
70 | #define PSC_CTRL_ENABLE (3) | 69 | #define PSC_CTRL_ENABLE 3 |
71 | 70 | ||
72 | /* AC97 Registers. | 71 | /* AC97 Registers. */ |
73 | */ | ||
74 | #define PSC_AC97CFG_OFFSET 0x00000008 | 72 | #define PSC_AC97CFG_OFFSET 0x00000008 |
75 | #define PSC_AC97MSK_OFFSET 0x0000000c | 73 | #define PSC_AC97MSK_OFFSET 0x0000000c |
76 | #define PSC_AC97PCR_OFFSET 0x00000010 | 74 | #define PSC_AC97PCR_OFFSET 0x00000010 |
@@ -95,8 +93,7 @@ | |||
95 | #define PSC_AC97GPO (AC97_PSC_BASE + PSC_AC97GPO_OFFSET) | 93 | #define PSC_AC97GPO (AC97_PSC_BASE + PSC_AC97GPO_OFFSET) |
96 | #define PSC_AC97GPI (AC97_PSC_BASE + PSC_AC97GPI_OFFSET) | 94 | #define PSC_AC97GPI (AC97_PSC_BASE + PSC_AC97GPI_OFFSET) |
97 | 95 | ||
98 | /* AC97 Config Register. | 96 | /* AC97 Config Register. */ |
99 | */ | ||
100 | #define PSC_AC97CFG_RT_MASK (3 << 30) | 97 | #define PSC_AC97CFG_RT_MASK (3 << 30) |
101 | #define PSC_AC97CFG_RT_FIFO1 (0 << 30) | 98 | #define PSC_AC97CFG_RT_FIFO1 (0 << 30) |
102 | #define PSC_AC97CFG_RT_FIFO2 (1 << 30) | 99 | #define PSC_AC97CFG_RT_FIFO2 (1 << 30) |
@@ -118,20 +115,19 @@ | |||
118 | #define PSC_AC97CFG_RXSLOT_MASK (0x3ff << 1) | 115 | #define PSC_AC97CFG_RXSLOT_MASK (0x3ff << 1) |
119 | #define PSC_AC97CFG_GE_ENABLE (1) | 116 | #define PSC_AC97CFG_GE_ENABLE (1) |
120 | 117 | ||
121 | /* Enable slots 3-12. | 118 | /* Enable slots 3-12. */ |
122 | */ | ||
123 | #define PSC_AC97CFG_TXSLOT_ENA(x) (1 << (((x) - 3) + 11)) | 119 | #define PSC_AC97CFG_TXSLOT_ENA(x) (1 << (((x) - 3) + 11)) |
124 | #define PSC_AC97CFG_RXSLOT_ENA(x) (1 << (((x) - 3) + 1)) | 120 | #define PSC_AC97CFG_RXSLOT_ENA(x) (1 << (((x) - 3) + 1)) |
125 | 121 | ||
126 | /* The word length equation is ((x) * 2) + 2, so choose 'x' appropriately. | 122 | /* |
123 | * The word length equation is ((x) * 2) + 2, so choose 'x' appropriately. | ||
127 | * The only sensible numbers are 7, 9, or possibly 11. Nah, just do the | 124 | * The only sensible numbers are 7, 9, or possibly 11. Nah, just do the |
128 | * arithmetic in the macro. | 125 | * arithmetic in the macro. |
129 | */ | 126 | */ |
130 | #define PSC_AC97CFG_SET_LEN(x) (((((x)-2)/2) & 0xf) << 21) | 127 | #define PSC_AC97CFG_SET_LEN(x) (((((x) - 2) / 2) & 0xf) << 21) |
131 | #define PSC_AC97CFG_GET_LEN(x) (((((x) >> 21) & 0xf) * 2) + 2) | 128 | #define PSC_AC97CFG_GET_LEN(x) (((((x) >> 21) & 0xf) * 2) + 2) |
132 | 129 | ||
133 | /* AC97 Mask Register. | 130 | /* AC97 Mask Register. */ |
134 | */ | ||
135 | #define PSC_AC97MSK_GR (1 << 25) | 131 | #define PSC_AC97MSK_GR (1 << 25) |
136 | #define PSC_AC97MSK_CD (1 << 24) | 132 | #define PSC_AC97MSK_CD (1 << 24) |
137 | #define PSC_AC97MSK_RR (1 << 13) | 133 | #define PSC_AC97MSK_RR (1 << 13) |
@@ -148,8 +144,7 @@ | |||
148 | PSC_AC97MSK_TO | PSC_AC97MSK_TU | \ | 144 | PSC_AC97MSK_TO | PSC_AC97MSK_TU | \ |
149 | PSC_AC97MSK_RD | PSC_AC97MSK_TD) | 145 | PSC_AC97MSK_RD | PSC_AC97MSK_TD) |
150 | 146 | ||
151 | /* AC97 Protocol Control Register. | 147 | /* AC97 Protocol Control Register. */ |
152 | */ | ||
153 | #define PSC_AC97PCR_RC (1 << 6) | 148 | #define PSC_AC97PCR_RC (1 << 6) |
154 | #define PSC_AC97PCR_RP (1 << 5) | 149 | #define PSC_AC97PCR_RP (1 << 5) |
155 | #define PSC_AC97PCR_RS (1 << 4) | 150 | #define PSC_AC97PCR_RS (1 << 4) |
@@ -157,8 +152,7 @@ | |||
157 | #define PSC_AC97PCR_TP (1 << 1) | 152 | #define PSC_AC97PCR_TP (1 << 1) |
158 | #define PSC_AC97PCR_TS (1 << 0) | 153 | #define PSC_AC97PCR_TS (1 << 0) |
159 | 154 | ||
160 | /* AC97 Status register (read only). | 155 | /* AC97 Status register (read only). */ |
161 | */ | ||
162 | #define PSC_AC97STAT_CB (1 << 26) | 156 | #define PSC_AC97STAT_CB (1 << 26) |
163 | #define PSC_AC97STAT_CP (1 << 25) | 157 | #define PSC_AC97STAT_CP (1 << 25) |
164 | #define PSC_AC97STAT_CR (1 << 24) | 158 | #define PSC_AC97STAT_CR (1 << 24) |
@@ -174,8 +168,7 @@ | |||
174 | #define PSC_AC97STAT_DR (1 << 1) | 168 | #define PSC_AC97STAT_DR (1 << 1) |
175 | #define PSC_AC97STAT_SR (1 << 0) | 169 | #define PSC_AC97STAT_SR (1 << 0) |
176 | 170 | ||
177 | /* AC97 Event Register. | 171 | /* AC97 Event Register. */ |
178 | */ | ||
179 | #define PSC_AC97EVNT_GR (1 << 25) | 172 | #define PSC_AC97EVNT_GR (1 << 25) |
180 | #define PSC_AC97EVNT_CD (1 << 24) | 173 | #define PSC_AC97EVNT_CD (1 << 24) |
181 | #define PSC_AC97EVNT_RR (1 << 13) | 174 | #define PSC_AC97EVNT_RR (1 << 13) |
@@ -187,22 +180,18 @@ | |||
187 | #define PSC_AC97EVNT_RD (1 << 5) | 180 | #define PSC_AC97EVNT_RD (1 << 5) |
188 | #define PSC_AC97EVNT_TD (1 << 4) | 181 | #define PSC_AC97EVNT_TD (1 << 4) |
189 | 182 | ||
190 | /* CODEC Command Register. | 183 | /* CODEC Command Register. */ |
191 | */ | ||
192 | #define PSC_AC97CDC_RD (1 << 25) | 184 | #define PSC_AC97CDC_RD (1 << 25) |
193 | #define PSC_AC97CDC_ID_MASK (3 << 23) | 185 | #define PSC_AC97CDC_ID_MASK (3 << 23) |
194 | #define PSC_AC97CDC_INDX_MASK (0x7f << 16) | 186 | #define PSC_AC97CDC_INDX_MASK (0x7f << 16) |
195 | #define PSC_AC97CDC_ID(x) (((x) & 0x3) << 23) | 187 | #define PSC_AC97CDC_ID(x) (((x) & 0x03) << 23) |
196 | #define PSC_AC97CDC_INDX(x) (((x) & 0x7f) << 16) | 188 | #define PSC_AC97CDC_INDX(x) (((x) & 0x7f) << 16) |
197 | 189 | ||
198 | /* AC97 Reset Control Register. | 190 | /* AC97 Reset Control Register. */ |
199 | */ | ||
200 | #define PSC_AC97RST_RST (1 << 1) | 191 | #define PSC_AC97RST_RST (1 << 1) |
201 | #define PSC_AC97RST_SNC (1 << 0) | 192 | #define PSC_AC97RST_SNC (1 << 0) |
202 | 193 | ||
203 | 194 | /* PSC in I2S Mode. */ | |
204 | /* PSC in I2S Mode. | ||
205 | */ | ||
206 | typedef struct psc_i2s { | 195 | typedef struct psc_i2s { |
207 | u32 psc_sel; | 196 | u32 psc_sel; |
208 | u32 psc_ctrl; | 197 | u32 psc_ctrl; |
@@ -215,8 +204,7 @@ typedef struct psc_i2s { | |||
215 | u32 psc_i2sudf; | 204 | u32 psc_i2sudf; |
216 | } psc_i2s_t; | 205 | } psc_i2s_t; |
217 | 206 | ||
218 | /* I2S Config Register. | 207 | /* I2S Config Register. */ |
219 | */ | ||
220 | #define PSC_I2SCFG_RT_MASK (3 << 30) | 208 | #define PSC_I2SCFG_RT_MASK (3 << 30) |
221 | #define PSC_I2SCFG_RT_FIFO1 (0 << 30) | 209 | #define PSC_I2SCFG_RT_FIFO1 (0 << 30) |
222 | #define PSC_I2SCFG_RT_FIFO2 (1 << 30) | 210 | #define PSC_I2SCFG_RT_FIFO2 (1 << 30) |
@@ -247,8 +235,7 @@ typedef struct psc_i2s { | |||
247 | #define PSC_I2SCFG_MLJ (1 << 10) | 235 | #define PSC_I2SCFG_MLJ (1 << 10) |
248 | #define PSC_I2SCFG_XM (1 << 9) | 236 | #define PSC_I2SCFG_XM (1 << 9) |
249 | 237 | ||
250 | /* The word length equation is simply LEN+1. | 238 | /* The word length equation is simply LEN+1. */ |
251 | */ | ||
252 | #define PSC_I2SCFG_SET_LEN(x) ((((x) - 1) & 0x1f) << 4) | 239 | #define PSC_I2SCFG_SET_LEN(x) ((((x) - 1) & 0x1f) << 4) |
253 | #define PSC_I2SCFG_GET_LEN(x) ((((x) >> 4) & 0x1f) + 1) | 240 | #define PSC_I2SCFG_GET_LEN(x) ((((x) >> 4) & 0x1f) + 1) |
254 | 241 | ||
@@ -256,8 +243,7 @@ typedef struct psc_i2s { | |||
256 | #define PSC_I2SCFG_MLF (1 << 1) | 243 | #define PSC_I2SCFG_MLF (1 << 1) |
257 | #define PSC_I2SCFG_MS (1 << 0) | 244 | #define PSC_I2SCFG_MS (1 << 0) |
258 | 245 | ||
259 | /* I2S Mask Register. | 246 | /* I2S Mask Register. */ |
260 | */ | ||
261 | #define PSC_I2SMSK_RR (1 << 13) | 247 | #define PSC_I2SMSK_RR (1 << 13) |
262 | #define PSC_I2SMSK_RO (1 << 12) | 248 | #define PSC_I2SMSK_RO (1 << 12) |
263 | #define PSC_I2SMSK_RU (1 << 11) | 249 | #define PSC_I2SMSK_RU (1 << 11) |
@@ -271,8 +257,7 @@ typedef struct psc_i2s { | |||
271 | PSC_I2SMSK_TO | PSC_I2SMSK_TU | \ | 257 | PSC_I2SMSK_TO | PSC_I2SMSK_TU | \ |
272 | PSC_I2SMSK_RD | PSC_I2SMSK_TD) | 258 | PSC_I2SMSK_RD | PSC_I2SMSK_TD) |
273 | 259 | ||
274 | /* I2S Protocol Control Register. | 260 | /* I2S Protocol Control Register. */ |
275 | */ | ||
276 | #define PSC_I2SPCR_RC (1 << 6) | 261 | #define PSC_I2SPCR_RC (1 << 6) |
277 | #define PSC_I2SPCR_RP (1 << 5) | 262 | #define PSC_I2SPCR_RP (1 << 5) |
278 | #define PSC_I2SPCR_RS (1 << 4) | 263 | #define PSC_I2SPCR_RS (1 << 4) |
@@ -280,8 +265,7 @@ typedef struct psc_i2s { | |||
280 | #define PSC_I2SPCR_TP (1 << 1) | 265 | #define PSC_I2SPCR_TP (1 << 1) |
281 | #define PSC_I2SPCR_TS (1 << 0) | 266 | #define PSC_I2SPCR_TS (1 << 0) |
282 | 267 | ||
283 | /* I2S Status register (read only). | 268 | /* I2S Status register (read only). */ |
284 | */ | ||
285 | #define PSC_I2SSTAT_RF (1 << 13) | 269 | #define PSC_I2SSTAT_RF (1 << 13) |
286 | #define PSC_I2SSTAT_RE (1 << 12) | 270 | #define PSC_I2SSTAT_RE (1 << 12) |
287 | #define PSC_I2SSTAT_RR (1 << 11) | 271 | #define PSC_I2SSTAT_RR (1 << 11) |
@@ -294,8 +278,7 @@ typedef struct psc_i2s { | |||
294 | #define PSC_I2SSTAT_DR (1 << 1) | 278 | #define PSC_I2SSTAT_DR (1 << 1) |
295 | #define PSC_I2SSTAT_SR (1 << 0) | 279 | #define PSC_I2SSTAT_SR (1 << 0) |
296 | 280 | ||
297 | /* I2S Event Register. | 281 | /* I2S Event Register. */ |
298 | */ | ||
299 | #define PSC_I2SEVNT_RR (1 << 13) | 282 | #define PSC_I2SEVNT_RR (1 << 13) |
300 | #define PSC_I2SEVNT_RO (1 << 12) | 283 | #define PSC_I2SEVNT_RO (1 << 12) |
301 | #define PSC_I2SEVNT_RU (1 << 11) | 284 | #define PSC_I2SEVNT_RU (1 << 11) |
@@ -305,8 +288,7 @@ typedef struct psc_i2s { | |||
305 | #define PSC_I2SEVNT_RD (1 << 5) | 288 | #define PSC_I2SEVNT_RD (1 << 5) |
306 | #define PSC_I2SEVNT_TD (1 << 4) | 289 | #define PSC_I2SEVNT_TD (1 << 4) |
307 | 290 | ||
308 | /* PSC in SPI Mode. | 291 | /* PSC in SPI Mode. */ |
309 | */ | ||
310 | typedef struct psc_spi { | 292 | typedef struct psc_spi { |
311 | u32 psc_sel; | 293 | u32 psc_sel; |
312 | u32 psc_ctrl; | 294 | u32 psc_ctrl; |
@@ -318,8 +300,7 @@ typedef struct psc_spi { | |||
318 | u32 psc_spitxrx; | 300 | u32 psc_spitxrx; |
319 | } psc_spi_t; | 301 | } psc_spi_t; |
320 | 302 | ||
321 | /* SPI Config Register. | 303 | /* SPI Config Register. */ |
322 | */ | ||
323 | #define PSC_SPICFG_RT_MASK (3 << 30) | 304 | #define PSC_SPICFG_RT_MASK (3 << 30) |
324 | #define PSC_SPICFG_RT_FIFO1 (0 << 30) | 305 | #define PSC_SPICFG_RT_FIFO1 (0 << 30) |
325 | #define PSC_SPICFG_RT_FIFO2 (1 << 30) | 306 | #define PSC_SPICFG_RT_FIFO2 (1 << 30) |
@@ -355,8 +336,7 @@ typedef struct psc_spi { | |||
355 | #define PSC_SPICFG_MLF (1 << 1) | 336 | #define PSC_SPICFG_MLF (1 << 1) |
356 | #define PSC_SPICFG_MO (1 << 0) | 337 | #define PSC_SPICFG_MO (1 << 0) |
357 | 338 | ||
358 | /* SPI Mask Register. | 339 | /* SPI Mask Register. */ |
359 | */ | ||
360 | #define PSC_SPIMSK_MM (1 << 16) | 340 | #define PSC_SPIMSK_MM (1 << 16) |
361 | #define PSC_SPIMSK_RR (1 << 13) | 341 | #define PSC_SPIMSK_RR (1 << 13) |
362 | #define PSC_SPIMSK_RO (1 << 12) | 342 | #define PSC_SPIMSK_RO (1 << 12) |
@@ -371,16 +351,14 @@ typedef struct psc_spi { | |||
371 | PSC_SPIMSK_TU | PSC_SPIMSK_SD | \ | 351 | PSC_SPIMSK_TU | PSC_SPIMSK_SD | \ |
372 | PSC_SPIMSK_MD) | 352 | PSC_SPIMSK_MD) |
373 | 353 | ||
374 | /* SPI Protocol Control Register. | 354 | /* SPI Protocol Control Register. */ |
375 | */ | ||
376 | #define PSC_SPIPCR_RC (1 << 6) | 355 | #define PSC_SPIPCR_RC (1 << 6) |
377 | #define PSC_SPIPCR_SP (1 << 5) | 356 | #define PSC_SPIPCR_SP (1 << 5) |
378 | #define PSC_SPIPCR_SS (1 << 4) | 357 | #define PSC_SPIPCR_SS (1 << 4) |
379 | #define PSC_SPIPCR_TC (1 << 2) | 358 | #define PSC_SPIPCR_TC (1 << 2) |
380 | #define PSC_SPIPCR_MS (1 << 0) | 359 | #define PSC_SPIPCR_MS (1 << 0) |
381 | 360 | ||
382 | /* SPI Status register (read only). | 361 | /* SPI Status register (read only). */ |
383 | */ | ||
384 | #define PSC_SPISTAT_RF (1 << 13) | 362 | #define PSC_SPISTAT_RF (1 << 13) |
385 | #define PSC_SPISTAT_RE (1 << 12) | 363 | #define PSC_SPISTAT_RE (1 << 12) |
386 | #define PSC_SPISTAT_RR (1 << 11) | 364 | #define PSC_SPISTAT_RR (1 << 11) |
@@ -393,8 +371,7 @@ typedef struct psc_spi { | |||
393 | #define PSC_SPISTAT_DR (1 << 1) | 371 | #define PSC_SPISTAT_DR (1 << 1) |
394 | #define PSC_SPISTAT_SR (1 << 0) | 372 | #define PSC_SPISTAT_SR (1 << 0) |
395 | 373 | ||
396 | /* SPI Event Register. | 374 | /* SPI Event Register. */ |
397 | */ | ||
398 | #define PSC_SPIEVNT_MM (1 << 16) | 375 | #define PSC_SPIEVNT_MM (1 << 16) |
399 | #define PSC_SPIEVNT_RR (1 << 13) | 376 | #define PSC_SPIEVNT_RR (1 << 13) |
400 | #define PSC_SPIEVNT_RO (1 << 12) | 377 | #define PSC_SPIEVNT_RO (1 << 12) |
@@ -405,13 +382,11 @@ typedef struct psc_spi { | |||
405 | #define PSC_SPIEVNT_SD (1 << 5) | 382 | #define PSC_SPIEVNT_SD (1 << 5) |
406 | #define PSC_SPIEVNT_MD (1 << 4) | 383 | #define PSC_SPIEVNT_MD (1 << 4) |
407 | 384 | ||
408 | /* Transmit register control. | 385 | /* Transmit register control. */ |
409 | */ | ||
410 | #define PSC_SPITXRX_LC (1 << 29) | 386 | #define PSC_SPITXRX_LC (1 << 29) |
411 | #define PSC_SPITXRX_SR (1 << 28) | 387 | #define PSC_SPITXRX_SR (1 << 28) |
412 | 388 | ||
413 | /* PSC in SMBus (I2C) Mode. | 389 | /* PSC in SMBus (I2C) Mode. */ |
414 | */ | ||
415 | typedef struct psc_smb { | 390 | typedef struct psc_smb { |
416 | u32 psc_sel; | 391 | u32 psc_sel; |
417 | u32 psc_ctrl; | 392 | u32 psc_ctrl; |
@@ -424,8 +399,7 @@ typedef struct psc_smb { | |||
424 | u32 psc_smbtmr; | 399 | u32 psc_smbtmr; |
425 | } psc_smb_t; | 400 | } psc_smb_t; |
426 | 401 | ||
427 | /* SMBus Config Register. | 402 | /* SMBus Config Register. */ |
428 | */ | ||
429 | #define PSC_SMBCFG_RT_MASK (3 << 30) | 403 | #define PSC_SMBCFG_RT_MASK (3 << 30) |
430 | #define PSC_SMBCFG_RT_FIFO1 (0 << 30) | 404 | #define PSC_SMBCFG_RT_FIFO1 (0 << 30) |
431 | #define PSC_SMBCFG_RT_FIFO2 (1 << 30) | 405 | #define PSC_SMBCFG_RT_FIFO2 (1 << 30) |
@@ -452,8 +426,7 @@ typedef struct psc_smb { | |||
452 | 426 | ||
453 | #define PSC_SMBCFG_SET_SLV(x) (((x) & 0x7f) << 1) | 427 | #define PSC_SMBCFG_SET_SLV(x) (((x) & 0x7f) << 1) |
454 | 428 | ||
455 | /* SMBus Mask Register. | 429 | /* SMBus Mask Register. */ |
456 | */ | ||
457 | #define PSC_SMBMSK_DN (1 << 30) | 430 | #define PSC_SMBMSK_DN (1 << 30) |
458 | #define PSC_SMBMSK_AN (1 << 29) | 431 | #define PSC_SMBMSK_AN (1 << 29) |
459 | #define PSC_SMBMSK_AL (1 << 28) | 432 | #define PSC_SMBMSK_AL (1 << 28) |
@@ -471,13 +444,11 @@ typedef struct psc_smb { | |||
471 | PSC_SMBMSK_TU | PSC_SMBMSK_SD | \ | 444 | PSC_SMBMSK_TU | PSC_SMBMSK_SD | \ |
472 | PSC_SMBMSK_MD) | 445 | PSC_SMBMSK_MD) |
473 | 446 | ||
474 | /* SMBus Protocol Control Register. | 447 | /* SMBus Protocol Control Register. */ |
475 | */ | ||
476 | #define PSC_SMBPCR_DC (1 << 2) | 448 | #define PSC_SMBPCR_DC (1 << 2) |
477 | #define PSC_SMBPCR_MS (1 << 0) | 449 | #define PSC_SMBPCR_MS (1 << 0) |
478 | 450 | ||
479 | /* SMBus Status register (read only). | 451 | /* SMBus Status register (read only). */ |
480 | */ | ||
481 | #define PSC_SMBSTAT_BB (1 << 28) | 452 | #define PSC_SMBSTAT_BB (1 << 28) |
482 | #define PSC_SMBSTAT_RF (1 << 13) | 453 | #define PSC_SMBSTAT_RF (1 << 13) |
483 | #define PSC_SMBSTAT_RE (1 << 12) | 454 | #define PSC_SMBSTAT_RE (1 << 12) |
@@ -491,8 +462,7 @@ typedef struct psc_smb { | |||
491 | #define PSC_SMBSTAT_DR (1 << 1) | 462 | #define PSC_SMBSTAT_DR (1 << 1) |
492 | #define PSC_SMBSTAT_SR (1 << 0) | 463 | #define PSC_SMBSTAT_SR (1 << 0) |
493 | 464 | ||
494 | /* SMBus Event Register. | 465 | /* SMBus Event Register. */ |
495 | */ | ||
496 | #define PSC_SMBEVNT_DN (1 << 30) | 466 | #define PSC_SMBEVNT_DN (1 << 30) |
497 | #define PSC_SMBEVNT_AN (1 << 29) | 467 | #define PSC_SMBEVNT_AN (1 << 29) |
498 | #define PSC_SMBEVNT_AL (1 << 28) | 468 | #define PSC_SMBEVNT_AL (1 << 28) |
@@ -510,15 +480,13 @@ typedef struct psc_smb { | |||
510 | PSC_SMBEVNT_TU | PSC_SMBEVNT_SD | \ | 480 | PSC_SMBEVNT_TU | PSC_SMBEVNT_SD | \ |
511 | PSC_SMBEVNT_MD) | 481 | PSC_SMBEVNT_MD) |
512 | 482 | ||
513 | /* Transmit register control. | 483 | /* Transmit register control. */ |
514 | */ | ||
515 | #define PSC_SMBTXRX_RSR (1 << 28) | 484 | #define PSC_SMBTXRX_RSR (1 << 28) |
516 | #define PSC_SMBTXRX_STP (1 << 29) | 485 | #define PSC_SMBTXRX_STP (1 << 29) |
517 | #define PSC_SMBTXRX_DATAMASK (0xff) | 486 | #define PSC_SMBTXRX_DATAMASK 0xff |
518 | 487 | ||
519 | /* SMBus protocol timers register. | 488 | /* SMBus protocol timers register. */ |
520 | */ | 489 | #define PSC_SMBTMR_SET_TH(x) (((x) & 0x03) << 30) |
521 | #define PSC_SMBTMR_SET_TH(x) (((x) & 0x3) << 30) | ||
522 | #define PSC_SMBTMR_SET_PS(x) (((x) & 0x1f) << 25) | 490 | #define PSC_SMBTMR_SET_PS(x) (((x) & 0x1f) << 25) |
523 | #define PSC_SMBTMR_SET_PU(x) (((x) & 0x1f) << 20) | 491 | #define PSC_SMBTMR_SET_PU(x) (((x) & 0x1f) << 20) |
524 | #define PSC_SMBTMR_SET_SH(x) (((x) & 0x1f) << 15) | 492 | #define PSC_SMBTMR_SET_SH(x) (((x) & 0x1f) << 15) |
@@ -526,5 +494,4 @@ typedef struct psc_smb { | |||
526 | #define PSC_SMBTMR_SET_CL(x) (((x) & 0x1f) << 5) | 494 | #define PSC_SMBTMR_SET_CL(x) (((x) & 0x1f) << 5) |
527 | #define PSC_SMBTMR_SET_CH(x) (((x) & 0x1f) << 0) | 495 | #define PSC_SMBTMR_SET_CH(x) (((x) & 0x1f) << 0) |
528 | 496 | ||
529 | |||
530 | #endif /* _AU1000_PSC_H_ */ | 497 | #endif /* _AU1000_PSC_H_ */ |