Import 2.3.18pre1
[davej-history.git] / include / asm-ppc / amigappc.h
blobbea284b2d4606974b8ffc444d1fa0a312dbdd1f5
1 /*
2 ** asm-m68k/amigappc.h -- This header defines some values and pointers for
3 ** the Phase 5 PowerUp card.
4 **
5 ** Copyright 1997, 1998 by Phase5, Germany.
6 **
7 ** This file is subject to the terms and conditions of the GNU General Public
8 ** License. See the file COPYING in the main directory of this archive
9 ** for more details.
11 ** Created: 7/22/97 by Jesper Skov
14 #ifndef _M68K_AMIGAPPC_H
15 #define _M68K_AMIGAPPC_H
17 #ifndef __ASSEMBLY__
19 #ifndef iobarrier_rw/* Don't include io.h - avoid circular dependency */
20 #define iobarrier_rw() eieio()
21 #endif
23 #define APUS_WRITE(_a_, _v_) \
24 do { \
25 (*((volatile unsigned char *)(_a_)) = (_v_)); \
26 iobarrier_rw (); \
27 } while (0)
29 #define APUS_READ(_a_, _v_) \
30 do { \
31 (_v_) = (*((volatile unsigned char *)(_a_))); \
32 iobarrier_rw (); \
33 } while (0)
34 #endif/* ndef __ASSEMBLY__ */
36 /* Maybe add a [#ifdef WANT_ZTWOBASE] condition to amigahw.h? */
37 #define zTwoBase (0x80000000)
39 /* At CYBERBASEp we find the following sum:
40 * -KERNELBASE+CyberStormMemoryBase
42 #define CYBERBASEp (0xfff00000)
44 #define APUS_IPL_BASE (zTwoBase + 0x00f60000)
45 #define APUS_REG_RESET (APUS_IPL_BASE + 0x00)
46 #define APUS_REG_WAITSTATE (APUS_IPL_BASE + 0x10)
47 #define APUS_REG_SHADOW (APUS_IPL_BASE + 0x18)
48 #define APUS_REG_LOCK (APUS_IPL_BASE + 0x20)
49 #define APUS_REG_INT (APUS_IPL_BASE + 0x28)
50 #define APUS_IPL_EMU (APUS_IPL_BASE + 0x30)
51 #define APUS_INT_LVL (APUS_IPL_BASE + 0x38)
53 #define REGSHADOW_SETRESET (0x80)
54 #define REGSHADOW_SELFRESET (0x40)
56 #define REGLOCK_SETRESET (0x80)
57 #define REGLOCK_BLACKMAGICK1 (0x40)
58 #define REGLOCK_BLACKMAGICK2 (0x20)
59 #define REGLOCK_BLACKMAGICK3 (0x10)
61 #define REGWAITSTATE_SETRESET (0x80)
62 #define REGWAITSTATE_PPCW (0x08)
63 #define REGWAITSTATE_PPCR (0x04)
65 #define REGRESET_SETRESET (0x80)
66 #define REGRESET_PPCRESET (0x10)
67 #define REGRESET_M68KRESET (0x08)
68 #define REGRESET_AMIGARESET (0x04)
69 #define REGRESET_AUXRESET (0x02)
70 #define REGRESET_SCSIRESET (0x01)
72 #define REGINT_SETRESET (0x80)
73 #define REGINT_ENABLEIPL (0x02)
74 #define REGINT_INTMASTER (0x01)
76 #define IPLEMU_SETRESET (0x80)
77 #define IPLEMU_DISABLEINT (0x40)
78 #define IPLEMU_IPL2 (0x20)
79 #define IPLEMU_IPL1 (0x10)
80 #define IPLEMU_IPL0 (0x08)
81 #define IPLEMU_PPCIPL2 (0x04)
82 #define IPLEMU_PPCIPL1 (0x02)
83 #define IPLEMU_PPCIPL0 (0x01)
84 #define IPLEMU_IPLMASK (IPLEMU_PPCIPL2|IPLEMU_PPCIPL1|IPLEMU_PPCIPL0)
86 #define INTLVL_SETRESET (0x80)
87 #define INTLVL_MASK (0x7f)
89 #endif/* _M68k_AMIGAPPC_H */
close