1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 249148020SSam Ravnborg #ifndef __ASM_MACINTOSH_H 349148020SSam Ravnborg #define __ASM_MACINTOSH_H 449148020SSam Ravnborg 549148020SSam Ravnborg #include <linux/seq_file.h> 649148020SSam Ravnborg #include <linux/interrupt.h> 749148020SSam Ravnborg 88693d616SGeert Uytterhoeven #include <asm/bootinfo-mac.h> 98693d616SGeert Uytterhoeven 108693d616SGeert Uytterhoeven 1149148020SSam Ravnborg /* 1249148020SSam Ravnborg * Apple Macintoshisms 1349148020SSam Ravnborg */ 1449148020SSam Ravnborg 1549148020SSam Ravnborg extern void mac_reset(void); 1649148020SSam Ravnborg extern void mac_poweroff(void); 1749148020SSam Ravnborg extern void mac_init_IRQ(void); 1830c0527dSFinn Thain 192690e214SFinn Thain extern void mac_irq_enable(struct irq_data *data); 202690e214SFinn Thain extern void mac_irq_disable(struct irq_data *data); 2149148020SSam Ravnborg 22d3b41b6bSFinn Thain extern unsigned char mac_pram_read_byte(int); 23d3b41b6bSFinn Thain extern void mac_pram_write_byte(unsigned char, int); 24d3b41b6bSFinn Thain extern ssize_t mac_pram_get_size(void); 25d3b41b6bSFinn Thain 2649148020SSam Ravnborg /* 2749148020SSam Ravnborg * Macintosh Table 2849148020SSam Ravnborg */ 2949148020SSam Ravnborg 3049148020SSam Ravnborg struct mac_model 3149148020SSam Ravnborg { 3249148020SSam Ravnborg short ident; 3349148020SSam Ravnborg char *name; 3449148020SSam Ravnborg char adb_type; 3549148020SSam Ravnborg char via_type; 3649148020SSam Ravnborg char scsi_type; 3749148020SSam Ravnborg char ide_type; 3849148020SSam Ravnborg char scc_type; 3949148020SSam Ravnborg char ether_type; 40b87eaec2SFinn Thain char expansion_type; 417ad93b42SLaurent Vivier char floppy_type; 4249148020SSam Ravnborg }; 4349148020SSam Ravnborg 4449148020SSam Ravnborg #define MAC_ADB_NONE 0 4549148020SSam Ravnborg #define MAC_ADB_II 1 46f74faec6SFinn Thain #define MAC_ADB_EGRET 2 4749148020SSam Ravnborg #define MAC_ADB_CUDA 3 4849148020SSam Ravnborg #define MAC_ADB_PB1 4 4949148020SSam Ravnborg #define MAC_ADB_PB2 5 5049148020SSam Ravnborg #define MAC_ADB_IOP 6 5149148020SSam Ravnborg 5249148020SSam Ravnborg #define MAC_VIA_II 1 53608e287bSFinn Thain #define MAC_VIA_IICI 2 5449148020SSam Ravnborg #define MAC_VIA_QUADRA 3 5549148020SSam Ravnborg 5649148020SSam Ravnborg #define MAC_SCSI_NONE 0 5749148020SSam Ravnborg #define MAC_SCSI_OLD 1 5849148020SSam Ravnborg #define MAC_SCSI_QUADRA 2 5949148020SSam Ravnborg #define MAC_SCSI_QUADRA2 3 6049148020SSam Ravnborg #define MAC_SCSI_QUADRA3 4 61cbad48deSFinn Thain #define MAC_SCSI_IIFX 5 62cbad48deSFinn Thain #define MAC_SCSI_DUO 6 632e874d17SFinn Thain #define MAC_SCSI_LC 7 6449148020SSam Ravnborg 6549148020SSam Ravnborg #define MAC_IDE_NONE 0 6649148020SSam Ravnborg #define MAC_IDE_QUADRA 1 6749148020SSam Ravnborg #define MAC_IDE_PB 2 6849148020SSam Ravnborg #define MAC_IDE_BABOON 3 6949148020SSam Ravnborg 7049148020SSam Ravnborg #define MAC_SCC_II 1 7149148020SSam Ravnborg #define MAC_SCC_IOP 2 7249148020SSam Ravnborg #define MAC_SCC_QUADRA 3 7349148020SSam Ravnborg #define MAC_SCC_PSC 4 7449148020SSam Ravnborg 7549148020SSam Ravnborg #define MAC_ETHER_NONE 0 7649148020SSam Ravnborg #define MAC_ETHER_SONIC 1 7749148020SSam Ravnborg #define MAC_ETHER_MACE 2 7849148020SSam Ravnborg 79b87eaec2SFinn Thain #define MAC_EXP_NONE 0 80b87eaec2SFinn Thain #define MAC_EXP_PDS 1 /* Accepts only a PDS card */ 81b87eaec2SFinn Thain #define MAC_EXP_NUBUS 2 /* Accepts only NuBus card(s) */ 82b87eaec2SFinn Thain #define MAC_EXP_PDS_NUBUS 3 /* Accepts PDS card and/or NuBus card(s) */ 83b87eaec2SFinn Thain #define MAC_EXP_PDS_COMM 4 /* Accepts PDS card or Comm Slot card */ 8449148020SSam Ravnborg 85*aee6bff1SFinn Thain #define MAC_FLOPPY_UNSUPPORTED 0 86*aee6bff1SFinn Thain #define MAC_FLOPPY_SWIM_IOP 1 87*aee6bff1SFinn Thain #define MAC_FLOPPY_OLD 2 88*aee6bff1SFinn Thain #define MAC_FLOPPY_QUADRA 3 89*aee6bff1SFinn Thain #define MAC_FLOPPY_LC 4 907ad93b42SLaurent Vivier 9149148020SSam Ravnborg extern struct mac_model *macintosh_config; 9249148020SSam Ravnborg 93bdd47c9fSGeert Uytterhoeven 94bdd47c9fSGeert Uytterhoeven /* 95bdd47c9fSGeert Uytterhoeven * Internal representation of the Mac hardware, filled in from bootinfo 96bdd47c9fSGeert Uytterhoeven */ 97bdd47c9fSGeert Uytterhoeven 98bdd47c9fSGeert Uytterhoeven struct mac_booter_data 99bdd47c9fSGeert Uytterhoeven { 100bdd47c9fSGeert Uytterhoeven unsigned long videoaddr; 101bdd47c9fSGeert Uytterhoeven unsigned long videorow; 102bdd47c9fSGeert Uytterhoeven unsigned long videodepth; 103bdd47c9fSGeert Uytterhoeven unsigned long dimensions; 104bdd47c9fSGeert Uytterhoeven unsigned long boottime; 105bdd47c9fSGeert Uytterhoeven unsigned long gmtbias; 106bdd47c9fSGeert Uytterhoeven unsigned long videological; 107bdd47c9fSGeert Uytterhoeven unsigned long sccbase; 108bdd47c9fSGeert Uytterhoeven unsigned long id; 109bdd47c9fSGeert Uytterhoeven unsigned long memsize; 110bdd47c9fSGeert Uytterhoeven unsigned long cpuid; 111bdd47c9fSGeert Uytterhoeven unsigned long rombase; 112bdd47c9fSGeert Uytterhoeven }; 113bdd47c9fSGeert Uytterhoeven 114bdd47c9fSGeert Uytterhoeven extern struct mac_booter_data mac_bi_data; 115bdd47c9fSGeert Uytterhoeven 11649148020SSam Ravnborg #endif 117