18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci** macints.h -- Macintosh Linux interrupt handling structs and prototypes 38c2ecf20Sopenharmony_ci** 48c2ecf20Sopenharmony_ci** Copyright 1997 by Michael Schmitz 58c2ecf20Sopenharmony_ci** 68c2ecf20Sopenharmony_ci** This file is subject to the terms and conditions of the GNU General Public 78c2ecf20Sopenharmony_ci** License. See the file COPYING in the main directory of this archive 88c2ecf20Sopenharmony_ci** for more details. 98c2ecf20Sopenharmony_ci** 108c2ecf20Sopenharmony_ci*/ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#ifndef _ASM_MACINTS_H_ 138c2ecf20Sopenharmony_ci#define _ASM_MACINTS_H_ 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#include <asm/irq.h> 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci/* 188c2ecf20Sopenharmony_ci * Base IRQ number for all Mac68K interrupt sources. Each source 198c2ecf20Sopenharmony_ci * has eight indexes (base -> base+7). 208c2ecf20Sopenharmony_ci */ 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci#define VIA1_SOURCE_BASE 8 238c2ecf20Sopenharmony_ci#define VIA2_SOURCE_BASE 16 248c2ecf20Sopenharmony_ci#define PSC3_SOURCE_BASE 24 258c2ecf20Sopenharmony_ci#define PSC4_SOURCE_BASE 32 268c2ecf20Sopenharmony_ci#define PSC5_SOURCE_BASE 40 278c2ecf20Sopenharmony_ci#define PSC6_SOURCE_BASE 48 288c2ecf20Sopenharmony_ci#define NUBUS_SOURCE_BASE 56 298c2ecf20Sopenharmony_ci#define BABOON_SOURCE_BASE 64 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci/* 328c2ecf20Sopenharmony_ci * Maximum IRQ number is BABOON_SOURCE_BASE + 7, 338c2ecf20Sopenharmony_ci * giving us IRQs up through 71 348c2ecf20Sopenharmony_ci */ 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci#define NUM_MAC_SOURCES 72 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci/* 398c2ecf20Sopenharmony_ci * clean way to separate IRQ into its source and index 408c2ecf20Sopenharmony_ci */ 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci#define IRQ_SRC(irq) (irq >> 3) 438c2ecf20Sopenharmony_ci#define IRQ_IDX(irq) (irq & 7) 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci/* VIA1 interrupts */ 468c2ecf20Sopenharmony_ci#define IRQ_VIA1_0 (8) /* one second int. */ 478c2ecf20Sopenharmony_ci#define IRQ_VIA1_1 (9) /* VBlank int. */ 488c2ecf20Sopenharmony_ci#define IRQ_MAC_VBL IRQ_VIA1_1 498c2ecf20Sopenharmony_ci#define IRQ_VIA1_2 (10) /* ADB SR shifts complete */ 508c2ecf20Sopenharmony_ci#define IRQ_MAC_ADB IRQ_VIA1_2 518c2ecf20Sopenharmony_ci#define IRQ_MAC_ADB_SR IRQ_VIA1_2 528c2ecf20Sopenharmony_ci#define IRQ_VIA1_3 (11) /* ADB SR CB2 ?? */ 538c2ecf20Sopenharmony_ci#define IRQ_MAC_ADB_SD IRQ_VIA1_3 548c2ecf20Sopenharmony_ci#define IRQ_VIA1_4 (12) /* ADB SR ext. clock pulse */ 558c2ecf20Sopenharmony_ci#define IRQ_MAC_ADB_CL IRQ_VIA1_4 568c2ecf20Sopenharmony_ci#define IRQ_VIA1_5 (13) 578c2ecf20Sopenharmony_ci#define IRQ_MAC_TIMER_2 IRQ_VIA1_5 588c2ecf20Sopenharmony_ci#define IRQ_VIA1_6 (14) 598c2ecf20Sopenharmony_ci#define IRQ_MAC_TIMER_1 IRQ_VIA1_6 608c2ecf20Sopenharmony_ci#define IRQ_VIA1_7 (15) 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ci/* VIA2/RBV interrupts */ 638c2ecf20Sopenharmony_ci#define IRQ_VIA2_0 (16) 648c2ecf20Sopenharmony_ci#define IRQ_MAC_SCSIDRQ IRQ_VIA2_0 658c2ecf20Sopenharmony_ci#define IRQ_VIA2_1 (17) 668c2ecf20Sopenharmony_ci#define IRQ_MAC_NUBUS IRQ_VIA2_1 678c2ecf20Sopenharmony_ci#define IRQ_VIA2_2 (18) 688c2ecf20Sopenharmony_ci#define IRQ_VIA2_3 (19) 698c2ecf20Sopenharmony_ci#define IRQ_MAC_SCSI IRQ_VIA2_3 708c2ecf20Sopenharmony_ci#define IRQ_VIA2_4 (20) 718c2ecf20Sopenharmony_ci#define IRQ_VIA2_5 (21) 728c2ecf20Sopenharmony_ci#define IRQ_VIA2_6 (22) 738c2ecf20Sopenharmony_ci#define IRQ_VIA2_7 (23) 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_ci/* Level 3 (PSC, AV Macs only) interrupts */ 768c2ecf20Sopenharmony_ci#define IRQ_PSC3_0 (24) 778c2ecf20Sopenharmony_ci#define IRQ_MAC_MACE IRQ_PSC3_0 788c2ecf20Sopenharmony_ci#define IRQ_PSC3_1 (25) 798c2ecf20Sopenharmony_ci#define IRQ_PSC3_2 (26) 808c2ecf20Sopenharmony_ci#define IRQ_PSC3_3 (27) 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ci/* Level 4 (PSC, AV Macs only) interrupts */ 838c2ecf20Sopenharmony_ci#define IRQ_PSC4_0 (32) 848c2ecf20Sopenharmony_ci#define IRQ_PSC4_1 (33) 858c2ecf20Sopenharmony_ci#define IRQ_MAC_SCC_A IRQ_PSC4_1 868c2ecf20Sopenharmony_ci#define IRQ_PSC4_2 (34) 878c2ecf20Sopenharmony_ci#define IRQ_MAC_SCC_B IRQ_PSC4_2 888c2ecf20Sopenharmony_ci#define IRQ_PSC4_3 (35) 898c2ecf20Sopenharmony_ci#define IRQ_MAC_MACE_DMA IRQ_PSC4_3 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_ci/* OSS Level 4 interrupts */ 928c2ecf20Sopenharmony_ci#define IRQ_MAC_SCC (33) 938c2ecf20Sopenharmony_ci 948c2ecf20Sopenharmony_ci/* Level 5 (PSC, AV Macs only) interrupts */ 958c2ecf20Sopenharmony_ci#define IRQ_PSC5_0 (40) 968c2ecf20Sopenharmony_ci#define IRQ_PSC5_1 (41) 978c2ecf20Sopenharmony_ci#define IRQ_PSC5_2 (42) 988c2ecf20Sopenharmony_ci#define IRQ_PSC5_3 (43) 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ci/* Level 6 (PSC, AV Macs only) interrupts */ 1018c2ecf20Sopenharmony_ci#define IRQ_PSC6_0 (48) 1028c2ecf20Sopenharmony_ci#define IRQ_PSC6_1 (49) 1038c2ecf20Sopenharmony_ci#define IRQ_PSC6_2 (50) 1048c2ecf20Sopenharmony_ci#define IRQ_PSC6_3 (51) 1058c2ecf20Sopenharmony_ci 1068c2ecf20Sopenharmony_ci/* Nubus interrupts (cascaded to VIA2) */ 1078c2ecf20Sopenharmony_ci#define IRQ_NUBUS_9 (56) 1088c2ecf20Sopenharmony_ci#define IRQ_NUBUS_A (57) 1098c2ecf20Sopenharmony_ci#define IRQ_NUBUS_B (58) 1108c2ecf20Sopenharmony_ci#define IRQ_NUBUS_C (59) 1118c2ecf20Sopenharmony_ci#define IRQ_NUBUS_D (60) 1128c2ecf20Sopenharmony_ci#define IRQ_NUBUS_E (61) 1138c2ecf20Sopenharmony_ci#define IRQ_NUBUS_F (62) 1148c2ecf20Sopenharmony_ci 1158c2ecf20Sopenharmony_ci/* Baboon interrupts (cascaded to nubus slot $C) */ 1168c2ecf20Sopenharmony_ci#define IRQ_BABOON_0 (64) 1178c2ecf20Sopenharmony_ci#define IRQ_BABOON_1 (65) 1188c2ecf20Sopenharmony_ci#define IRQ_BABOON_2 (66) 1198c2ecf20Sopenharmony_ci#define IRQ_BABOON_3 (67) 1208c2ecf20Sopenharmony_ci 1218c2ecf20Sopenharmony_ci#define SLOT2IRQ(x) (x + 47) 1228c2ecf20Sopenharmony_ci#define IRQ2SLOT(x) (x - 47) 1238c2ecf20Sopenharmony_ci 1248c2ecf20Sopenharmony_ci#endif /* asm/macints.h */ 125