macintosh.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __ASM_MACINTOSH_H
  3. #define __ASM_MACINTOSH_H
  4. #include <linux/seq_file.h>
  5. #include <linux/interrupt.h>
  6. #include <linux/irq.h>
  7. #include <asm/bootinfo-mac.h>
  8. /*
  9. * Apple Macintoshisms
  10. */
  11. extern void mac_reset(void);
  12. extern void mac_poweroff(void);
  13. extern void mac_init_IRQ(void);
  14. extern void mac_irq_enable(struct irq_data *data);
  15. extern void mac_irq_disable(struct irq_data *data);
  16. extern unsigned char mac_pram_read_byte(int);
  17. extern void mac_pram_write_byte(unsigned char, int);
  18. extern ssize_t mac_pram_get_size(void);
  19. /*
  20. * Macintosh Table
  21. */
  22. struct mac_model
  23. {
  24. short ident;
  25. char *name;
  26. char adb_type;
  27. char via_type;
  28. char scsi_type;
  29. char ide_type;
  30. char scc_type;
  31. char ether_type;
  32. char expansion_type;
  33. char floppy_type;
  34. };
  35. #define MAC_ADB_NONE 0
  36. #define MAC_ADB_II 1
  37. #define MAC_ADB_EGRET 2
  38. #define MAC_ADB_CUDA 3
  39. #define MAC_ADB_PB1 4
  40. #define MAC_ADB_PB2 5
  41. #define MAC_ADB_IOP 6
  42. #define MAC_VIA_II 1
  43. #define MAC_VIA_IICI 2
  44. #define MAC_VIA_QUADRA 3
  45. #define MAC_SCSI_NONE 0
  46. #define MAC_SCSI_OLD 1
  47. #define MAC_SCSI_QUADRA 2
  48. #define MAC_SCSI_QUADRA2 3
  49. #define MAC_SCSI_QUADRA3 4
  50. #define MAC_SCSI_IIFX 5
  51. #define MAC_SCSI_DUO 6
  52. #define MAC_SCSI_LC 7
  53. #define MAC_IDE_NONE 0
  54. #define MAC_IDE_QUADRA 1
  55. #define MAC_IDE_PB 2
  56. #define MAC_IDE_BABOON 3
  57. #define MAC_SCC_II 1
  58. #define MAC_SCC_IOP 2
  59. #define MAC_SCC_QUADRA 3
  60. #define MAC_SCC_PSC 4
  61. #define MAC_ETHER_NONE 0
  62. #define MAC_ETHER_SONIC 1
  63. #define MAC_ETHER_MACE 2
  64. #define MAC_EXP_NONE 0
  65. #define MAC_EXP_PDS 1 /* Accepts only a PDS card */
  66. #define MAC_EXP_NUBUS 2 /* Accepts only NuBus card(s) */
  67. #define MAC_EXP_PDS_NUBUS 3 /* Accepts PDS card and/or NuBus card(s) */
  68. #define MAC_EXP_PDS_COMM 4 /* Accepts PDS card or Comm Slot card */
  69. #define MAC_FLOPPY_UNSUPPORTED 0
  70. #define MAC_FLOPPY_SWIM_IOP 1
  71. #define MAC_FLOPPY_OLD 2
  72. #define MAC_FLOPPY_QUADRA 3
  73. #define MAC_FLOPPY_LC 4
  74. extern struct mac_model *macintosh_config;
  75. /*
  76. * Internal representation of the Mac hardware, filled in from bootinfo
  77. */
  78. struct mac_booter_data
  79. {
  80. unsigned long videoaddr;
  81. unsigned long videorow;
  82. unsigned long videodepth;
  83. unsigned long dimensions;
  84. unsigned long boottime;
  85. unsigned long gmtbias;
  86. unsigned long videological;
  87. unsigned long sccbase;
  88. unsigned long id;
  89. unsigned long memsize;
  90. unsigned long cpuid;
  91. unsigned long rombase;
  92. };
  93. extern struct mac_booter_data mac_bi_data;
  94. #endif