hydra.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. * include/asm-ppc/hydra.h -- Mac I/O `Hydra' definitions
  3. *
  4. * Copyright (C) 1997 Geert Uytterhoeven
  5. *
  6. * This file is based on the following documentation:
  7. *
  8. * Macintosh Technology in the Common Hardware Reference Platform
  9. * Apple Computer, Inc.
  10. *
  11. * © Copyright 1995 Apple Computer, Inc. All rights reserved.
  12. *
  13. * It's available online from http://www.cpu.lu/~mlan/ftp/MacTech.pdf
  14. * You can obtain paper copies of this book from computer bookstores or by
  15. * writing Morgan Kaufmann Publishers, Inc., 340 Pine Street, Sixth Floor, San
  16. * Francisco, CA 94104. Reference ISBN 1-55860-393-X.
  17. *
  18. * This file is subject to the terms and conditions of the GNU General Public
  19. * License. See the file COPYING in the main directory of this archive
  20. * for more details.
  21. */
  22. #ifndef _ASMPPC_HYDRA_H
  23. #define _ASMPPC_HYDRA_H
  24. #ifdef __KERNEL__
  25. struct Hydra {
  26. /* DBDMA Controller Register Space */
  27. char Pad1[0x30];
  28. u_int CachePD;
  29. u_int IDs;
  30. u_int Feature_Control;
  31. char Pad2[0x7fc4];
  32. /* DBDMA Channel Register Space */
  33. char SCSI_DMA[0x100];
  34. char Pad3[0x300];
  35. char SCCA_Tx_DMA[0x100];
  36. char SCCA_Rx_DMA[0x100];
  37. char SCCB_Tx_DMA[0x100];
  38. char SCCB_Rx_DMA[0x100];
  39. char Pad4[0x7800];
  40. /* Device Register Space */
  41. char SCSI[0x1000];
  42. char ADB[0x1000];
  43. char SCC_Legacy[0x1000];
  44. char SCC[0x1000];
  45. char Pad9[0x2000];
  46. char VIA[0x2000];
  47. char Pad10[0x28000];
  48. char OpenPIC[0x40000];
  49. };
  50. extern volatile struct Hydra __iomem *Hydra;
  51. /*
  52. * Feature Control Register
  53. */
  54. #define HYDRA_FC_SCC_CELL_EN 0x00000001 /* Enable SCC Clock */
  55. #define HYDRA_FC_SCSI_CELL_EN 0x00000002 /* Enable SCSI Clock */
  56. #define HYDRA_FC_SCCA_ENABLE 0x00000004 /* Enable SCC A Lines */
  57. #define HYDRA_FC_SCCB_ENABLE 0x00000008 /* Enable SCC B Lines */
  58. #define HYDRA_FC_ARB_BYPASS 0x00000010 /* Bypass Internal Arbiter */
  59. #define HYDRA_FC_RESET_SCC 0x00000020 /* Reset SCC */
  60. #define HYDRA_FC_MPIC_ENABLE 0x00000040 /* Enable OpenPIC */
  61. #define HYDRA_FC_SLOW_SCC_PCLK 0x00000080 /* 1=15.6672, 0=25 MHz */
  62. #define HYDRA_FC_MPIC_IS_MASTER 0x00000100 /* OpenPIC Master Mode */
  63. /*
  64. * OpenPIC Interrupt Sources
  65. */
  66. #define HYDRA_INT_SIO 0
  67. #define HYDRA_INT_SCSI_DMA 1
  68. #define HYDRA_INT_SCCA_TX_DMA 2
  69. #define HYDRA_INT_SCCA_RX_DMA 3
  70. #define HYDRA_INT_SCCB_TX_DMA 4
  71. #define HYDRA_INT_SCCB_RX_DMA 5
  72. #define HYDRA_INT_SCSI 6
  73. #define HYDRA_INT_SCCA 7
  74. #define HYDRA_INT_SCCB 8
  75. #define HYDRA_INT_VIA 9
  76. #define HYDRA_INT_ADB 10
  77. #define HYDRA_INT_ADB_NMI 11
  78. #define HYDRA_INT_EXT1 12 /* PCI IRQW */
  79. #define HYDRA_INT_EXT2 13 /* PCI IRQX */
  80. #define HYDRA_INT_EXT3 14 /* PCI IRQY */
  81. #define HYDRA_INT_EXT4 15 /* PCI IRQZ */
  82. #define HYDRA_INT_EXT5 16 /* IDE Primay/Secondary */
  83. #define HYDRA_INT_EXT6 17 /* IDE Secondary */
  84. #define HYDRA_INT_EXT7 18 /* Power Off Request */
  85. #define HYDRA_INT_SPARE 19
  86. extern int hydra_init(void);
  87. #endif /* __KERNEL__ */
  88. #endif /* _ASMPPC_HYDRA_H */