Go to the documentation of this file.
11 #ifndef __ALPHA_MARVEL__H__
12 #define __ALPHA_MARVEL__H__
14 #include <linux/types.h>
17 #include <asm/compiler.h>
19 #define MARVEL_MAX_PIDS 32
20 #define MARVEL_IRQ_VEC_PE_SHIFT (10)
21 #define MARVEL_IRQ_VEC_IRQ_MASK ((1 << MARVEL_IRQ_VEC_PE_SHIFT) - 1)
22 #define MARVEL_NR_IRQS \
23 (16 + (MARVEL_MAX_PIDS * (1 << MARVEL_IRQ_VEC_PE_SHIFT)))
52 #define EV7_MASK40(addr) ((addr) & ((1UL << 41) - 1))
53 #define EV7_KERN_ADDR(addr) ((void *)(IDENT_ADDR | EV7_MASK40(addr)))
55 #define EV7_PE_MASK 0x1ffUL
56 #define EV7_IPE(pe) ((~((long)(pe)) & EV7_PE_MASK) << 35)
58 #define EV7_CSR_PHYS(pe, off) (EV7_IPE(pe) | (0x7FFCUL << 20) | (off))
59 #define EV7_CSRS_PHYS(pe) (EV7_CSR_PHYS(pe, 0UL))
61 #define EV7_CSR_KERN(pe, off) (EV7_KERN_ADDR(EV7_CSR_PHYS(pe, off)))
62 #define EV7_CSRS_KERN(pe) (EV7_KERN_ADDR(EV7_CSRS_PHYS(pe)))
64 #define EV7_CSR_OFFSET(name) ((unsigned long)&((ev7_csrs *)NULL)->name.csr)
204 #define wbase_m_ena 0x1
205 #define wbase_m_sg 0x2
206 #define wbase_m_dac 0x4
207 #define wbase_m_addr 0xFFF00000
244 #define IO7_KERN_ADDR(addr) (EV7_KERN_ADDR(addr))
246 #define IO7_PORT_MASK 0x07UL
248 #define IO7_IPE(pe) (EV7_IPE(pe))
249 #define IO7_IPORT(port) ((~((long)(port)) & IO7_PORT_MASK) << 32)
251 #define IO7_HOSE(pe, port) (IO7_IPE(pe) | IO7_IPORT(port))
253 #define IO7_MEM_PHYS(pe, port) (IO7_HOSE(pe, port) | 0x00000000UL)
254 #define IO7_CONF_PHYS(pe, port) (IO7_HOSE(pe, port) | 0xFE000000UL)
255 #define IO7_IO_PHYS(pe, port) (IO7_HOSE(pe, port) | 0xFF000000UL)
256 #define IO7_CSR_PHYS(pe, port, off) \
257 (IO7_HOSE(pe, port) | 0xFF800000UL | (off))
258 #define IO7_CSRS_PHYS(pe, port) (IO7_CSR_PHYS(pe, port, 0UL))
259 #define IO7_PORT7_CSRS_PHYS(pe) (IO7_CSR_PHYS(pe, 7, 0x300000UL))
261 #define IO7_MEM_KERN(pe, port) (IO7_KERN_ADDR(IO7_MEM_PHYS(pe, port)))
262 #define IO7_CONF_KERN(pe, port) (IO7_KERN_ADDR(IO7_CONF_PHYS(pe, port)))
263 #define IO7_IO_KERN(pe, port) (IO7_KERN_ADDR(IO7_IO_PHYS(pe, port)))
264 #define IO7_CSR_KERN(pe, port, off) (IO7_KERN_ADDR(IO7_CSR_PHYS(pe,port,off)))
265 #define IO7_CSRS_KERN(pe, port) (IO7_KERN_ADDR(IO7_CSRS_PHYS(pe, port)))
266 #define IO7_PORT7_CSRS_KERN(pe) (IO7_KERN_ADDR(IO7_PORT7_CSRS_PHYS(pe)))
268 #define IO7_PLL_RNGA(pll) (((pll) >> 3) & 0x7)
269 #define IO7_PLL_RNGB(pll) (((pll) >> 6) & 0x7)
271 #define IO7_MEM_SPACE (2UL * 1024 * 1024 * 1024)
272 #define IO7_IO_SPACE (8UL * 1024 * 1024)
278 #define IO7_DAC_OFFSET (1UL << 49)
283 #define MARVEL_IACK_SC \
285 (&(((io7_ioport_csrs *)IO7_CSRS_KERN(0, 0))->POx_IACK_SPECIAL)))
292 #define IO7_NUM_PORTS 4
293 #define IO7_AGP_PORT 3
303 unsigned long saved_wbase[4];
304 unsigned long saved_wmask[4];
305 unsigned long saved_tbase[4];
313 struct io7_port
ports[IO7_NUM_PORTS];
318 #ifndef __EXTERN_INLINE
319 # define __EXTERN_INLINE extern inline
320 # define __IO_EXTERN_INLINE
331 #define vucp volatile unsigned char __force *
332 #define vusp volatile unsigned short __force *
353 return (addr >> 40) & 1;
362 #define __IO_PREFIX marvel
363 #define marvel_trivial_rw_bw 1
364 #define marvel_trivial_rw_lq 1
365 #define marvel_trivial_io_bw 0
366 #define marvel_trivial_io_lq 1
367 #define marvel_trivial_iounmap 0
370 #ifdef __IO_EXTERN_INLINE
371 # undef __EXTERN_INLINE
372 # undef __IO_EXTERN_INLINE