machw.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. ** linux/machw.h -- This header defines some macros and pointers for
  3. ** the various Macintosh custom hardware registers.
  4. **
  5. ** Copyright 1997 by Michael Schmitz
  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. */
  12. #ifndef _ASM_MACHW_H_
  13. #define _ASM_MACHW_H_
  14. /*
  15. * head.S maps the videomem to VIDEOMEMBASE
  16. */
  17. #define VIDEOMEMBASE 0xf0000000
  18. #define VIDEOMEMSIZE (4096*1024)
  19. #define VIDEOMEMMASK (-4096*1024)
  20. #ifndef __ASSEMBLY__
  21. #include <linux/types.h>
  22. #if 0
  23. /* Mac SCSI Controller 5380 */
  24. #define MAC_5380_BAS (0x50F10000) /* This is definitely wrong!! */
  25. struct MAC_5380 {
  26. u_char scsi_data;
  27. u_char char_dummy1;
  28. u_char scsi_icr;
  29. u_char char_dummy2;
  30. u_char scsi_mode;
  31. u_char char_dummy3;
  32. u_char scsi_tcr;
  33. u_char char_dummy4;
  34. u_char scsi_idstat;
  35. u_char char_dummy5;
  36. u_char scsi_dmastat;
  37. u_char char_dummy6;
  38. u_char scsi_targrcv;
  39. u_char char_dummy7;
  40. u_char scsi_inircv;
  41. };
  42. #define mac_scsi ((*(volatile struct MAC_5380 *)MAC_5380_BAS))
  43. /*
  44. ** SCC Z8530
  45. */
  46. #define MAC_SCC_BAS (0x50F04000)
  47. struct MAC_SCC
  48. {
  49. u_char cha_a_ctrl;
  50. u_char char_dummy1;
  51. u_char cha_a_data;
  52. u_char char_dummy2;
  53. u_char cha_b_ctrl;
  54. u_char char_dummy3;
  55. u_char cha_b_data;
  56. };
  57. # define mac_scc ((*(volatile struct SCC*)MAC_SCC_BAS))
  58. #endif
  59. /* hardware stuff */
  60. #define MACHW_DECLARE(name) unsigned name : 1
  61. #define MACHW_SET(name) (mac_hw_present.name = 1)
  62. #define MACHW_PRESENT(name) (mac_hw_present.name)
  63. struct mac_hw_present {
  64. /* video hardware */
  65. /* sound hardware */
  66. /* disk storage interfaces */
  67. MACHW_DECLARE(MAC_SCSI_80); /* Directly mapped NCR5380 */
  68. MACHW_DECLARE(MAC_SCSI_96); /* 53c9[46] */
  69. MACHW_DECLARE(MAC_SCSI_96_2); /* 2nd 53c9[46] Q900 and Q950 */
  70. MACHW_DECLARE(IDE); /* IDE Interface */
  71. /* other I/O hardware */
  72. MACHW_DECLARE(SCC); /* Serial Communications Contr. */
  73. /* DMA */
  74. MACHW_DECLARE(SCSI_DMA); /* DMA for the NCR5380 */
  75. /* real time clocks */
  76. MACHW_DECLARE(RTC_CLK); /* clock chip */
  77. /* supporting hardware */
  78. MACHW_DECLARE(VIA1); /* Versatile Interface Ad. 1 */
  79. MACHW_DECLARE(VIA2); /* Versatile Interface Ad. 2 */
  80. MACHW_DECLARE(RBV); /* Versatile Interface Ad. 2+ */
  81. /* NUBUS */
  82. MACHW_DECLARE(NUBUS); /* NUBUS */
  83. };
  84. extern struct mac_hw_present mac_hw_present;
  85. #endif /* __ASSEMBLY__ */
  86. #endif /* linux/machw.h */