Skip to content

Commit 8d9f014

Browse files
Finn Thaingeertu
authored andcommitted
m68k/mac: enable via_alt_mapping on performa 580
Enable via_alt_mapping on the Performa 588 and tidy up related documentation. I'm betting that remapped IRQs work just fine on the Performa 580 series since it works on the LC 630 and the logic board part numbers are reputedly the same. And the consensus seems to be that the Mac TV is essentially a Performa 550, not dissimilar to the Performa 520, so set the via_type accordingly. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
1 parent ed04c97 commit 8d9f014

3 files changed

Lines changed: 24 additions & 33 deletions

File tree

‎arch/m68k/mac/config.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ static struct mac_model mac_data_table[] = {
594594
.ident = MAC_MODEL_TV,
595595
.name = "TV",
596596
.adb_type = MAC_ADB_CUDA,
597-
.via_type = MAC_VIA_QUADRA,
597+
.via_type = MAC_VIA_IIci,
598598
.scsi_type = MAC_SCSI_OLD,
599599
.scc_type = MAC_SCC_II,
600600
.nubus_type = MAC_NUBUS,

‎arch/m68k/mac/macints.c‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@
4242
*
4343
* 6 - off switch (?)
4444
*
45+
* Machines with Quadra-like VIA hardware, except PSC and PMU machines, support
46+
* an alternate interrupt mapping, as used by A/UX. It spreads ethernet and
47+
* sound out to their own autovector IRQs and gives VIA1 a higher priority:
48+
*
49+
* 1 - unused (?)
50+
*
51+
* 3 - on-board SONIC
52+
*
53+
* 5 - Apple Sound Chip (ASC)
54+
*
55+
* 6 - VIA1
56+
*
4557
* For OSS Macintoshes (IIfx only at this point):
4658
*
4759
* 3 - Nubus interrupt

‎arch/m68k/mac/via.c‎

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -194,38 +194,17 @@ void __init via_init(void)
194194
if (oss_present)
195195
return;
196196

197-
/* Some machines support an alternate IRQ mapping that spreads */
198-
/* Ethernet and Sound out to their own autolevel IRQs and moves */
199-
/* VIA1 to level 6. A/UX uses this mapping and we do too. Note */
200-
/* that the IIfx emulates this alternate mapping using the OSS. */
201-
202-
via_alt_mapping = 0;
203-
if (macintosh_config->via_type == MAC_VIA_QUADRA)
204-
switch (macintosh_config->ident) {
205-
case MAC_MODEL_C660:
206-
case MAC_MODEL_Q840:
207-
/* not applicable */
208-
break;
209-
case MAC_MODEL_P588:
210-
case MAC_MODEL_TV:
211-
case MAC_MODEL_PB140:
212-
case MAC_MODEL_PB145:
213-
case MAC_MODEL_PB160:
214-
case MAC_MODEL_PB165:
215-
case MAC_MODEL_PB165C:
216-
case MAC_MODEL_PB170:
217-
case MAC_MODEL_PB180:
218-
case MAC_MODEL_PB180C:
219-
case MAC_MODEL_PB190:
220-
case MAC_MODEL_PB520:
221-
/* not yet tested */
222-
break;
223-
default:
224-
via_alt_mapping = 1;
225-
via1[vDirB] |= 0x40;
226-
via1[vBufB] &= ~0x40;
227-
break;
228-
}
197+
if ((macintosh_config->via_type == MAC_VIA_QUADRA) &&
198+
(macintosh_config->adb_type != MAC_ADB_PB1) &&
199+
(macintosh_config->adb_type != MAC_ADB_PB2) &&
200+
(macintosh_config->ident != MAC_MODEL_C660) &&
201+
(macintosh_config->ident != MAC_MODEL_Q840)) {
202+
via_alt_mapping = 1;
203+
via1[vDirB] |= 0x40;
204+
via1[vBufB] &= ~0x40;
205+
} else {
206+
via_alt_mapping = 0;
207+
}
229208

230209
/*
231210
* Now initialize VIA2. For RBV we just kill all interrupts;

0 commit comments

Comments
 (0)