149148020SSam Ravnborg /* 249148020SSam Ravnborg * OSS 349148020SSam Ravnborg * 449148020SSam Ravnborg * This is used in place of VIA2 on the IIfx. 549148020SSam Ravnborg */ 649148020SSam Ravnborg 749148020SSam Ravnborg #define OSS_BASE (0x50f1a000) 849148020SSam Ravnborg 949148020SSam Ravnborg /* 1049148020SSam Ravnborg * Interrupt level offsets for mac_oss->irq_level 1149148020SSam Ravnborg */ 1249148020SSam Ravnborg 1349148020SSam Ravnborg #define OSS_NUBUS0 0 1449148020SSam Ravnborg #define OSS_NUBUS1 1 1549148020SSam Ravnborg #define OSS_NUBUS2 2 1649148020SSam Ravnborg #define OSS_NUBUS3 3 1749148020SSam Ravnborg #define OSS_NUBUS4 4 1849148020SSam Ravnborg #define OSS_NUBUS5 5 1949148020SSam Ravnborg #define OSS_IOPISM 6 2049148020SSam Ravnborg #define OSS_IOPSCC 7 2149148020SSam Ravnborg #define OSS_SOUND 8 2249148020SSam Ravnborg #define OSS_SCSI 9 2349148020SSam Ravnborg #define OSS_60HZ 10 2449148020SSam Ravnborg #define OSS_VIA1 11 2549148020SSam Ravnborg #define OSS_UNUSED1 12 2649148020SSam Ravnborg #define OSS_UNUSED2 13 2749148020SSam Ravnborg #define OSS_PARITY 14 2849148020SSam Ravnborg #define OSS_UNUSED3 15 2949148020SSam Ravnborg 3049148020SSam Ravnborg #define OSS_NUM_SOURCES 16 3149148020SSam Ravnborg 3249148020SSam Ravnborg /* 3349148020SSam Ravnborg * Pending interrupt bits in mac_oss->irq_pending 3449148020SSam Ravnborg */ 3549148020SSam Ravnborg 3649148020SSam Ravnborg #define OSS_IP_NUBUS0 0x0001 3749148020SSam Ravnborg #define OSS_IP_NUBUS1 0x0002 3849148020SSam Ravnborg #define OSS_IP_NUBUS2 0x0004 3949148020SSam Ravnborg #define OSS_IP_NUBUS3 0x0008 4049148020SSam Ravnborg #define OSS_IP_NUBUS4 0x0010 4149148020SSam Ravnborg #define OSS_IP_NUBUS5 0x0020 4249148020SSam Ravnborg #define OSS_IP_IOPISM 0x0040 4349148020SSam Ravnborg #define OSS_IP_IOPSCC 0x0080 4449148020SSam Ravnborg #define OSS_IP_SOUND 0x0100 4549148020SSam Ravnborg #define OSS_IP_SCSI 0x0200 4649148020SSam Ravnborg #define OSS_IP_60HZ 0x0400 4749148020SSam Ravnborg #define OSS_IP_VIA1 0x0800 4849148020SSam Ravnborg #define OSS_IP_UNUSED1 0x1000 4949148020SSam Ravnborg #define OSS_IP_UNUSED2 0x2000 5049148020SSam Ravnborg #define OSS_IP_PARITY 0x4000 5149148020SSam Ravnborg #define OSS_IP_UNUSED3 0x8000 5249148020SSam Ravnborg 5349148020SSam Ravnborg #define OSS_IP_NUBUS (OSS_IP_NUBUS0|OSS_IP_NUBUS1|OSS_IP_NUBUS2|OSS_IP_NUBUS3|OSS_IP_NUBUS4|OSS_IP_NUBUS5) 5449148020SSam Ravnborg 5549148020SSam Ravnborg /* 5649148020SSam Ravnborg * Rom Control Register 5749148020SSam Ravnborg */ 5849148020SSam Ravnborg 5949148020SSam Ravnborg #define OSS_POWEROFF 0x80 6049148020SSam Ravnborg 6149148020SSam Ravnborg /* 6249148020SSam Ravnborg * OSS Interrupt levels for various sub-systems 6349148020SSam Ravnborg * 6449148020SSam Ravnborg * This mapping is layed out with two things in mind: first, we try to keep 6549148020SSam Ravnborg * things on their own levels to avoid having to do double-dispatches. Second, 6649148020SSam Ravnborg * the levels match as closely as possible the alternate IRQ mapping mode (aka 6749148020SSam Ravnborg * "A/UX mode") available on some VIA machines. 6849148020SSam Ravnborg */ 6949148020SSam Ravnborg 7049148020SSam Ravnborg #define OSS_IRQLEV_DISABLED 0 7149148020SSam Ravnborg #define OSS_IRQLEV_IOPISM 1 /* ADB? */ 7249148020SSam Ravnborg #define OSS_IRQLEV_SCSI IRQ_AUTO_2 7349148020SSam Ravnborg #define OSS_IRQLEV_NUBUS IRQ_AUTO_3 /* keep this on its own level */ 7449148020SSam Ravnborg #define OSS_IRQLEV_IOPSCC IRQ_AUTO_4 /* matches VIA alternate mapping */ 7549148020SSam Ravnborg #define OSS_IRQLEV_SOUND IRQ_AUTO_5 /* matches VIA alternate mapping */ 7649148020SSam Ravnborg #define OSS_IRQLEV_60HZ 6 /* matches VIA alternate mapping */ 7749148020SSam Ravnborg #define OSS_IRQLEV_VIA1 IRQ_AUTO_6 /* matches VIA alternate mapping */ 7849148020SSam Ravnborg #define OSS_IRQLEV_PARITY 7 /* matches VIA alternate mapping */ 7949148020SSam Ravnborg 8049148020SSam Ravnborg #ifndef __ASSEMBLY__ 8149148020SSam Ravnborg 8249148020SSam Ravnborg struct mac_oss { 8349148020SSam Ravnborg __u8 irq_level[0x10]; /* [0x000-0x00f] Interrupt levels */ 8449148020SSam Ravnborg __u8 padding0[0x1F2]; /* [0x010-0x201] IO space filler */ 8549148020SSam Ravnborg __u16 irq_pending; /* [0x202-0x203] pending interrupts bits */ 8649148020SSam Ravnborg __u8 rom_ctrl; /* [0x204-0x204] ROM cntl reg (for poweroff) */ 8749148020SSam Ravnborg __u8 padding1[0x2]; /* [0x205-0x206] currently unused by A/UX */ 8849148020SSam Ravnborg __u8 ack_60hz; /* [0x207-0x207] 60 Hz ack. */ 8949148020SSam Ravnborg }; 9049148020SSam Ravnborg 9149148020SSam Ravnborg extern volatile struct mac_oss *oss; 9249148020SSam Ravnborg extern int oss_present; 9349148020SSam Ravnborg 9449148020SSam Ravnborg #endif /* __ASSEMBLY__ */ 95