Skip to content

Commit 265a3b3

Browse files
fthaingeertu
authored andcommitted
m68k: mac: Fix reboot hang on Mac IIci
Calling mac_reset() on a Mac IIci does reset the system, but what follows is a POST failure that requires a manual reset to resolve. Avoid that by using the 68030 asm implementation instead of the C implementation. Apparently the SE/30 has a similar problem as it has used the asm implementation since before git. This patch extends that solution to other systems with a similar ROM. After this patch, the only systems still using the C implementation are 68040 systems where adb_type is either MAC_ADB_IOP or MAC_ADB_II. This implies a 1 MiB Quadra ROM. This now includes the Quadra 900/950, which previously fell through to the "should never get here" catch-all. Reported-and-tested-by: Stan Johnson <[email protected]> Fixes: 1da177e ("Linux-2.6.12-rc2") Signed-off-by: Finn Thain <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/480ebd1249d229c6dc1f3f1c6d599b8505483fd8.1714797072.git.fthain@linux-m68k.org Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent da89ce4 commit 265a3b3

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

arch/m68k/mac/misc.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -453,30 +453,18 @@ void mac_poweroff(void)
453453

454454
void mac_reset(void)
455455
{
456-
if (macintosh_config->adb_type == MAC_ADB_II &&
457-
macintosh_config->ident != MAC_MODEL_SE30) {
458-
/* need ROMBASE in booter */
459-
/* indeed, plus need to MAP THE ROM !! */
460-
461-
if (mac_bi_data.rombase == 0)
462-
mac_bi_data.rombase = 0x40800000;
463-
464-
/* works on some */
465-
rom_reset = (void *) (mac_bi_data.rombase + 0xa);
466-
467-
local_irq_disable();
468-
rom_reset();
469456
#ifdef CONFIG_ADB_CUDA
470-
} else if (macintosh_config->adb_type == MAC_ADB_EGRET ||
471-
macintosh_config->adb_type == MAC_ADB_CUDA) {
457+
if (macintosh_config->adb_type == MAC_ADB_EGRET ||
458+
macintosh_config->adb_type == MAC_ADB_CUDA) {
472459
cuda_restart();
460+
} else
473461
#endif
474462
#ifdef CONFIG_ADB_PMU
475-
} else if (macintosh_config->adb_type == MAC_ADB_PB2) {
463+
if (macintosh_config->adb_type == MAC_ADB_PB2) {
476464
pmu_restart();
465+
} else
477466
#endif
478-
} else if (CPU_IS_030) {
479-
467+
if (CPU_IS_030) {
480468
/* 030-specific reset routine. The idea is general, but the
481469
* specific registers to reset are '030-specific. Until I
482470
* have a non-030 machine, I can't test anything else.
@@ -524,6 +512,18 @@ void mac_reset(void)
524512
"jmp %/a0@\n\t" /* jump to the reset vector */
525513
".chip 68k"
526514
: : "r" (offset), "a" (rombase) : "a0");
515+
} else {
516+
/* need ROMBASE in booter */
517+
/* indeed, plus need to MAP THE ROM !! */
518+
519+
if (mac_bi_data.rombase == 0)
520+
mac_bi_data.rombase = 0x40800000;
521+
522+
/* works on some */
523+
rom_reset = (void *)(mac_bi_data.rombase + 0xa);
524+
525+
local_irq_disable();
526+
rom_reset();
527527
}
528528

529529
/* should never get here */

0 commit comments

Comments
 (0)