* [PATCH] m68k/mac: Skip VIA port setup unless RTC is connected
@ 2018-12-22 2:18 Finn Thain
2019-01-21 9:40 ` Geert Uytterhoeven
0 siblings, 1 reply; 2+ messages in thread
From: Finn Thain @ 2018-12-22 2:18 UTC (permalink / raw)
To: Joshua Thompson, Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel
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>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] m68k/mac: Skip VIA port setup unless RTC is connected
2018-12-22 2:18 [PATCH] m68k/mac: Skip VIA port setup unless RTC is connected Finn Thain
@ 2019-01-21 9:40 ` Geert Uytterhoeven
0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2019-01-21 9:40 UTC (permalink / raw)
To: Finn Thain; +Cc: Joshua Thompson, linux-m68k, Linux Kernel Mailing List
On Sat, Dec 22, 2018 at 4:07 AM Finn Thain <fthain@telegraphics.com.au> wrote:
> 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>
Thanks, applied and queued for v5.1.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-21 9:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-22 2:18 [PATCH] m68k/mac: Skip VIA port setup unless RTC is connected Finn Thain
2019-01-21 9:40 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).