summaryrefslogtreecommitdiff
path: root/arch/m68k
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2018-12-22 13:18:01 +1100
committerGeert Uytterhoeven <geert@linux-m68k.org>2019-01-21 10:36:53 +0100
commit6a93207b7de55255209978fabeddc3cdf261e4db (patch)
tree59d6421ab6e3b684c13d9c6930b709daf4e84931 /arch/m68k
parent8f5ec4667db9e3ab63acf875273580ddc0fb46af (diff)
downloadlwn-6a93207b7de55255209978fabeddc3cdf261e4db.tar.gz
lwn-6a93207b7de55255209978fabeddc3cdf261e4db.zip
m68k/mac: Skip VIA port setup unless RTC is connected
Those Mac models which don't connect their RTC to VIA1 port B probably have something else connected to those pins. Just leave them the way we found them. Make the port B setup conditional on via_type, to match the RTC accessors in arch/m68k/mac/misc.c. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/mac/via.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c
index acdabbeecfd2..e6c8b71a3bcb 100644
--- a/arch/m68k/mac/via.c
+++ b/arch/m68k/mac/via.c
@@ -197,13 +197,18 @@ void __init via_init(void)
via1[vBufB] |= 0x40;
}
- /*
- * Set the RTC bits to a known state: all lines to outputs and
- * RTC disabled (yes that's 0 to enable and 1 to disable).
- */
-
- via1[vDirB] |= (VIA1B_vRTCEnb | VIA1B_vRTCClk | VIA1B_vRTCData);
- via1[vBufB] |= (VIA1B_vRTCEnb | VIA1B_vRTCClk);
+ switch (macintosh_config->adb_type) {
+ case MAC_ADB_IOP:
+ case MAC_ADB_II:
+ case MAC_ADB_PB1:
+ /*
+ * Set the RTC bits to a known state: all lines to outputs and
+ * RTC disabled (yes that's 0 to enable and 1 to disable).
+ */
+ via1[vDirB] |= VIA1B_vRTCEnb | VIA1B_vRTCClk | VIA1B_vRTCData;
+ via1[vBufB] |= VIA1B_vRTCEnb | VIA1B_vRTCClk;
+ break;
+ }
/* Everything below this point is VIA2/RBV only... */