1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* *********************************************************************
3 * SB1250 Board Support Package
5 * Generic Bus Constants File: sb1250_genbus.h
7 * This module contains constants and macros useful for
8 * manipulating the SB1250's Generic Bus interface
10 * SB1250 specification level: User's manual 10/21/02
11 * BCM1280 specification level: User's Manual 11/14/03
13 *********************************************************************
15 * Copyright 2000, 2001, 2002, 2003
16 * Broadcom Corporation. All rights reserved.
18 ********************************************************************* */
21 #ifndef _SB1250_GENBUS_H
22 #define _SB1250_GENBUS_H
24 #include <asm/sibyte/sb1250_defs.h>
27 * Generic Bus Region Configuration Registers (Table 11-4)
30 #define S_IO_RDY_ACTIVE 0
31 #define M_IO_RDY_ACTIVE _SB_MAKEMASK1(S_IO_RDY_ACTIVE)
33 #define S_IO_ENA_RDY 1
34 #define M_IO_ENA_RDY _SB_MAKEMASK1(S_IO_ENA_RDY)
36 #define S_IO_WIDTH_SEL 2
37 #define M_IO_WIDTH_SEL _SB_MAKEMASK(2, S_IO_WIDTH_SEL)
38 #define K_IO_WIDTH_SEL_1 0
39 #define K_IO_WIDTH_SEL_2 1
40 #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) \
41 || SIBYTE_HDR_FEATURE_CHIP(1480)
42 #define K_IO_WIDTH_SEL_1L 2
43 #endif /* 1250 PASS2 || 112x PASS1 || 1480 */
44 #define K_IO_WIDTH_SEL_4 3
45 #define V_IO_WIDTH_SEL(x) _SB_MAKEVALUE(x, S_IO_WIDTH_SEL)
46 #define G_IO_WIDTH_SEL(x) _SB_GETVALUE(x, S_IO_WIDTH_SEL, M_IO_WIDTH_SEL)
48 #define S_IO_PARITY_ENA 4
49 #define M_IO_PARITY_ENA _SB_MAKEMASK1(S_IO_PARITY_ENA)
50 #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) \
51 || SIBYTE_HDR_FEATURE_CHIP(1480)
52 #define S_IO_BURST_EN 5
53 #define M_IO_BURST_EN _SB_MAKEMASK1(S_IO_BURST_EN)
54 #endif /* 1250 PASS2 || 112x PASS1 || 1480 */
55 #define S_IO_PARITY_ODD 6
56 #define M_IO_PARITY_ODD _SB_MAKEMASK1(S_IO_PARITY_ODD)
58 #define M_IO_NONMUX _SB_MAKEMASK1(S_IO_NONMUX)
60 #define S_IO_TIMEOUT 8
61 #define M_IO_TIMEOUT _SB_MAKEMASK(8, S_IO_TIMEOUT)
62 #define V_IO_TIMEOUT(x) _SB_MAKEVALUE(x, S_IO_TIMEOUT)
63 #define G_IO_TIMEOUT(x) _SB_GETVALUE(x, S_IO_TIMEOUT, M_IO_TIMEOUT)
66 * Generic Bus Region Size register (Table 11-5)
69 #define S_IO_MULT_SIZE 0
70 #define M_IO_MULT_SIZE _SB_MAKEMASK(12, S_IO_MULT_SIZE)
71 #define V_IO_MULT_SIZE(x) _SB_MAKEVALUE(x, S_IO_MULT_SIZE)
72 #define G_IO_MULT_SIZE(x) _SB_GETVALUE(x, S_IO_MULT_SIZE, M_IO_MULT_SIZE)
74 #define S_IO_REGSIZE 16 /* # bits to shift size for this reg */
77 * Generic Bus Region Address (Table 11-6)
80 #define S_IO_START_ADDR 0
81 #define M_IO_START_ADDR _SB_MAKEMASK(14, S_IO_START_ADDR)
82 #define V_IO_START_ADDR(x) _SB_MAKEVALUE(x, S_IO_START_ADDR)
83 #define G_IO_START_ADDR(x) _SB_GETVALUE(x, S_IO_START_ADDR, M_IO_START_ADDR)
85 #define S_IO_ADDRBASE 16 /* # bits to shift addr for this reg */
87 #define M_IO_BLK_CACHE _SB_MAKEMASK1(15)
91 * Generic Bus Timing 0 Registers (Table 11-7)
94 #define S_IO_ALE_WIDTH 0
95 #define M_IO_ALE_WIDTH _SB_MAKEMASK(3, S_IO_ALE_WIDTH)
96 #define V_IO_ALE_WIDTH(x) _SB_MAKEVALUE(x, S_IO_ALE_WIDTH)
97 #define G_IO_ALE_WIDTH(x) _SB_GETVALUE(x, S_IO_ALE_WIDTH, M_IO_ALE_WIDTH)
99 #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) \
100 || SIBYTE_HDR_FEATURE_CHIP(1480)
101 #define M_IO_EARLY_CS _SB_MAKEMASK1(3)
102 #endif /* 1250 PASS2 || 112x PASS1 || 1480 */
104 #define S_IO_ALE_TO_CS 4
105 #define M_IO_ALE_TO_CS _SB_MAKEMASK(2, S_IO_ALE_TO_CS)
106 #define V_IO_ALE_TO_CS(x) _SB_MAKEVALUE(x, S_IO_ALE_TO_CS)
107 #define G_IO_ALE_TO_CS(x) _SB_GETVALUE(x, S_IO_ALE_TO_CS, M_IO_ALE_TO_CS)
109 #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) \
110 || SIBYTE_HDR_FEATURE_CHIP(1480)
111 #define S_IO_BURST_WIDTH _SB_MAKE64(6)
112 #define M_IO_BURST_WIDTH _SB_MAKEMASK(2, S_IO_BURST_WIDTH)
113 #define V_IO_BURST_WIDTH(x) _SB_MAKEVALUE(x, S_IO_BURST_WIDTH)
114 #define G_IO_BURST_WIDTH(x) _SB_GETVALUE(x, S_IO_BURST_WIDTH, M_IO_BURST_WIDTH)
115 #endif /* 1250 PASS2 || 112x PASS1 || 1480 */
117 #define S_IO_CS_WIDTH 8
118 #define M_IO_CS_WIDTH _SB_MAKEMASK(5, S_IO_CS_WIDTH)
119 #define V_IO_CS_WIDTH(x) _SB_MAKEVALUE(x, S_IO_CS_WIDTH)
120 #define G_IO_CS_WIDTH(x) _SB_GETVALUE(x, S_IO_CS_WIDTH, M_IO_CS_WIDTH)
122 #define S_IO_RDY_SMPLE 13
123 #define M_IO_RDY_SMPLE _SB_MAKEMASK(3, S_IO_RDY_SMPLE)
124 #define V_IO_RDY_SMPLE(x) _SB_MAKEVALUE(x, S_IO_RDY_SMPLE)
125 #define G_IO_RDY_SMPLE(x) _SB_GETVALUE(x, S_IO_RDY_SMPLE, M_IO_RDY_SMPLE)
129 * Generic Bus Timing 1 Registers (Table 11-8)
132 #define S_IO_ALE_TO_WRITE 0
133 #define M_IO_ALE_TO_WRITE _SB_MAKEMASK(3, S_IO_ALE_TO_WRITE)
134 #define V_IO_ALE_TO_WRITE(x) _SB_MAKEVALUE(x, S_IO_ALE_TO_WRITE)
135 #define G_IO_ALE_TO_WRITE(x) _SB_GETVALUE(x, S_IO_ALE_TO_WRITE, M_IO_ALE_TO_WRITE)
137 #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) \
138 || SIBYTE_HDR_FEATURE_CHIP(1480)
139 #define M_IO_RDY_SYNC _SB_MAKEMASK1(3)
140 #endif /* 1250 PASS2 || 112x PASS1 || 1480 */
142 #define S_IO_WRITE_WIDTH 4
143 #define M_IO_WRITE_WIDTH _SB_MAKEMASK(4, S_IO_WRITE_WIDTH)
144 #define V_IO_WRITE_WIDTH(x) _SB_MAKEVALUE(x, S_IO_WRITE_WIDTH)
145 #define G_IO_WRITE_WIDTH(x) _SB_GETVALUE(x, S_IO_WRITE_WIDTH, M_IO_WRITE_WIDTH)
147 #define S_IO_IDLE_CYCLE 8
148 #define M_IO_IDLE_CYCLE _SB_MAKEMASK(4, S_IO_IDLE_CYCLE)
149 #define V_IO_IDLE_CYCLE(x) _SB_MAKEVALUE(x, S_IO_IDLE_CYCLE)
150 #define G_IO_IDLE_CYCLE(x) _SB_GETVALUE(x, S_IO_IDLE_CYCLE, M_IO_IDLE_CYCLE)
152 #define S_IO_OE_TO_CS 12
153 #define M_IO_OE_TO_CS _SB_MAKEMASK(2, S_IO_OE_TO_CS)
154 #define V_IO_OE_TO_CS(x) _SB_MAKEVALUE(x, S_IO_OE_TO_CS)
155 #define G_IO_OE_TO_CS(x) _SB_GETVALUE(x, S_IO_OE_TO_CS, M_IO_OE_TO_CS)
157 #define S_IO_CS_TO_OE 14
158 #define M_IO_CS_TO_OE _SB_MAKEMASK(2, S_IO_CS_TO_OE)
159 #define V_IO_CS_TO_OE(x) _SB_MAKEVALUE(x, S_IO_CS_TO_OE)
160 #define G_IO_CS_TO_OE(x) _SB_GETVALUE(x, S_IO_CS_TO_OE, M_IO_CS_TO_OE)
163 * Generic Bus Interrupt Status Register (Table 11-9)
166 #define M_IO_CS_ERR_INT _SB_MAKEMASK(0, 8)
167 #define M_IO_CS0_ERR_INT _SB_MAKEMASK1(0)
168 #define M_IO_CS1_ERR_INT _SB_MAKEMASK1(1)
169 #define M_IO_CS2_ERR_INT _SB_MAKEMASK1(2)
170 #define M_IO_CS3_ERR_INT _SB_MAKEMASK1(3)
171 #define M_IO_CS4_ERR_INT _SB_MAKEMASK1(4)
172 #define M_IO_CS5_ERR_INT _SB_MAKEMASK1(5)
173 #define M_IO_CS6_ERR_INT _SB_MAKEMASK1(6)
174 #define M_IO_CS7_ERR_INT _SB_MAKEMASK1(7)
176 #define M_IO_RD_PAR_INT _SB_MAKEMASK1(9)
177 #define M_IO_TIMEOUT_INT _SB_MAKEMASK1(10)
178 #define M_IO_ILL_ADDR_INT _SB_MAKEMASK1(11)
179 #define M_IO_MULT_CS_INT _SB_MAKEMASK1(12)
180 #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480)
181 #define M_IO_COH_ERR _SB_MAKEMASK1(14)
182 #endif /* 1250 PASS2 || 112x PASS1 || 1480 */
186 * Generic Bus Output Drive Control Register 0 (Table 14-18)
190 #define M_IO_SLEW0 _SB_MAKEMASK(2, S_IO_SLEW0)
191 #define V_IO_SLEW0(x) _SB_MAKEVALUE(x, S_IO_SLEW0)
192 #define G_IO_SLEW0(x) _SB_GETVALUE(x, S_IO_SLEW0, M_IO_SLEW0)
195 #define M_IO_DRV_A _SB_MAKEMASK(2, S_IO_DRV_A)
196 #define V_IO_DRV_A(x) _SB_MAKEVALUE(x, S_IO_DRV_A)
197 #define G_IO_DRV_A(x) _SB_GETVALUE(x, S_IO_DRV_A, M_IO_DRV_A)
200 #define M_IO_DRV_B _SB_MAKEMASK(2, S_IO_DRV_B)
201 #define V_IO_DRV_B(x) _SB_MAKEVALUE(x, S_IO_DRV_B)
202 #define G_IO_DRV_B(x) _SB_GETVALUE(x, S_IO_DRV_B, M_IO_DRV_B)
204 #define S_IO_DRV_C 10
205 #define M_IO_DRV_C _SB_MAKEMASK(2, S_IO_DRV_C)
206 #define V_IO_DRV_C(x) _SB_MAKEVALUE(x, S_IO_DRV_C)
207 #define G_IO_DRV_C(x) _SB_GETVALUE(x, S_IO_DRV_C, M_IO_DRV_C)
209 #define S_IO_DRV_D 14
210 #define M_IO_DRV_D _SB_MAKEMASK(2, S_IO_DRV_D)
211 #define V_IO_DRV_D(x) _SB_MAKEVALUE(x, S_IO_DRV_D)
212 #define G_IO_DRV_D(x) _SB_GETVALUE(x, S_IO_DRV_D, M_IO_DRV_D)
215 * Generic Bus Output Drive Control Register 1 (Table 14-19)
219 #define M_IO_DRV_E _SB_MAKEMASK(2, S_IO_DRV_E)
220 #define V_IO_DRV_E(x) _SB_MAKEVALUE(x, S_IO_DRV_E)
221 #define G_IO_DRV_E(x) _SB_GETVALUE(x, S_IO_DRV_E, M_IO_DRV_E)
224 #define M_IO_DRV_F _SB_MAKEMASK(2, S_IO_DRV_F)
225 #define V_IO_DRV_F(x) _SB_MAKEVALUE(x, S_IO_DRV_F)
226 #define G_IO_DRV_F(x) _SB_GETVALUE(x, S_IO_DRV_F, M_IO_DRV_F)
229 #define M_IO_SLEW1 _SB_MAKEMASK(2, S_IO_SLEW1)
230 #define V_IO_SLEW1(x) _SB_MAKEVALUE(x, S_IO_SLEW1)
231 #define G_IO_SLEW1(x) _SB_GETVALUE(x, S_IO_SLEW1, M_IO_SLEW1)
233 #define S_IO_DRV_G 10
234 #define M_IO_DRV_G _SB_MAKEMASK(2, S_IO_DRV_G)
235 #define V_IO_DRV_G(x) _SB_MAKEVALUE(x, S_IO_DRV_G)
236 #define G_IO_DRV_G(x) _SB_GETVALUE(x, S_IO_DRV_G, M_IO_DRV_G)
238 #define S_IO_SLEW2 12
239 #define M_IO_SLEW2 _SB_MAKEMASK(2, S_IO_SLEW2)
240 #define V_IO_SLEW2(x) _SB_MAKEVALUE(x, S_IO_SLEW2)
241 #define G_IO_SLEW2(x) _SB_GETVALUE(x, S_IO_SLEW2, M_IO_SLEW2)
243 #define S_IO_DRV_H 14
244 #define M_IO_DRV_H _SB_MAKEMASK(2, S_IO_DRV_H)
245 #define V_IO_DRV_H(x) _SB_MAKEVALUE(x, S_IO_DRV_H)
246 #define G_IO_DRV_H(x) _SB_GETVALUE(x, S_IO_DRV_H, M_IO_DRV_H)
249 * Generic Bus Output Drive Control Register 2 (Table 14-20)
253 #define M_IO_DRV_J _SB_MAKEMASK(2, S_IO_DRV_J)
254 #define V_IO_DRV_J(x) _SB_MAKEVALUE(x, S_IO_DRV_J)
255 #define G_IO_DRV_J(x) _SB_GETVALUE(x, S_IO_DRV_J, M_IO_DRV_J)
258 #define M_IO_DRV_K _SB_MAKEMASK(2, S_IO_DRV_K)
259 #define V_IO_DRV_K(x) _SB_MAKEVALUE(x, S_IO_DRV_K)
260 #define G_IO_DRV_K(x) _SB_GETVALUE(x, S_IO_DRV_K, M_IO_DRV_K)
262 #define S_IO_DRV_L 10
263 #define M_IO_DRV_L _SB_MAKEMASK(2, S_IO_DRV_L)
264 #define V_IO_DRV_L(x) _SB_MAKEVALUE(x, S_IO_DRV_L)
265 #define G_IO_DRV_L(x) _SB_GETVALUE(x, S_IO_DRV_L, M_IO_DRV_L)
267 #define S_IO_DRV_M 14
268 #define M_IO_DRV_M _SB_MAKEMASK(2, S_IO_DRV_M)
269 #define V_IO_DRV_M(x) _SB_MAKEVALUE(x, S_IO_DRV_M)
270 #define G_IO_DRV_M(x) _SB_GETVALUE(x, S_IO_DRV_M, M_IO_DRV_M)
273 * Generic Bus Output Drive Control Register 3 (Table 14-21)
277 #define M_IO_SLEW3 _SB_MAKEMASK(2, S_IO_SLEW3)
278 #define V_IO_SLEW3(x) _SB_MAKEVALUE(x, S_IO_SLEW3)
279 #define G_IO_SLEW3(x) _SB_GETVALUE(x, S_IO_SLEW3, M_IO_SLEW3)
282 #define M_IO_DRV_N _SB_MAKEMASK(2, S_IO_DRV_N)
283 #define V_IO_DRV_N(x) _SB_MAKEVALUE(x, S_IO_DRV_N)
284 #define G_IO_DRV_N(x) _SB_GETVALUE(x, S_IO_DRV_N, M_IO_DRV_N)
287 #define M_IO_DRV_P _SB_MAKEMASK(2, S_IO_DRV_P)
288 #define V_IO_DRV_P(x) _SB_MAKEVALUE(x, S_IO_DRV_P)
289 #define G_IO_DRV_P(x) _SB_GETVALUE(x, S_IO_DRV_P, M_IO_DRV_P)
291 #define S_IO_DRV_Q 10
292 #define M_IO_DRV_Q _SB_MAKEMASK(2, S_IO_DRV_Q)
293 #define V_IO_DRV_Q(x) _SB_MAKEVALUE(x, S_IO_DRV_Q)
294 #define G_IO_DRV_Q(x) _SB_GETVALUE(x, S_IO_DRV_Q, M_IO_DRV_Q)
296 #define S_IO_DRV_R 14
297 #define M_IO_DRV_R _SB_MAKEMASK(2, S_IO_DRV_R)
298 #define V_IO_DRV_R(x) _SB_MAKEVALUE(x, S_IO_DRV_R)
299 #define G_IO_DRV_R(x) _SB_GETVALUE(x, S_IO_DRV_R, M_IO_DRV_R)
303 * PCMCIA configuration register (Table 12-6)
306 #define M_PCMCIA_CFG_ATTRMEM _SB_MAKEMASK1(0)
307 #define M_PCMCIA_CFG_3VEN _SB_MAKEMASK1(1)
308 #define M_PCMCIA_CFG_5VEN _SB_MAKEMASK1(2)
309 #define M_PCMCIA_CFG_VPPEN _SB_MAKEMASK1(3)
310 #define M_PCMCIA_CFG_RESET _SB_MAKEMASK1(4)
311 #define M_PCMCIA_CFG_APWRONEN _SB_MAKEMASK1(5)
312 #define M_PCMCIA_CFG_CDMASK _SB_MAKEMASK1(6)
313 #define M_PCMCIA_CFG_WPMASK _SB_MAKEMASK1(7)
314 #define M_PCMCIA_CFG_RDYMASK _SB_MAKEMASK1(8)
315 #define M_PCMCIA_CFG_PWRCTL _SB_MAKEMASK1(9)
317 #if SIBYTE_HDR_FEATURE_CHIP(1480)
318 #define S_PCMCIA_MODE 16
319 #define M_PCMCIA_MODE _SB_MAKEMASK(3, S_PCMCIA_MODE)
320 #define V_PCMCIA_MODE(x) _SB_MAKEVALUE(x, S_PCMCIA_MODE)
321 #define G_PCMCIA_MODE(x) _SB_GETVALUE(x, S_PCMCIA_MODE, M_PCMCIA_MODE)
323 #define K_PCMCIA_MODE_PCMA_NOB 0 /* standard PCMCIA "A", no "B" */
324 #define K_PCMCIA_MODE_IDEA_NOB 1 /* IDE "A", no "B" */
325 #define K_PCMCIA_MODE_PCMIOA_NOB 2 /* PCMCIA with I/O "A", no "B" */
326 #define K_PCMCIA_MODE_PCMA_PCMB 4 /* standard PCMCIA "A", standard PCMCIA "B" */
327 #define K_PCMCIA_MODE_IDEA_PCMB 5 /* IDE "A", standard PCMCIA "B" */
328 #define K_PCMCIA_MODE_PCMA_IDEB 6 /* standard PCMCIA "A", IDE "B" */
329 #define K_PCMCIA_MODE_IDEA_IDEB 7 /* IDE "A", IDE "B" */
334 * PCMCIA status register (Table 12-7)
337 #define M_PCMCIA_STATUS_CD1 _SB_MAKEMASK1(0)
338 #define M_PCMCIA_STATUS_CD2 _SB_MAKEMASK1(1)
339 #define M_PCMCIA_STATUS_VS1 _SB_MAKEMASK1(2)
340 #define M_PCMCIA_STATUS_VS2 _SB_MAKEMASK1(3)
341 #define M_PCMCIA_STATUS_WP _SB_MAKEMASK1(4)
342 #define M_PCMCIA_STATUS_RDY _SB_MAKEMASK1(5)
343 #define M_PCMCIA_STATUS_3VEN _SB_MAKEMASK1(6)
344 #define M_PCMCIA_STATUS_5VEN _SB_MAKEMASK1(7)
345 #define M_PCMCIA_STATUS_CDCHG _SB_MAKEMASK1(8)
346 #define M_PCMCIA_STATUS_WPCHG _SB_MAKEMASK1(9)
347 #define M_PCMCIA_STATUS_RDYCHG _SB_MAKEMASK1(10)
350 * GPIO Interrupt Type Register (table 13-3)
353 #define K_GPIO_INTR_DISABLE 0
354 #define K_GPIO_INTR_EDGE 1
355 #define K_GPIO_INTR_LEVEL 2
356 #define K_GPIO_INTR_SPLIT 3
358 #define S_GPIO_INTR_TYPEX(n) (((n)/2)*2)
359 #define M_GPIO_INTR_TYPEX(n) _SB_MAKEMASK(2, S_GPIO_INTR_TYPEX(n))
360 #define V_GPIO_INTR_TYPEX(n, x) _SB_MAKEVALUE(x, S_GPIO_INTR_TYPEX(n))
361 #define G_GPIO_INTR_TYPEX(n, x) _SB_GETVALUE(x, S_GPIO_INTR_TYPEX(n), M_GPIO_INTR_TYPEX(n))
363 #define S_GPIO_INTR_TYPE0 0
364 #define M_GPIO_INTR_TYPE0 _SB_MAKEMASK(2, S_GPIO_INTR_TYPE0)
365 #define V_GPIO_INTR_TYPE0(x) _SB_MAKEVALUE(x, S_GPIO_INTR_TYPE0)
366 #define G_GPIO_INTR_TYPE0(x) _SB_GETVALUE(x, S_GPIO_INTR_TYPE0, M_GPIO_INTR_TYPE0)
368 #define S_GPIO_INTR_TYPE2 2
369 #define M_GPIO_INTR_TYPE2 _SB_MAKEMASK(2, S_GPIO_INTR_TYPE2)
370 #define V_GPIO_INTR_TYPE2(x) _SB_MAKEVALUE(x, S_GPIO_INTR_TYPE2)
371 #define G_GPIO_INTR_TYPE2(x) _SB_GETVALUE(x, S_GPIO_INTR_TYPE2, M_GPIO_INTR_TYPE2)
373 #define S_GPIO_INTR_TYPE4 4
374 #define M_GPIO_INTR_TYPE4 _SB_MAKEMASK(2, S_GPIO_INTR_TYPE4)
375 #define V_GPIO_INTR_TYPE4(x) _SB_MAKEVALUE(x, S_GPIO_INTR_TYPE4)
376 #define G_GPIO_INTR_TYPE4(x) _SB_GETVALUE(x, S_GPIO_INTR_TYPE4, M_GPIO_INTR_TYPE4)
378 #define S_GPIO_INTR_TYPE6 6
379 #define M_GPIO_INTR_TYPE6 _SB_MAKEMASK(2, S_GPIO_INTR_TYPE6)
380 #define V_GPIO_INTR_TYPE6(x) _SB_MAKEVALUE(x, S_GPIO_INTR_TYPE6)
381 #define G_GPIO_INTR_TYPE6(x) _SB_GETVALUE(x, S_GPIO_INTR_TYPE6, M_GPIO_INTR_TYPE6)
383 #define S_GPIO_INTR_TYPE8 8
384 #define M_GPIO_INTR_TYPE8 _SB_MAKEMASK(2, S_GPIO_INTR_TYPE8)
385 #define V_GPIO_INTR_TYPE8(x) _SB_MAKEVALUE(x, S_GPIO_INTR_TYPE8)
386 #define G_GPIO_INTR_TYPE8(x) _SB_GETVALUE(x, S_GPIO_INTR_TYPE8, M_GPIO_INTR_TYPE8)
388 #define S_GPIO_INTR_TYPE10 10
389 #define M_GPIO_INTR_TYPE10 _SB_MAKEMASK(2, S_GPIO_INTR_TYPE10)
390 #define V_GPIO_INTR_TYPE10(x) _SB_MAKEVALUE(x, S_GPIO_INTR_TYPE10)
391 #define G_GPIO_INTR_TYPE10(x) _SB_GETVALUE(x, S_GPIO_INTR_TYPE10, M_GPIO_INTR_TYPE10)
393 #define S_GPIO_INTR_TYPE12 12
394 #define M_GPIO_INTR_TYPE12 _SB_MAKEMASK(2, S_GPIO_INTR_TYPE12)
395 #define V_GPIO_INTR_TYPE12(x) _SB_MAKEVALUE(x, S_GPIO_INTR_TYPE12)
396 #define G_GPIO_INTR_TYPE12(x) _SB_GETVALUE(x, S_GPIO_INTR_TYPE12, M_GPIO_INTR_TYPE12)
398 #define S_GPIO_INTR_TYPE14 14
399 #define M_GPIO_INTR_TYPE14 _SB_MAKEMASK(2, S_GPIO_INTR_TYPE14)
400 #define V_GPIO_INTR_TYPE14(x) _SB_MAKEVALUE(x, S_GPIO_INTR_TYPE14)
401 #define G_GPIO_INTR_TYPE14(x) _SB_GETVALUE(x, S_GPIO_INTR_TYPE14, M_GPIO_INTR_TYPE14)
403 #if SIBYTE_HDR_FEATURE_CHIP(1480)
406 * GPIO Interrupt Additional Type Register
409 #define K_GPIO_INTR_BOTHEDGE 0
410 #define K_GPIO_INTR_RISEEDGE 1
411 #define K_GPIO_INTR_UNPRED1 2
412 #define K_GPIO_INTR_UNPRED2 3
414 #define S_GPIO_INTR_ATYPEX(n) (((n)/2)*2)
415 #define M_GPIO_INTR_ATYPEX(n) _SB_MAKEMASK(2, S_GPIO_INTR_ATYPEX(n))
416 #define V_GPIO_INTR_ATYPEX(n, x) _SB_MAKEVALUE(x, S_GPIO_INTR_ATYPEX(n))
417 #define G_GPIO_INTR_ATYPEX(n, x) _SB_GETVALUE(x, S_GPIO_INTR_ATYPEX(n), M_GPIO_INTR_ATYPEX(n))
419 #define S_GPIO_INTR_ATYPE0 0
420 #define M_GPIO_INTR_ATYPE0 _SB_MAKEMASK(2, S_GPIO_INTR_ATYPE0)
421 #define V_GPIO_INTR_ATYPE0(x) _SB_MAKEVALUE(x, S_GPIO_INTR_ATYPE0)
422 #define G_GPIO_INTR_ATYPE0(x) _SB_GETVALUE(x, S_GPIO_INTR_ATYPE0, M_GPIO_INTR_ATYPE0)
424 #define S_GPIO_INTR_ATYPE2 2
425 #define M_GPIO_INTR_ATYPE2 _SB_MAKEMASK(2, S_GPIO_INTR_ATYPE2)
426 #define V_GPIO_INTR_ATYPE2(x) _SB_MAKEVALUE(x, S_GPIO_INTR_ATYPE2)
427 #define G_GPIO_INTR_ATYPE2(x) _SB_GETVALUE(x, S_GPIO_INTR_ATYPE2, M_GPIO_INTR_ATYPE2)
429 #define S_GPIO_INTR_ATYPE4 4
430 #define M_GPIO_INTR_ATYPE4 _SB_MAKEMASK(2, S_GPIO_INTR_ATYPE4)
431 #define V_GPIO_INTR_ATYPE4(x) _SB_MAKEVALUE(x, S_GPIO_INTR_ATYPE4)
432 #define G_GPIO_INTR_ATYPE4(x) _SB_GETVALUE(x, S_GPIO_INTR_ATYPE4, M_GPIO_INTR_ATYPE4)
434 #define S_GPIO_INTR_ATYPE6 6
435 #define M_GPIO_INTR_ATYPE6 _SB_MAKEMASK(2, S_GPIO_INTR_ATYPE6)
436 #define V_GPIO_INTR_ATYPE6(x) _SB_MAKEVALUE(x, S_GPIO_INTR_ATYPE6)
437 #define G_GPIO_INTR_ATYPE6(x) _SB_GETVALUE(x, S_GPIO_INTR_ATYPE6, M_GPIO_INTR_ATYPE6)
439 #define S_GPIO_INTR_ATYPE8 8
440 #define M_GPIO_INTR_ATYPE8 _SB_MAKEMASK(2, S_GPIO_INTR_ATYPE8)
441 #define V_GPIO_INTR_ATYPE8(x) _SB_MAKEVALUE(x, S_GPIO_INTR_ATYPE8)
442 #define G_GPIO_INTR_ATYPE8(x) _SB_GETVALUE(x, S_GPIO_INTR_ATYPE8, M_GPIO_INTR_ATYPE8)
444 #define S_GPIO_INTR_ATYPE10 10
445 #define M_GPIO_INTR_ATYPE10 _SB_MAKEMASK(2, S_GPIO_INTR_ATYPE10)
446 #define V_GPIO_INTR_ATYPE10(x) _SB_MAKEVALUE(x, S_GPIO_INTR_ATYPE10)
447 #define G_GPIO_INTR_ATYPE10(x) _SB_GETVALUE(x, S_GPIO_INTR_ATYPE10, M_GPIO_INTR_ATYPE10)
449 #define S_GPIO_INTR_ATYPE12 12
450 #define M_GPIO_INTR_ATYPE12 _SB_MAKEMASK(2, S_GPIO_INTR_ATYPE12)
451 #define V_GPIO_INTR_ATYPE12(x) _SB_MAKEVALUE(x, S_GPIO_INTR_ATYPE12)
452 #define G_GPIO_INTR_ATYPE12(x) _SB_GETVALUE(x, S_GPIO_INTR_ATYPE12, M_GPIO_INTR_ATYPE12)
454 #define S_GPIO_INTR_ATYPE14 14
455 #define M_GPIO_INTR_ATYPE14 _SB_MAKEMASK(2, S_GPIO_INTR_ATYPE14)
456 #define V_GPIO_INTR_ATYPE14(x) _SB_MAKEVALUE(x, S_GPIO_INTR_ATYPE14)
457 #define G_GPIO_INTR_ATYPE14(x) _SB_GETVALUE(x, S_GPIO_INTR_ATYPE14, M_GPIO_INTR_ATYPE14)