summaryrefslogtreecommitdiff
path: root/arch/m68k/mac/oss.c
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2017-10-27 05:45:24 +0300
committerGeert Uytterhoeven <geert@linux-m68k.org>2017-11-10 01:02:56 +0300
commit7a0bb4427024f426668f3ed63542328135282422 (patch)
tree337f8080889a9d6f8022ec1ad2a5e2d63d03c524 /arch/m68k/mac/oss.c
parent0e37a23ebdadc0e34176b816770da6f4ac64043e (diff)
downloadlinux-7a0bb4427024f426668f3ed63542328135282422.tar.xz
m68k/mac: Disentangle VIA and OSS initialization
macintosh_config->via_type is meaningless on Mac IIfx (i.e. the only model with OSS chip), so skip the via_type switch statement. Call oss_init() before via_init() because it is more important and because that is the right place to initialize the oss_present flag. On this model, bringing forward oss_init() and delaying via_init() is no problem because those functions are independent. The only requirement here is that oss_register_interrupts() happens after via_init(). That is, mac_init_IRQ() happens after config_mac(). Tested-by: Stan Johnson <userm57@yahoo.com> Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/mac/oss.c')
-rw-r--r--arch/m68k/mac/oss.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c
index ca84dcf41fc9..61906eb67d0f 100644
--- a/arch/m68k/mac/oss.c
+++ b/arch/m68k/mac/oss.c
@@ -31,18 +31,18 @@ volatile struct mac_oss *oss;
/*
* Initialize the OSS
- *
- * The OSS "detection" code is actually in via_init() which is always called
- * before us. Thus we can count on oss_present being valid on entry.
*/
void __init oss_init(void)
{
int i;
- if (!oss_present) return;
+ if (macintosh_config->ident != MAC_MODEL_IIFX)
+ return;
oss = (struct mac_oss *) OSS_BASE;
+ pr_debug("OSS detected at %p", oss);
+ oss_present = 1;
/* Disable all interrupts. Unlike a VIA it looks like we */
/* do this by setting the source's interrupt level to zero. */