[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <ed9f2567365292fd4f6ca081beb31a9aa8eae0df.1545445081.git.fthain@telegraphics.com.au>
Date: Sat, 22 Dec 2018 13:18:01 +1100
From: Finn Thain <fthain@...egraphics.com.au>
To: Joshua Thompson <funaho@...ai.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: linux-m68k@...ts.linux-m68k.org, linux-kernel@...r.kernel.org
Subject: [PATCH] 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@...egraphics.com.au>
---
arch/m68k/mac/via.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c
index 31cccc79cb7a..4fa32752bd7d 100644
--- a/arch/m68k/mac/via.c
+++ b/arch/m68k/mac/via.c
@@ -188,13 +188,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... */
--
2.19.2
Powered by blists - more mailing lists