public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
From: Finn Thain <fthain@telegraphics.com.au>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-m68k@vger.kernel.org
Subject: [PATCH 08/16] m68k/mac: enable via_alt_mapping on performa 580
Date: Mon, 24 Oct 2011 01:11:16 +1100	[thread overview]
Message-ID: <20111023141147.908762775@telegraphics.com.au> (raw)
In-Reply-To: 20111023141108.856998818@telegraphics.com.au

[-- Attachment #1: via_alt_mapping --]
[-- Type: text/plain, Size: 3422 bytes --]

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>

Index: linux-m68k/arch/m68k/mac/macints.c
===================================================================
--- linux-m68k.orig/arch/m68k/mac/macints.c	2011-10-22 23:02:38.000000000 +1100
+++ linux-m68k/arch/m68k/mac/macints.c	2011-10-23 00:51:06.000000000 +1100
@@ -42,6 +42,18 @@
  *
  *	6	- off switch (?)
  *
+ * Machines with Quadra-like VIA hardware, except PSC and PMU machines, support
+ * an alternate interrupt mapping, as used by A/UX. It spreads ethernet and
+ * sound out to their own autovector IRQs and gives VIA1 a higher priority:
+ *
+ *	1	- unused (?)
+ *
+ *	3	- on-board SONIC
+ *
+ *	5	- Apple Sound Chip (ASC)
+ *
+ *	6	- VIA1
+ *
  * For OSS Macintoshes (IIfx only at this point):
  *
  *	3	- Nubus interrupt
Index: linux-m68k/arch/m68k/mac/config.c
===================================================================
--- linux-m68k.orig/arch/m68k/mac/config.c	2011-10-22 23:02:38.000000000 +1100
+++ linux-m68k/arch/m68k/mac/config.c	2011-10-23 00:51:05.000000000 +1100
@@ -594,7 +594,7 @@ static struct mac_model mac_data_table[]
 		.ident		= MAC_MODEL_TV,
 		.name		= "TV",
 		.adb_type	= MAC_ADB_CUDA,
-		.via_type	= MAC_VIA_QUADRA,
+		.via_type	= MAC_VIA_IIci,
 		.scsi_type	= MAC_SCSI_OLD,
 		.scc_type	= MAC_SCC_II,
 		.nubus_type	= MAC_NUBUS,
Index: linux-m68k/arch/m68k/mac/via.c
===================================================================
--- linux-m68k.orig/arch/m68k/mac/via.c	2011-10-22 23:02:38.000000000 +1100
+++ linux-m68k/arch/m68k/mac/via.c	2011-10-23 00:51:06.000000000 +1100
@@ -193,38 +193,17 @@ void __init via_init(void)
 	if (oss_present)
 		return;
 
-	/* Some machines support an alternate IRQ mapping that spreads  */
-	/* Ethernet and Sound out to their own autolevel IRQs and moves */
-	/* VIA1 to level 6. A/UX uses this mapping and we do too.  Note */
-	/* that the IIfx emulates this alternate mapping using the OSS. */
-
-	via_alt_mapping = 0;
-	if (macintosh_config->via_type == MAC_VIA_QUADRA)
-		switch (macintosh_config->ident) {
-		case MAC_MODEL_C660:
-		case MAC_MODEL_Q840:
-			/* not applicable */
-			break;
-		case MAC_MODEL_P588:
-		case MAC_MODEL_TV:
-		case MAC_MODEL_PB140:
-		case MAC_MODEL_PB145:
-		case MAC_MODEL_PB160:
-		case MAC_MODEL_PB165:
-		case MAC_MODEL_PB165C:
-		case MAC_MODEL_PB170:
-		case MAC_MODEL_PB180:
-		case MAC_MODEL_PB180C:
-		case MAC_MODEL_PB190:
-		case MAC_MODEL_PB520:
-			/* not yet tested */
-			break;
-		default:
-			via_alt_mapping = 1;
-			via1[vDirB] |= 0x40;
-			via1[vBufB] &= ~0x40;
-			break;
-		}
+	if ((macintosh_config->via_type == MAC_VIA_QUADRA) &&
+	    (macintosh_config->adb_type != MAC_ADB_PB1) &&
+	    (macintosh_config->adb_type != MAC_ADB_PB2) &&
+	    (macintosh_config->ident    != MAC_MODEL_C660) &&
+	    (macintosh_config->ident    != MAC_MODEL_Q840)) {
+		via_alt_mapping = 1;
+		via1[vDirB] |= 0x40;
+		via1[vBufB] &= ~0x40;
+	} else {
+		via_alt_mapping = 0;
+	}
 
 	/*
 	 * Now initialize VIA2. For RBV we just kill all interrupts;

  parent reply	other threads:[~2011-10-23 14:11 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-23 14:11 [PATCH 00/16] more mac68k fixes and cleanup Finn Thain
2011-10-23 14:11 ` [PATCH 01/16] pmac_zilog: fix unexpected irq Finn Thain
2011-11-24 14:34   ` Finn Thain
2011-11-24 14:56     ` Alan Cox
2011-11-24 20:41       ` Benjamin Herrenschmidt
2011-11-25  3:15       ` Finn Thain
2011-11-28  0:30         ` Benjamin Herrenschmidt
2011-11-24 15:28     ` David Laight
2011-11-24 20:43       ` Benjamin Herrenschmidt
2011-12-06 15:13   ` [PATCH 01/16 v2] " Finn Thain
2011-12-06 15:27     ` Geert Uytterhoeven
2011-12-07  1:26       ` Finn Thain
2011-12-06 15:39     ` Alan Cox
2011-12-07  3:49     ` [PATCH 01/16 v3] " Finn Thain
2011-12-08  3:17       ` Benjamin Herrenschmidt
2011-12-08  4:20       ` Benjamin Herrenschmidt
2011-12-08  4:30         ` Benjamin Herrenschmidt
2011-12-08 11:26           ` Finn Thain
2011-12-08 11:54             ` Geert Uytterhoeven
2011-12-08 19:44             ` Benjamin Herrenschmidt
2011-12-11 23:48             ` Benjamin Herrenschmidt
2011-12-11 23:55               ` Benjamin Herrenschmidt
2011-12-12 13:34               ` Finn Thain
2011-12-12 20:06                 ` Benjamin Herrenschmidt
2011-12-13  1:24                   ` Finn Thain
2011-10-23 14:11 ` [PATCH 02/16] macfb: fix black and white modes Finn Thain
2011-12-10  5:23   ` Finn Thain
2011-10-23 14:11 ` [PATCH 03/16] mac_sonic: add irq resources and cleanup Finn Thain
2011-11-13 10:28   ` Geert Uytterhoeven
2011-11-13 14:30     ` Finn Thain
2011-11-13 17:36       ` Geert Uytterhoeven
2011-12-10  5:23   ` Finn Thain
2011-10-23 14:11 ` [PATCH 04/16] m68k/mac: early console Finn Thain
2011-10-23 14:11 ` [PATCH 05/16] m68k/mac: cleanup mac_clear_irq Finn Thain
2011-10-23 14:11 ` [PATCH 06/16] m68k/mac: cleanup mac_irq_pending Finn Thain
2011-12-10  5:24   ` Finn Thain
2011-10-23 14:11 ` [PATCH 07/16] m68k/mac: cleanup forward declarations Finn Thain
2011-10-23 14:11 ` Finn Thain [this message]
2011-10-23 14:11 ` [PATCH 09/16] m68k/mac: fix nubus slot irq disable and shutdown Finn Thain
2011-10-23 14:11 ` [PATCH 10/16] m68k/mac: oss irq fixes Finn Thain
2011-10-23 14:11 ` [PATCH 11/16] m68k/mac: fix baboon irq disable and shutdown Finn Thain
2011-10-23 14:11 ` [PATCH 12/16] m68k/mac: fix powerbook 150 adb_type Finn Thain
2011-10-23 14:11 ` [PATCH 13/16] mac_scsi: fix mac_scsi on some powerbooks Finn Thain
2011-12-10  5:24   ` Finn Thain
2011-10-23 14:11 ` [PATCH 14/16] m68k/mac: cleanup macro case Finn Thain
2011-10-23 14:11 ` [PATCH 15/16] mac_scsi: dont enable mac_scsi irq before requesting it Finn Thain
2011-12-10  5:24   ` Finn Thain
2011-10-23 14:11 ` [PATCH 16/16] mac_esp: rename irq Finn Thain
2011-12-10  5:24   ` Finn Thain
2011-10-31 18:35 ` [PATCH 00/16] more mac68k fixes and cleanup Geert Uytterhoeven
2011-10-31 19:16   ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111023141147.908762775@telegraphics.com.au \
    --to=fthain@telegraphics.com.au \
    --cc=geert@linux-m68k.org \
    --cc=linux-m68k@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox