Commit 6a93207b authored by Finn Thain's avatar Finn Thain Committed by Geert Uytterhoeven

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: default avatarFinn Thain <fthain@telegraphics.com.au>
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
parent 8f5ec466
...@@ -197,13 +197,18 @@ void __init via_init(void) ...@@ -197,13 +197,18 @@ void __init via_init(void)
via1[vBufB] |= 0x40; via1[vBufB] |= 0x40;
} }
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 * 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). * RTC disabled (yes that's 0 to enable and 1 to disable).
*/ */
via1[vDirB] |= VIA1B_vRTCEnb | VIA1B_vRTCClk | VIA1B_vRTCData;
via1[vDirB] |= (VIA1B_vRTCEnb | VIA1B_vRTCClk | VIA1B_vRTCData); via1[vBufB] |= VIA1B_vRTCEnb | VIA1B_vRTCClk;
via1[vBufB] |= (VIA1B_vRTCEnb | VIA1B_vRTCClk); break;
}
/* Everything below this point is VIA2/RBV only... */ /* Everything below this point is VIA2/RBV only... */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment