1 #ifndef __ALPHA_LCA__H__
2 #define __ALPHA_LCA__H__
4 #include <asm/compiler.h>
61 #define LCA_MEM_BCR0 (IDENT_ADDR + 0x120000000UL)
62 #define LCA_MEM_BCR1 (IDENT_ADDR + 0x120000008UL)
63 #define LCA_MEM_BCR2 (IDENT_ADDR + 0x120000010UL)
64 #define LCA_MEM_BCR3 (IDENT_ADDR + 0x120000018UL)
65 #define LCA_MEM_BMR0 (IDENT_ADDR + 0x120000020UL)
66 #define LCA_MEM_BMR1 (IDENT_ADDR + 0x120000028UL)
67 #define LCA_MEM_BMR2 (IDENT_ADDR + 0x120000030UL)
68 #define LCA_MEM_BMR3 (IDENT_ADDR + 0x120000038UL)
69 #define LCA_MEM_BTR0 (IDENT_ADDR + 0x120000040UL)
70 #define LCA_MEM_BTR1 (IDENT_ADDR + 0x120000048UL)
71 #define LCA_MEM_BTR2 (IDENT_ADDR + 0x120000050UL)
72 #define LCA_MEM_BTR3 (IDENT_ADDR + 0x120000058UL)
73 #define LCA_MEM_GTR (IDENT_ADDR + 0x120000060UL)
74 #define LCA_MEM_ESR (IDENT_ADDR + 0x120000068UL)
75 #define LCA_MEM_EAR (IDENT_ADDR + 0x120000070UL)
76 #define LCA_MEM_CAR (IDENT_ADDR + 0x120000078UL)
77 #define LCA_MEM_VGR (IDENT_ADDR + 0x120000080UL)
78 #define LCA_MEM_PLM (IDENT_ADDR + 0x120000088UL)
79 #define LCA_MEM_FOR (IDENT_ADDR + 0x120000090UL)
84 #define LCA_IOC_HAE (IDENT_ADDR + 0x180000000UL)
85 #define LCA_IOC_CONF (IDENT_ADDR + 0x180000020UL)
86 #define LCA_IOC_STAT0 (IDENT_ADDR + 0x180000040UL)
87 #define LCA_IOC_STAT1 (IDENT_ADDR + 0x180000060UL)
88 #define LCA_IOC_TBIA (IDENT_ADDR + 0x180000080UL)
89 #define LCA_IOC_TB_ENA (IDENT_ADDR + 0x1800000a0UL)
90 #define LCA_IOC_SFT_RST (IDENT_ADDR + 0x1800000c0UL)
91 #define LCA_IOC_PAR_DIS (IDENT_ADDR + 0x1800000e0UL)
92 #define LCA_IOC_W_BASE0 (IDENT_ADDR + 0x180000100UL)
93 #define LCA_IOC_W_BASE1 (IDENT_ADDR + 0x180000120UL)
94 #define LCA_IOC_W_MASK0 (IDENT_ADDR + 0x180000140UL)
95 #define LCA_IOC_W_MASK1 (IDENT_ADDR + 0x180000160UL)
96 #define LCA_IOC_T_BASE0 (IDENT_ADDR + 0x180000180UL)
97 #define LCA_IOC_T_BASE1 (IDENT_ADDR + 0x1800001a0UL)
98 #define LCA_IOC_TB_TAG0 (IDENT_ADDR + 0x188000000UL)
99 #define LCA_IOC_TB_TAG1 (IDENT_ADDR + 0x188000020UL)
100 #define LCA_IOC_TB_TAG2 (IDENT_ADDR + 0x188000040UL)
101 #define LCA_IOC_TB_TAG3 (IDENT_ADDR + 0x188000060UL)
102 #define LCA_IOC_TB_TAG4 (IDENT_ADDR + 0x188000070UL)
103 #define LCA_IOC_TB_TAG5 (IDENT_ADDR + 0x1880000a0UL)
104 #define LCA_IOC_TB_TAG6 (IDENT_ADDR + 0x1880000c0UL)
105 #define LCA_IOC_TB_TAG7 (IDENT_ADDR + 0x1880000e0UL)
110 #define LCA_IACK_SC (IDENT_ADDR + 0x1a0000000UL)
111 #define LCA_CONF (IDENT_ADDR + 0x1e0000000UL)
112 #define LCA_IO (IDENT_ADDR + 0x1c0000000UL)
113 #define LCA_SPARSE_MEM (IDENT_ADDR + 0x200000000UL)
114 #define LCA_DENSE_MEM (IDENT_ADDR + 0x300000000UL)
119 #define LCA_IOC_STAT0_CMD 0xf
120 #define LCA_IOC_STAT0_ERR (1<<4)
121 #define LCA_IOC_STAT0_LOST (1<<5)
122 #define LCA_IOC_STAT0_THIT (1<<6)
123 #define LCA_IOC_STAT0_TREF (1<<7)
124 #define LCA_IOC_STAT0_CODE_SHIFT 8
125 #define LCA_IOC_STAT0_CODE_MASK 0x7
126 #define LCA_IOC_STAT0_P_NBR_SHIFT 13
127 #define LCA_IOC_STAT0_P_NBR_MASK 0x7ffff
129 #define LCA_HAE_ADDRESS LCA_IOC_HAE
132 #define LCA_PMR_ADDR (IDENT_ADDR + 0x120000098UL)
133 #define LCA_PMR_PDIV 0x7
134 #define LCA_PMR_ODIV 0x38
135 #define LCA_PMR_INTO 0x40
136 #define LCA_PMR_DMAO 0x80
137 #define LCA_PMR_OCCEB 0xffff0000L
138 #define LCA_PMR_OCCOB 0xffff000000000000L
139 #define LCA_PMR_PRIMARY_MASK 0xfffffffffffffff8L
143 #define LCA_READ_PMR (*(volatile unsigned long *)LCA_PMR_ADDR)
144 #define LCA_WRITE_PMR(d) (*((volatile unsigned long *)LCA_PMR_ADDR) = (d))
146 #define LCA_GET_PRIMARY(r) ((r) & LCA_PMR_PDIV)
147 #define LCA_GET_OVERRIDE(r) (((r) >> 3) & LCA_PMR_PDIV)
148 #define LCA_SET_PRIMARY_CLOCK(r, c) ((r) = (((r) & LCA_PMR_PRIMARY_MASK)|(c)))
151 #define LCA_PMR_DIV_1 0x0
152 #define LCA_PMR_DIV_1_5 0x1
153 #define LCA_PMR_DIV_2 0x2
154 #define LCA_PMR_DIV_4 0x3
155 #define LCA_PMR_DIV_8 0x4
156 #define LCA_PMR_DIV_16 0x5
157 #define LCA_PMR_DIV_MIN DIV_1
158 #define LCA_PMR_DIV_MAX DIV_16
176 unsigned long pt[31];
202 #ifndef __EXTERN_INLINE
203 #define __EXTERN_INLINE extern inline
204 #define __IO_EXTERN_INLINE
218 #define vip volatile int __force *
219 #define vuip volatile unsigned int __force *
220 #define vulp volatile unsigned long __force *
222 #define LCA_SET_HAE \
224 if (addr >= (1UL << 24)) { \
225 unsigned long msb = addr & 0xf8000000; \
234 unsigned long addr = (
unsigned long) xaddr;
235 unsigned long result, base_and_type;
243 base_and_type =
LCA_IO + 0x00;
246 result = *(
vip) ((addr << 5) + base_and_type);
252 unsigned long addr = (
unsigned long) xaddr;
253 unsigned long w, base_and_type;
261 base_and_type =
LCA_IO + 0x00;
265 *(
vuip) ((addr << 5) + base_and_type) = w;
270 unsigned long addr = (
unsigned long) xaddr;
271 unsigned long result, base_and_type;
279 base_and_type =
LCA_IO + 0x08;
282 result = *(
vip) ((addr << 5) + base_and_type);
288 unsigned long addr = (
unsigned long) xaddr;
289 unsigned long w, base_and_type;
297 base_and_type =
LCA_IO + 0x08;
301 *(
vuip) ((addr << 5) + base_and_type) = w;
306 unsigned long addr = (
unsigned long) xaddr;
314 unsigned long addr = (
unsigned long) xaddr;
333 return addr >= IDENT_ADDR + 0x120000000
UL;
346 #define __IO_PREFIX lca
347 #define lca_trivial_rw_bw 2
348 #define lca_trivial_rw_lq 1
349 #define lca_trivial_io_bw 0
350 #define lca_trivial_io_lq 0
351 #define lca_trivial_iounmap 1
354 #ifdef __IO_EXTERN_INLINE
355 #undef __EXTERN_INLINE
356 #undef __IO_EXTERN_INLINE