1 #ifndef __ALPHA_APECS__H__
2 #define __ALPHA_APECS__H__
4 #include <linux/types.h>
5 #include <asm/compiler.h>
77 #define APECS_IOC_DCSR (IDENT_ADDR + 0x1A0000000UL)
78 #define APECS_IOC_PEAR (IDENT_ADDR + 0x1A0000020UL)
79 #define APECS_IOC_SEAR (IDENT_ADDR + 0x1A0000040UL)
80 #define APECS_IOC_DR1 (IDENT_ADDR + 0x1A0000060UL)
81 #define APECS_IOC_DR2 (IDENT_ADDR + 0x1A0000080UL)
82 #define APECS_IOC_DR3 (IDENT_ADDR + 0x1A00000A0UL)
84 #define APECS_IOC_TB1R (IDENT_ADDR + 0x1A00000C0UL)
85 #define APECS_IOC_TB2R (IDENT_ADDR + 0x1A00000E0UL)
87 #define APECS_IOC_PB1R (IDENT_ADDR + 0x1A0000100UL)
88 #define APECS_IOC_PB2R (IDENT_ADDR + 0x1A0000120UL)
90 #define APECS_IOC_PM1R (IDENT_ADDR + 0x1A0000140UL)
91 #define APECS_IOC_PM2R (IDENT_ADDR + 0x1A0000160UL)
93 #define APECS_IOC_HAXR0 (IDENT_ADDR + 0x1A0000180UL)
94 #define APECS_IOC_HAXR1 (IDENT_ADDR + 0x1A00001A0UL)
95 #define APECS_IOC_HAXR2 (IDENT_ADDR + 0x1A00001C0UL)
97 #define APECS_IOC_PMLT (IDENT_ADDR + 0x1A00001E0UL)
99 #define APECS_IOC_TLBTAG0 (IDENT_ADDR + 0x1A0000200UL)
100 #define APECS_IOC_TLBTAG1 (IDENT_ADDR + 0x1A0000220UL)
101 #define APECS_IOC_TLBTAG2 (IDENT_ADDR + 0x1A0000240UL)
102 #define APECS_IOC_TLBTAG3 (IDENT_ADDR + 0x1A0000260UL)
103 #define APECS_IOC_TLBTAG4 (IDENT_ADDR + 0x1A0000280UL)
104 #define APECS_IOC_TLBTAG5 (IDENT_ADDR + 0x1A00002A0UL)
105 #define APECS_IOC_TLBTAG6 (IDENT_ADDR + 0x1A00002C0UL)
106 #define APECS_IOC_TLBTAG7 (IDENT_ADDR + 0x1A00002E0UL)
108 #define APECS_IOC_TLBDATA0 (IDENT_ADDR + 0x1A0000300UL)
109 #define APECS_IOC_TLBDATA1 (IDENT_ADDR + 0x1A0000320UL)
110 #define APECS_IOC_TLBDATA2 (IDENT_ADDR + 0x1A0000340UL)
111 #define APECS_IOC_TLBDATA3 (IDENT_ADDR + 0x1A0000360UL)
112 #define APECS_IOC_TLBDATA4 (IDENT_ADDR + 0x1A0000380UL)
113 #define APECS_IOC_TLBDATA5 (IDENT_ADDR + 0x1A00003A0UL)
114 #define APECS_IOC_TLBDATA6 (IDENT_ADDR + 0x1A00003C0UL)
115 #define APECS_IOC_TLBDATA7 (IDENT_ADDR + 0x1A00003E0UL)
117 #define APECS_IOC_TBIA (IDENT_ADDR + 0x1A0000400UL)
125 #define APECS_MEM_GCR (IDENT_ADDR + 0x180000000UL)
126 #define APECS_MEM_EDSR (IDENT_ADDR + 0x180000040UL)
127 #define APECS_MEM_TAR (IDENT_ADDR + 0x180000060UL)
128 #define APECS_MEM_ELAR (IDENT_ADDR + 0x180000080UL)
129 #define APECS_MEM_EHAR (IDENT_ADDR + 0x1800000a0UL)
130 #define APECS_MEM_SFT_RST (IDENT_ADDR + 0x1800000c0UL)
131 #define APECS_MEM_LDxLAR (IDENT_ADDR + 0x1800000e0UL)
132 #define APECS_MEM_LDxHAR (IDENT_ADDR + 0x180000100UL)
133 #define APECS_MEM_GTR (IDENT_ADDR + 0x180000200UL)
134 #define APECS_MEM_RTR (IDENT_ADDR + 0x180000220UL)
135 #define APECS_MEM_VFPR (IDENT_ADDR + 0x180000240UL)
136 #define APECS_MEM_PDLDR (IDENT_ADDR + 0x180000260UL)
137 #define APECS_MEM_PDhDR (IDENT_ADDR + 0x180000280UL)
140 #define APECS_MEM_B0BAR (IDENT_ADDR + 0x180000800UL)
141 #define APECS_MEM_B1BAR (IDENT_ADDR + 0x180000820UL)
142 #define APECS_MEM_B2BAR (IDENT_ADDR + 0x180000840UL)
143 #define APECS_MEM_B3BAR (IDENT_ADDR + 0x180000860UL)
144 #define APECS_MEM_B4BAR (IDENT_ADDR + 0x180000880UL)
145 #define APECS_MEM_B5BAR (IDENT_ADDR + 0x1800008A0UL)
146 #define APECS_MEM_B6BAR (IDENT_ADDR + 0x1800008C0UL)
147 #define APECS_MEM_B7BAR (IDENT_ADDR + 0x1800008E0UL)
148 #define APECS_MEM_B8BAR (IDENT_ADDR + 0x180000900UL)
151 #define APECS_MEM_B0BCR (IDENT_ADDR + 0x180000A00UL)
152 #define APECS_MEM_B1BCR (IDENT_ADDR + 0x180000A20UL)
153 #define APECS_MEM_B2BCR (IDENT_ADDR + 0x180000A40UL)
154 #define APECS_MEM_B3BCR (IDENT_ADDR + 0x180000A60UL)
155 #define APECS_MEM_B4BCR (IDENT_ADDR + 0x180000A80UL)
156 #define APECS_MEM_B5BCR (IDENT_ADDR + 0x180000AA0UL)
157 #define APECS_MEM_B6BCR (IDENT_ADDR + 0x180000AC0UL)
158 #define APECS_MEM_B7BCR (IDENT_ADDR + 0x180000AE0UL)
159 #define APECS_MEM_B8BCR (IDENT_ADDR + 0x180000B00UL)
162 #define APECS_MEM_B0TRA (IDENT_ADDR + 0x180000C00UL)
163 #define APECS_MEM_B1TRA (IDENT_ADDR + 0x180000C20UL)
164 #define APECS_MEM_B2TRA (IDENT_ADDR + 0x180000C40UL)
165 #define APECS_MEM_B3TRA (IDENT_ADDR + 0x180000C60UL)
166 #define APECS_MEM_B4TRA (IDENT_ADDR + 0x180000C80UL)
167 #define APECS_MEM_B5TRA (IDENT_ADDR + 0x180000CA0UL)
168 #define APECS_MEM_B6TRA (IDENT_ADDR + 0x180000CC0UL)
169 #define APECS_MEM_B7TRA (IDENT_ADDR + 0x180000CE0UL)
170 #define APECS_MEM_B8TRA (IDENT_ADDR + 0x180000D00UL)
173 #define APECS_MEM_B0TRB (IDENT_ADDR + 0x180000E00UL)
174 #define APECS_MEM_B1TRB (IDENT_ADDR + 0x180000E20UL)
175 #define APECS_MEM_B2TRB (IDENT_ADDR + 0x180000E40UL)
176 #define APECS_MEM_B3TRB (IDENT_ADDR + 0x180000E60UL)
177 #define APECS_MEM_B4TRB (IDENT_ADDR + 0x180000E80UL)
178 #define APECS_MEM_B5TRB (IDENT_ADDR + 0x180000EA0UL)
179 #define APECS_MEM_B6TRB (IDENT_ADDR + 0x180000EC0UL)
180 #define APECS_MEM_B7TRB (IDENT_ADDR + 0x180000EE0UL)
181 #define APECS_MEM_B8TRB (IDENT_ADDR + 0x180000F00UL)
187 #define APECS_IACK_SC (IDENT_ADDR + 0x1b0000000UL)
188 #define APECS_CONF (IDENT_ADDR + 0x1e0000000UL)
189 #define APECS_IO (IDENT_ADDR + 0x1c0000000UL)
190 #define APECS_SPARSE_MEM (IDENT_ADDR + 0x200000000UL)
191 #define APECS_DENSE_MEM (IDENT_ADDR + 0x300000000UL)
197 #define APECS_IOC_STAT0_CMD 0xf
198 #define APECS_IOC_STAT0_ERR (1<<4)
199 #define APECS_IOC_STAT0_LOST (1<<5)
200 #define APECS_IOC_STAT0_THIT (1<<6)
201 #define APECS_IOC_STAT0_TREF (1<<7)
202 #define APECS_IOC_STAT0_CODE_SHIFT 8
203 #define APECS_IOC_STAT0_CODE_MASK 0x7
204 #define APECS_IOC_STAT0_P_NBR_SHIFT 13
205 #define APECS_IOC_STAT0_P_NBR_MASK 0x7ffff
207 #define APECS_HAE_ADDRESS APECS_IOC_HAXR1
357 #ifndef __EXTERN_INLINE
358 #define __EXTERN_INLINE extern inline
359 #define __IO_EXTERN_INLINE
373 #define vip volatile int __force *
374 #define vuip volatile unsigned int __force *
375 #define vulp volatile unsigned long __force *
377 #define APECS_SET_HAE \
379 if (addr >= (1UL << 24)) { \
380 unsigned long msb = addr & 0xf8000000; \
388 unsigned long addr = (
unsigned long) xaddr;
389 unsigned long result, base_and_type;
400 result = *(
vip) ((addr << 5) + base_and_type);
406 unsigned long addr = (
unsigned long) xaddr;
407 unsigned long w, base_and_type;
419 *(
vuip) ((addr << 5) + base_and_type) = w;
424 unsigned long addr = (
unsigned long) xaddr;
425 unsigned long result, base_and_type;
436 result = *(
vip) ((addr << 5) + base_and_type);
442 unsigned long addr = (
unsigned long) xaddr;
443 unsigned long w, base_and_type;
455 *(
vuip) ((addr << 5) + base_and_type) = w;
460 unsigned long addr = (
unsigned long) xaddr;
468 unsigned long addr = (
unsigned long) xaddr;
487 return addr >= IDENT_ADDR + 0x180000000
UL;
502 #define __IO_PREFIX apecs
503 #define apecs_trivial_io_bw 0
504 #define apecs_trivial_io_lq 0
505 #define apecs_trivial_rw_bw 2
506 #define apecs_trivial_rw_lq 1
507 #define apecs_trivial_iounmap 1
510 #ifdef __IO_EXTERN_INLINE
511 #undef __EXTERN_INLINE
512 #undef __IO_EXTERN_INLINE