amigappc.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. ** asm-ppc/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.
  10. **
  11. ** Created: 7/22/97 by Jesper Skov
  12. */
  13. #ifdef __KERNEL__
  14. #ifndef _M68K_AMIGAPPC_H
  15. #define _M68K_AMIGAPPC_H
  16. #ifndef __ASSEMBLY__
  17. /* #include <asm/system.h> */
  18. #define mb() __asm__ __volatile__ ("sync" : : : "memory")
  19. #define APUS_WRITE(_a_, _v_) \
  20. do { \
  21. (*((volatile unsigned char *)(_a_)) = (_v_)); \
  22. mb(); \
  23. } while (0)
  24. #define APUS_READ(_a_, _v_) \
  25. do { \
  26. (_v_) = (*((volatile unsigned char *)(_a_))); \
  27. mb(); \
  28. } while (0)
  29. #endif /* ndef __ASSEMBLY__ */
  30. /* Maybe add a [#ifdef WANT_ZTWOBASE] condition to amigahw.h? */
  31. #define zTwoBase (0x80000000)
  32. #define APUS_IPL_BASE (zTwoBase + 0x00f60000)
  33. #define APUS_REG_RESET (APUS_IPL_BASE + 0x00)
  34. #define APUS_REG_WAITSTATE (APUS_IPL_BASE + 0x10)
  35. #define APUS_REG_SHADOW (APUS_IPL_BASE + 0x18)
  36. #define APUS_REG_LOCK (APUS_IPL_BASE + 0x20)
  37. #define APUS_REG_INT (APUS_IPL_BASE + 0x28)
  38. #define APUS_IPL_EMU (APUS_IPL_BASE + 0x30)
  39. #define APUS_INT_LVL (APUS_IPL_BASE + 0x38)
  40. #define REGSHADOW_SETRESET (0x80)
  41. #define REGSHADOW_SELFRESET (0x40)
  42. #define REGLOCK_SETRESET (0x80)
  43. #define REGLOCK_BLACKMAGICK1 (0x40)
  44. #define REGLOCK_BLACKMAGICK2 (0x20)
  45. #define REGLOCK_BLACKMAGICK3 (0x10)
  46. #define REGWAITSTATE_SETRESET (0x80)
  47. #define REGWAITSTATE_PPCW (0x08)
  48. #define REGWAITSTATE_PPCR (0x04)
  49. #define REGRESET_SETRESET (0x80)
  50. #define REGRESET_PPCRESET (0x10)
  51. #define REGRESET_M68KRESET (0x08)
  52. #define REGRESET_AMIGARESET (0x04)
  53. #define REGRESET_AUXRESET (0x02)
  54. #define REGRESET_SCSIRESET (0x01)
  55. #define REGINT_SETRESET (0x80)
  56. #define REGINT_ENABLEIPL (0x02)
  57. #define REGINT_INTMASTER (0x01)
  58. #define IPLEMU_SETRESET (0x80)
  59. #define IPLEMU_DISABLEINT (0x40)
  60. #define IPLEMU_IPL2 (0x20)
  61. #define IPLEMU_IPL1 (0x10)
  62. #define IPLEMU_IPL0 (0x08)
  63. #define IPLEMU_PPCIPL2 (0x04)
  64. #define IPLEMU_PPCIPL1 (0x02)
  65. #define IPLEMU_PPCIPL0 (0x01)
  66. #define IPLEMU_IPLMASK (IPLEMU_PPCIPL2|IPLEMU_PPCIPL1|IPLEMU_PPCIPL0)
  67. #define INTLVL_SETRESET (0x80)
  68. #define INTLVL_MASK (0x7f)
  69. #endif /* _M68k_AMIGAPPC_H */
  70. #endif /* __KERNEL__ */