Lines Matching +full:disable +full:- +full:mmu +full:- +full:reset

1 // SPDX-License-Identifier: GPL-2.0
3 * Miscellaneous Mac68K-specific stuff
31 * Offset between Unix time (1970-based) and Mac time (1904-based). Cuda and PMU
33 * need to be changed to interpret wrapped times as post-2040.
157 * Inside Mac has no information about two-byte RTC commands but
168 * data should point to a one-byte buffer for the
190 if (command & 0xFF00) { /* extended (two-byte) command */ in via_rtc_command()
194 } else { /* one-byte command */ in via_rtc_command()
204 /* All done, disable the RTC */ in via_rtc_command()
239 * This only works on machines with the VIA-based PRAM/RTC, which
240 * is basically any machine with Mac II-style ADB.
272 return (time64_t)result.idata - RTC_OFFSET; in via_read_time()
289 * This only works on machines with the VIA-based PRAM/RTC, which
290 * is basically any machine with Mac II-style ADB.
302 time = mktime64(tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, in via_set_rtc_time()
303 tm->tm_hour, tm->tm_min, tm->tm_sec); in via_set_rtc_time()
337 oss->rom_ctrl = OSS_POWEROFF; in oss_shutdown()
359 switch (macintosh_config->ident) { in cuda_shutdown()
374 *-------------------------------------------------------------------
377 *-------------------------------------------------------------------
383 switch (macintosh_config->adb_type) { in mac_pram_read_byte()
404 switch (macintosh_config->adb_type) { in mac_pram_write_byte()
436 } else if (macintosh_config->adb_type == MAC_ADB_II) { in mac_poweroff()
439 } else if (macintosh_config->adb_type == MAC_ADB_EGRET || in mac_poweroff()
440 macintosh_config->adb_type == MAC_ADB_CUDA) { in mac_poweroff()
444 } else if (macintosh_config->adb_type == MAC_ADB_PB2) { in mac_poweroff()
457 if (macintosh_config->adb_type == MAC_ADB_EGRET || in mac_reset()
458 macintosh_config->adb_type == MAC_ADB_CUDA) { in mac_reset()
463 if (macintosh_config->adb_type == MAC_ADB_PB2) { in mac_reset()
468 /* 030-specific reset routine. The idea is general, but the in mac_reset()
469 * specific registers to reset are '030-specific. Until I in mac_reset()
470 * have a non-030 machine, I can't test anything else. in mac_reset()
471 * -- C. Scott Ananian <cananian@alumni.princeton.edu> in mac_reset()
476 /* make a 1-to-1 mapping, using the transparent tran. reg. */ in mac_reset()
480 unsigned long offset = phys-virt; in mac_reset()
487 /* Now jump to physical address so we can disable MMU */ in mac_reset()
496 /* OK. Now reset everything and jump to reset vector. */ in mac_reset()
499 "pmove %/a0@, %/tc\n\t" /* disable mmu */ in mac_reset()
500 "pmove %/a0@, %/tt0\n\t" /* disable tt0 */ in mac_reset()
501 "pmove %/a0@, %/tt1\n\t" /* disable tt1 */ in mac_reset()
504 "movec %/a0, %/cacr\n\t" /* disable caches */ in mac_reset()
510 "movel %1@(0x4),%/a0\n\t" /* load reset vector */ in mac_reset()
511 "reset\n\t" /* reset external devices */ in mac_reset()
512 "jmp %/a0@\n\t" /* jump to the reset vector */ in mac_reset()
551 /* How many days come before each month (0-12). */ in unmktime()
566 --days; in unmktime()
569 rem -= SECS_PER_DAY; in unmktime()
581 #define DIV(a, b) ((a) / (b) - ((a) % (b) < 0)) in unmktime()
582 #define LEAPS_THRU_END_OF(y) (DIV (y, 4) - DIV (y, 100) + DIV (y, 400)) in unmktime()
589 long int yg = y + days / 365 - (days % 365 < 0); in unmktime()
592 days -= (yg - y) * 365 + in unmktime()
593 LEAPS_THRU_END_OF(yg - 1) - LEAPS_THRU_END_OF(y - 1); in unmktime()
596 *yearp = y - 1900; in unmktime()
598 for (y = 11; days < (long int) ip[y]; --y) in unmktime()
600 days -= ip[y]; in unmktime()
615 switch (macintosh_config->adb_type) { in mac_hwclk()
636 t->tm_wday = 0; in mac_hwclk()
638 &t->tm_year, &t->tm_mon, &t->tm_mday, in mac_hwclk()
639 &t->tm_hour, &t->tm_min, &t->tm_sec); in mac_hwclk()
644 switch (macintosh_config->adb_type) { in mac_hwclk()
662 return -ENODEV; in mac_hwclk()